/* ============================================
   Future Unknown — Styles
   Minimal, luxury-quiet aesthetic
   ============================================ */

/* CSS Variables */
:root {
  /* Colours */
  --bg: #0E0F10;
  --panel: #141618;
  --ink: #E9E6DE;
  --muted: #BFC3C7;
  --heritage: #2F473A;
  --line: #1F2225;
  
  /* Spacing */
  --space-xs: clamp(8px, 1.5vw, 12px);
  --space-sm: clamp(12px, 2vw, 16px);
  --space-md: clamp(20px, 3vw, 32px);
  --space-lg: clamp(32px, 5vw, 64px);
  --space-xl: clamp(48px, 8vw, 96px);
  
  /* Radii */
  --radius: 18px;
  --radius-btn: 12px;
  
  /* Shadow */
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  
  /* Timing */
  --timing-fast: 200ms;
  --timing-medium: 400ms;
  --timing-slow: 600ms;
  
  /* Typography */
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Arial, Helvetica, sans-serif;
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  background-image: 
    radial-gradient(ellipse at top, rgba(47, 71, 58, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(47, 71, 58, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--heritage);
  color: var(--ink);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: var(--space-sm);
}

.subline {
  color: var(--muted);
  font-weight: 300;
  margin-bottom: var(--space-lg);
}

p {
  margin-bottom: var(--space-md);
  max-width: 65ch;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--timing-fast);
}

a:hover {
  color: #D7D2C6;
}

a:focus-visible {
  outline: 2px solid var(--heritage);
  outline-offset: 3px;
}

/* Container */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px);
}

/* Header */
header {
  position: sticky;
  top: 0;
  background: rgba(14, 15, 16, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.wordmark {
  margin: 0;
  font-size: 1.25rem;
}

nav {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

nav a {
  font-size: 0.9375rem;
  transition: all var(--timing-fast);
}

/* Sections */
.hero {
  padding: var(--space-xl) 0;
}

.mid-section {
  padding: var(--space-lg) 0;
}

.content-section {
  padding: var(--space-lg) 0;
}

.contact-section {
  padding: var(--space-lg) 0;
}

.footer-band {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line);
}

.footer-band p {
  font-size: 0.9375rem;
  color: var(--muted);
  text-align: center;
}

/* Footer */
footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--line);
  margin-top: var(--space-xl);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--ink);
}

/* Hero variations */
.project-title {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(1.75rem, 5vw, 3rem);
}

.hero-line {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.5;
  font-family: var(--serif);
  color: var(--muted);
  margin: var(--space-lg) 0;
}

/* Buttons */
.btn-primary,
.btn-ghost,
.btn-text {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-family: var(--sans);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all var(--timing-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.btn-primary {
  background: var(--heritage);
  color: var(--ink);
  border: 1px solid var(--heritage);
}

.btn-primary:hover {
  background: #3d5a4a;
  border-color: #3d5a4a;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--muted);
  color: var(--ink);
}

.btn-text {
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-text:hover {
  color: var(--ink);
}

button:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible {
  outline: 2px solid var(--heritage);
  outline-offset: 3px;
}

/* CTA Row */
.cta-row {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

/* Card */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: var(--space-sm);
}

.card p:last-child {
  margin-bottom: 0;
}

.small-print {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Rule */
.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--space-xl) 0;
}

/* Prose */
.prose p {
  margin-bottom: var(--space-md);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* Form */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label,
fieldset legend {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 0.9375rem;
  color: var(--ink);
}

.required {
  color: var(--heritage);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  transition: all var(--timing-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--heritage);
  background: rgba(47, 71, 58, 0.05);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
  outline: 2px solid var(--heritage);
  outline-offset: 3px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

fieldset {
  border: none;
  padding: 0;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
}

.radio-group input[type="radio"] {
  width: auto;
  cursor: pointer;
}

.radio-group input[type="radio"]:focus-visible {
  outline: 2px solid var(--heritage);
  outline-offset: 2px;
}

.form-status {
  margin-top: var(--space-md);
  padding: var(--space-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  color: var(--muted);
  display: none;
}

.form-status.visible {
  display: block;
}

/* Contact Info */
.contact-info strong {
  color: var(--ink);
  font-weight: 600;
}

.contact-info a {
  color: var(--muted);
  word-break: break-all;
}

.contact-info a:hover {
  color: var(--ink);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--timing-slow) ease-out, 
              transform var(--timing-slow) ease-out;
}

body.loaded .reveal {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 100ms; }
.reveal:nth-child(3) { transition-delay: 200ms; }
.reveal:nth-child(4) { transition-delay: 300ms; }
.reveal:nth-child(5) { transition-delay: 400ms; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 640px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  
  nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
  
  footer .container {
    flex-direction: column;
    text-align: center;
  }
  
  .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }
}