/* ==========================================================================
   AERRA AXIS — design tokens
   No decorative imagery anywhere on the site — the only raster asset used
   is the AERRA wordmark (header) and its derived favicon/touch-icon.
   Everything else — dividers, accents, texture — is pure CSS.
   ========================================================================== */

:root {
  --ink-navy: #121a2e;
  --ink-navy-deep: #0b1120;
  --forest: #1c3327;
  --maroon: #7a2230;
  --maroon-deep: #5e1a24;
  --cream: #f4eedd;
  --cream-deep: #ece2c9;
  --gold: #c79a44;
  --gold-bright: #e0b45c;
  --ivory: #f6f1e4;
  --ink-text: #1c2333;
  --muted-on-dark: rgba(246, 241, 228, 0.72);
  --muted-on-cream: rgba(28, 35, 51, 0.66);

  --font-display: "Cormorant Garamond", "Iowan Old Style", serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --wrap: 1180px;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
}

em { font-style: italic; color: var(--gold-bright); }
.accent { color: var(--gold-bright); font-style: italic; }

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink-navy-deep);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- header ---------- */

.site-header {
  background: transparent;
  border-bottom: 1px solid transparent;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.45s ease,
              box-shadow 0.45s ease;
}
body.scrolled .site-header {
  background: var(--cream);
  border-bottom-color: rgba(122, 34, 48, 0.18);
  box-shadow: 0 6px 24px rgba(11, 17, 32, 0.06);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 20px;
}

.brand { display: flex; align-items: center; height: 100%; }
.brand-logo {
  height: 30px;
  width: auto;
  opacity: 0;
  transform: translateY(6px) scale(0.9);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
body.scrolled .brand-logo { opacity: 1; transform: translateY(0) scale(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ivory);
  border-radius: 2px;
  transition: background-color 0.4s ease;
}
body.scrolled .nav-toggle span { background: var(--ink-text); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  color: var(--ivory);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.2s ease;
}
body.scrolled .site-nav a { color: var(--ink-text); }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--gold-bright); }
body.scrolled .site-nav a:hover, body.scrolled .site-nav a:focus-visible { color: var(--maroon); }
.site-nav .nav-cta {
  border: 1px solid var(--gold);
  padding: 9px 18px;
  border-radius: 2px;
  color: var(--gold-bright);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
body.scrolled .site-nav .nav-cta { border-color: var(--maroon); color: var(--maroon); }
.site-nav .nav-cta:hover { background: var(--gold); color: var(--ink-navy-deep); }
body.scrolled .site-nav .nav-cta:hover { background: var(--maroon); color: var(--ivory); border-color: var(--maroon); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--gold {
  background: var(--gold);
  color: var(--ink-navy-deep);
}
.btn--gold:hover { background: var(--gold-bright); transform: translateY(-1px); }
.btn--ghost {
  border-color: rgba(246, 241, 228, 0.4);
  color: var(--ivory);
}
.btn--ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); }

/* ---------- hero ---------- */

