:root {
  --bg-primary: #000000;
  --bg-elevated: #0A0A0A;
  --bg-panel: #111111;
  --border: #1F1F1F;
  --text-primary: #FFFFFF;
  --text-secondary: #B8B8B8;
  --text-muted: #8B8B8B;
  --accent: #F26722;
  --accent-hover: #FF7F3F;
  --error: #FF5555;
  --success: #50C878;

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  --max-w: 1440px;
  --pad-x: 2rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--accent); }

button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 1;
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.nav-brand {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
}

/* SECTIONS */
.section {
  padding: 8rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section:last-of-type { border-bottom: none; }
.section-hero {
  min-height: 90vh;
  min-height: 90svh; /* iOS/Android: use the small viewport (browser chrome expanded) so content fits */
  display: flex;
  align-items: center;
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1200ms ease;
  /* Dim the mesh so white headline stays dominant */
  filter: brightness(0.55) contrast(1.05);
}
.hero-video.is-ready { opacity: 1; }

.hero-video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 25% 45%, rgba(0, 0, 0, 0.70) 0%, transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.section-hero .container { position: relative; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .section-hero {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
      url('/assets/video/hero-mesh.jpg');
    background-size: cover;
    background-position: center;
  }
}

/* TYPOGRAPHY */
.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 2rem;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.hero-title em { color: var(--text-secondary); font-style: italic; }
.hero-sub {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 40rem;
  margin-bottom: 3rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  max-width: 24ch;
}
.section-title em { color: var(--text-secondary); font-style: italic; }
.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 40rem;
  margin-bottom: 2rem;
}

/* TWO-COLUMN */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 64rem;
}
.two-col p { color: var(--text-secondary); font-size: 1.0625rem; }

/* FOCUS GRID */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 4rem;
}
.focus-card {
  background: var(--bg-primary);
  padding: 3rem 2rem;
  transition: background 300ms ease;
}
.focus-card:hover { background: var(--bg-elevated); }
.focus-icon {
  width: 14px;
  height: 14px;
  background: var(--accent);
  margin-bottom: 2rem;
}
.focus-card h3 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.focus-card p { color: var(--text-muted); font-size: 0.9375rem; }

/* ADDRESS BLOCK */
.address-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  padding: 2rem;
  border-left: 1px solid var(--accent);
  margin-top: 3rem;
  max-width: 32rem;
}

/* CONTACT FORM */
.contact-form {
  max-width: 40rem;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.contact-form label { display: flex; flex-direction: column; gap: 0.5rem; }
.field-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.field-label em { opacity: 0.7; font-style: normal; }
.contact-form input,
.contact-form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 200ms ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.contact-form textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }
.form-status {
  min-height: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}
.form-status.error { color: var(--error); }
.form-status.success { color: var(--success); }

/* BUTTON */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 200ms ease;
  align-self: flex-start;
}
.btn:hover { background: var(--accent); color: var(--bg-primary); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* FOOTER */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* SCROLL FADE-IN */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* PRIVACY / GENERIC PAGE */
.prose {
  max-width: 40rem;
  margin: 6rem auto;
  padding: 0 var(--pad-x);
}
.prose h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 2.5rem 0 1rem;
}
.prose p { color: var(--text-secondary); margin-bottom: 1rem; }
.prose a { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .section { padding: 5rem 0; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .focus-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }

  /* Anchor hero content to the top of the visible viewport instead of centering
     it in a 90vh box — keeps the headline above the fold on tall/narrow devices.
     Horizontally center label/title/sub/button on mobile for a more focused hero. */
  .section-hero {
    min-height: 100svh;
    align-items: flex-start;
    padding: 6rem 0 3rem;
    text-align: center;
  }
  .section-hero .label { margin-bottom: 1rem; }
  .section-hero .hero-sub {
    font-size: 1.0625rem;
    line-height: 1.55;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-title { font-size: clamp(2.5rem, 8vw, 4.25rem); margin-bottom: 1.5rem; }
  .section-hero .btn { align-self: center; }

  /* Collapse nav into a hamburger below the tablet breakpoint too, so devices
     reporting 700–900 px (Chrome Android, iPad split-view, etc.) get the mobile UI. */
  .nav-inner { padding: 1rem var(--pad-x); position: relative; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #000;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: 0; }
  .nav-links a {
    display: block;
    padding: 1.1rem var(--pad-x);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
  .nav-toggle span { transition: transform 200ms ease, opacity 150ms ease; }
}

@media (max-width: 640px) {
  :root { --pad-x: 1.25rem; }
  .focus-grid { grid-template-columns: 1fr; }
  .section-title { font-size: clamp(2rem, 8vw, 3rem); }
  .footer-inner { flex-direction: column; align-items: flex-start; }

  .section-hero { padding: 5.5rem 0 2.5rem; }
  .section-hero .label { font-size: 0.7rem; }
  .section-hero .hero-sub { font-size: 1rem; line-height: 1.5; margin-bottom: 1.75rem; }
  .hero-title { font-size: clamp(2.25rem, 10vw, 4rem); margin-bottom: 1.25rem; }
  .section-hero .btn { padding: 0.75rem 1.5rem; font-size: 0.75rem; }
}