.hero {
  background: radial-gradient(ellipse at 78% 15%, #1a2340 0%, var(--ink-navy) 45%, var(--ink-navy-deep) 100%);
  color: var(--ivory);
  padding: 120px 0 96px;
  text-align: center;
}

.hero-content { max-width: 720px; margin: 0 auto; }

.hero-logo {
  height: 88px;
  width: auto;
  margin: 0 auto 36px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: center top;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
body.scrolled .hero-logo {
  opacity: 0;
  transform: translateY(-36px) scale(0.55);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}
.hero-lede {
  font-size: 1.1rem;
  color: var(--muted-on-dark);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.dot-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 0.7rem;
  margin: 28px 0 36px;
}
.dot-row-mark { color: var(--maroon); font-size: 1.1rem; }

.hero-actions { display: flex; gap: 16px; margin-top: 8px; justify-content: center; flex-wrap: wrap; }

/* ---------- hero corner motif (sun + steps, from the doodle set) ---------- */

.hero { position: relative; overflow: hidden; }
.hero-content { position: relative; z-index: 1; }

.hero-motif {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: auto;
  max-width: 46%;
  object-fit: cover;
  object-position: right top;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  display: none;
}

@media (min-width: 701px) {
  .hero-motif { display: block; }
}
@media (min-width: 1100px) {
  .hero-motif { opacity: 0.85; max-width: 40%; }
}

/* ---------- colour bands ---------- */

.band { padding: 96px 0; }
.band--forest { background: var(--forest); color: var(--ivory); }
.band--maroon { background: var(--maroon); color: var(--ivory); }
.band--navy { background: var(--ink-navy-deep); color: var(--ivory); }
.band--cream { background: var(--cream); }

/* ---------- macOS-style overlay scroll transitions ----------
   Each full section pins to the top on its own turn, then the next
   section slides up and covers it completely — like panels stacking
   in a deck, the way Apple's product pages transition. Pure CSS
   (position: sticky), so it's GPU-composited and needs no JS. Kept to
   larger viewports, where there's room for full-height panels; small
   screens fall back to a normal, lighter-weight scroll. */
@media (min-width: 861px) {
  .hero,
  .band {
    position: sticky;
    top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: 0 -32px 56px -24px rgba(6, 9, 18, 0.4);
  }
  .hero > .wrap,
  .band > .wrap { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero, .band { position: static; box-shadow: none; }
}

.band-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.band--forest h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.band--forest p { color: var(--muted-on-dark); font-size: 1.05rem; max-width: 460px; margin: 0; }

/* paragraph flanked by the arrow-diamond ornaments, as in the doodle sheet */
.culture-copy {
  display: flex;
  align-items: center;
  gap: 18px;
}
.ornament {
  flex-shrink: 1;
  min-width: 0;
  width: clamp(150px, 18vw, 320px);
  height: auto;
  opacity: 0.9;
}
@media (max-width: 1050px) {
  .ornament { display: none; }
}

/* ---------- quote band ---------- */

.quote-band { text-align: center; position: relative; overflow: hidden; }
.quote-band .wrap { position: relative; z-index: 1; }

.quote-sun {
  display: none;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 92%;
  width: auto;
  max-width: 38vw;
  object-fit: contain;
  object-position: left center;
  opacity: 1;
  pointer-events: none;
}
.quote-tree {
  display: none;
  position: absolute;
  right: 3%;
  bottom: 0;
  width: clamp(140px, 14vw, 230px);
  opacity: 0.8;
  pointer-events: none;
}
@media (min-width: 641px) {
  .quote-sun, .quote-tree { display: block; }
}

blockquote {
  margin: 0 auto;
  max-width: 700px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: var(--maroon-deep);
  line-height: 1.45;
}
.quote-lead { color: var(--maroon-deep); font-weight: 600; }
.quote-rest { color: var(--ink-text); }
@media (min-width: 641px) {
  /* the sun graphic hugs the left edge, so shift the quote's safe area right */
  .quote-band .wrap { padding-left: clamp(240px, 30vw, 420px); }
  blockquote { margin: 0 auto; max-width: 720px; }
}
blockquote::before {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto 28px;
}

/* ---------- tenets ---------- */

.band-title { text-align: center; font-size: clamp(1.9rem, 3vw, 2.5rem); margin-bottom: 56px; position: relative; z-index: 1; }
.band--maroon .band-title { color: var(--ivory); }

.tenets-band { position: relative; overflow: hidden; }
.tenets-band > .wrap { position: relative; z-index: 1; }
.tenets-motif {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  max-width: 70%;
  opacity: 0.5;
  pointer-events: none;
}

.tenets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 64px;
}
.tenet { display: flex; gap: 18px; align-items: baseline; }
.tenet-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  flex-shrink: 0;
}
.tenet p { color: var(--muted-on-dark); font-size: 1.05rem; margin: 0; max-width: 420px; }

/* ---------- services ---------- */

.services-band { position: relative; overflow: hidden; }
.services-band > .wrap { position: relative; z-index: 1; }
.services-motif {
  position: absolute;
  top: -30px;
  right: -20px;
  width: 340px;
  max-width: 45%;
  opacity: 0.8;
  pointer-events: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 64px;
}
.service h3 {
  font-size: 1.3rem;
  color: var(--maroon-deep);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.service ul { margin: 0; padding: 0; list-style: none; }
.service li {
  padding: 7px 0;
  color: var(--muted-on-cream);
  font-size: 0.98rem;
}
.service li::before { content: "\2014 \0020"; color: var(--gold); }

/* ---------- CTA band ---------- */

.cta-band { text-align: center; }
.cta-content h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 760px; margin: 0 auto 36px; }

/* ---------- contact page ---------- */

.contact-hero { padding: 96px 0 72px; }
.contact-hero .hero-logo { margin-left: 0; height: 64px; }
.contact-hero .hero-lede { max-width: 560px; margin-left: 0; margin-right: 0; }

.contact-wrap { max-width: 760px; }

.contact-form {
  background: var(--ivory);
  border: 1px solid var(--cream-deep);
  padding: 44px;
  border-radius: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.field { display: flex; flex-direction: column; }
.field--full { margin-bottom: 24px; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--maroon-deep);
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--cream-deep);
  background: #fff;
  border-radius: 2px;
  color: var(--ink-text);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 130px; }

.field-error { color: var(--maroon); font-size: 0.85rem; margin: 6px 0 0; }
.form-error { color: var(--maroon); background: #fbe9e9; padding: 12px 16px; border-radius: 2px; margin-bottom: 20px; }
.form-note { color: var(--muted-on-cream); font-size: 0.88rem; margin-top: 16px; }

/* ---------- success page ---------- */

.success-band { padding: 130px 0; text-align: center; }
.success-content { max-width: 560px; margin: 0 auto; }
.success-content .btn { margin-top: 12px; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink-navy-deep);
  color: var(--muted-on-dark);
  padding: 28px 0;
  font-size: 0.85rem;
}
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-links a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--gold-bright); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .band-split, .tenets-grid, .services-grid, .form-grid {
    grid-template-columns: 1fr;
  }
  :root { --header-h: 64px; }
  .hero-logo { height: 60px; margin-bottom: 24px; }
  .contact-form { padding: 28px; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-bottom: 1px solid rgba(122, 34, 48, 0.18);
  }
  .site-nav.is-open { max-height: 200px; }
  .site-nav a {
    padding: 16px 32px;
    border-top: 1px solid rgba(28, 35, 51, 0.08);
    color: var(--ink-text) !important;
  }
  .site-nav .nav-cta {
    margin: 12px 32px;
    text-align: center;
    border-color: var(--maroon) !important;
    color: var(--maroon) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .site-nav { transition: none; }
}

/* ---------- sticky re-assertion for image-bearing sections ----------
   .quote-band / .tenets-band / .services-band declare position: relative
   (as the containing block for their absolutely-positioned motif images),
   and being later in the stylesheet at equal specificity, that silently
   overrode the panel-overlay position: sticky declared earlier — which is
   why those sections stopped pinning. Re-assert sticky here, at the end of
   the file, so it wins the cascade on desktop. position: sticky is itself
   a containing block for absolute children, so the motif images keep
   positioning correctly; on mobile the earlier relative still applies. */
@media (min-width: 861px) {
  .quote-band,
  .tenets-band,
  .services-band {
    position: sticky;
  }
}
