/* Sonora Web Studio — styles */

:root {
  --sand: #f4efe6;
  --dune: #e9e0d0;
  --ink: #1f1b17;
  --ink-2: #3a332c;
  --muted: #6e655b;
  --saguaro: #3f5d45;
  --saguaro-deep: #2d4432;
  --rust: #c8623a;
  --rust-deep: #a54b28;
  --line: rgba(31, 27, 23, 0.12);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --max: 72rem;
  --gutter: clamp(1rem, 5vw, 4rem);
  --radius: 6px;
  --shadow: 0 18px 50px -24px rgba(31, 27, 23, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--rust); color: #fff; }
strong { font-weight: 600; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.8rem, 7.2vw, 5.8rem); max-width: 17ch; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--rust); }
h2.title { font-size: clamp(2.1rem, 4vw, 3.3rem); max-width: 24ch; margin-bottom: 1.4rem; }
.eyebrow {
  font-size: 0.74rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--rust); font-weight: 500;
}
.eyebrow-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.eyebrow-row::before { content: ""; width: 34px; height: 1px; background: var(--rust); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-2); max-width: 56ch; margin-bottom: 1.6rem; }
.fineprint { font-size: 0.85rem; color: var(--muted); margin-top: 1.6rem; max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 4px; text-decoration: none;
  font-weight: 500; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer; transition: transform .2s, background .2s, color .2s, border-color .2s;
  font-family: var(--sans);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--sand); }
.btn-primary:hover { background: var(--rust); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.text-link { text-decoration: none; font-weight: 500; color: var(--saguaro-deep); border-bottom: 1px solid currentColor; }
.text-link .arrow { display: inline-block; transition: transform .2s; }
.text-link:hover .arrow { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
  transition: background .3s, box-shadow .3s, padding .3s;
}
.nav.is-solid {
  background: rgba(244, 239, 230, 0.9); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line); padding: 0.7rem var(--gutter);
}
.nav-brand {
  font-family: var(--serif); font-size: 1.45rem; font-weight: 400; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.6rem; letter-spacing: 0.005em;
}
.nav-brand em { font-style: italic; font-weight: 400; color: var(--muted); margin-left: 0.3rem; }
.nav-brand .mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--saguaro);
  position: relative; overflow: hidden; flex: none;
}
.nav-brand .mark::before { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--rust); top: 4px; right: 4px; }
.nav-brand .mark::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: -6px; height: 12px; background: var(--ink); border-radius: 50% 50% 0 0; }
.nav-links { list-style: none; display: flex; gap: 1.8rem; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 500; transition: color .2s;
}
.nav-links a:hover { color: var(--rust); }
.nav-links .nav-cta {
  padding: 0.55rem 1.05rem; border-radius: 4px; background: var(--ink); color: var(--sand);
}
.nav-links .nav-cta:hover { background: var(--rust); color: #fff; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 4px;
  padding: 0.45rem 0.95rem; font: inherit; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--sand);
    border-bottom: 1px solid var(--line); display: none; padding: 1rem var(--gutter) 1.4rem;
  }
  .nav.menu-open nav { display: block; }
  .nav.menu-open { background: var(--sand); }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92svh; display: grid; align-items: center;
  padding: 8rem var(--gutter) 6rem; overflow: hidden;
  background: radial-gradient(ellipse 70% 50% at 80% 10%, rgba(200, 98, 58, 0.14), transparent 70%), var(--sand);
}
.hero-inner { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; width: 100%; }
.hero h1 { margin: 1rem 0 1.6rem; }
.hero .lede { max-width: 52ch; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero-art { position: absolute; inset: auto 0 0 0; height: 46%; pointer-events: none; z-index: 1; }
.hero-art .ridge {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 100%;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: 0.9;
  animation: ridge-in 1.4s cubic-bezier(.2,.7,.2,1) both;
}
.hero-art .r1 { background: var(--dune); transform: translateY(46%) scaleX(1.3); animation-delay: .35s; translate: 0 calc(var(--py, 0) * 0.06px); }
.hero-art .r2 { background: var(--saguaro); transform: translateY(66%) scaleX(1.1) translateX(8%); opacity: .85; animation-delay: .2s; translate: 0 calc(var(--py, 0) * 0.10px); }
.hero-art .r3 { background: var(--ink); transform: translateY(84%) scaleX(1.4) translateX(-6%); animation-delay: .05s; translate: 0 calc(var(--py, 0) * 0.14px); }
@keyframes ridge-in {
  from { opacity: 0; margin-bottom: -12%; }
  to   { opacity: var(--ridge-o, .9); margin-bottom: 0; }
}
.hero-art .r2 { --ridge-o: .85; }
.hero-art .sun {
  position: absolute; right: clamp(4%, 10vw, 14%); top: -12%; width: clamp(80px, 12vw, 160px); aspect-ratio: 1;
  border-radius: 50%; background: var(--rust); opacity: .92;
  box-shadow: 0 0 0 18px rgba(200, 98, 58, 0.08), 0 0 0 40px rgba(200, 98, 58, 0.04);
  animation: sun-rise 1.8s cubic-bezier(.2,.7,.2,1) both, sun-breathe 7s ease-in-out 1.8s infinite;
  translate: 0 calc(var(--py, 0) * -0.16px);
  will-change: transform, box-shadow;
}
@keyframes sun-rise {
  from { transform: translateY(70%) scale(.85); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: .92; }
}
@keyframes sun-breathe {
  0%, 100% { box-shadow: 0 0 0 18px rgba(200, 98, 58, 0.08), 0 0 0 40px rgba(200, 98, 58, 0.04), 0 0 60px 10px rgba(200, 98, 58, 0.10); }
  50%      { box-shadow: 0 0 0 26px rgba(200, 98, 58, 0.11), 0 0 0 56px rgba(200, 98, 58, 0.05), 0 0 90px 24px rgba(200, 98, 58, 0.16); }
}
.hero-art::after {
  /* heat shimmer band along the horizon */
  content: ""; position: absolute; left: 0; right: 0; bottom: 34%; height: 18%;
  background: linear-gradient(to top, rgba(200, 98, 58, 0.10), transparent);
  animation: shimmer 6s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes shimmer { from { opacity: .4; transform: translateY(0); } to { opacity: 1; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-art .ridge, .hero-art .sun, .hero-art::after { animation: none; translate: none; }
}
@media (max-width: 760px) {
  .hero { min-height: auto; padding: 7rem var(--gutter) 9rem; }
  .hero-art { height: 30%; }
}

/* ---------- Strip ---------- */
.strip { background: var(--ink); color: var(--sand); }
.strip-inner {
  max-width: var(--max); margin: 0 auto; padding: 1rem var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 1.6rem;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
}
.strip-inner span::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--rust); margin-right: 0.7rem; vertical-align: middle; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); }
.section-inner { max-width: var(--max); margin: 0 auto; }
.theme-dune { background: var(--dune); }
.theme-ink { background: var(--ink); color: var(--sand); }
.theme-ink .lede, .theme-ink p { color: rgba(244, 239, 230, 0.82); }
.theme-ink .eyebrow { color: var(--rust); }
.theme-ink h2 em { color: #e39a78; }

/* ---------- Work ---------- */
.work-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.4rem; margin-top: 2.4rem;
}
.work-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
}
a.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-visual {
  aspect-ratio: 16 / 10; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, hsl(var(--h) 60% 62% / .9), transparent 40%),
    linear-gradient(160deg, hsl(var(--h) 28% 88%), hsl(var(--h) 22% 74%));
}
.work-visual img { width: 100%; height: 100%; object-fit: cover; }
.work-visual .wordmark {
  position: absolute; left: 1.1rem; bottom: 0.9rem; font-family: var(--serif); font-size: 1.5rem;
  color: var(--ink); font-weight: 500; line-height: 1.1; max-width: 80%;
}
.work-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.work-kind { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--rust); font-weight: 500; }
.work-body h3 { font-size: 1.3rem; }
.work-body p { color: var(--ink-2); font-size: 0.95rem; }
.work-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.6rem; }
.work-tags li { font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 3px; background: var(--dune); color: var(--ink-2); font-family: var(--mono); }
.work-card .visit { font-size: 0.8rem; color: var(--saguaro-deep); font-weight: 500; }

/* ---------- Tiers ---------- */
.tier-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.2rem; margin: 2.4rem 0 1.6rem; align-items: stretch;
}
.tier {
  background: #fff; border-radius: var(--radius); padding: 1.6rem 1.5rem 1.7rem;
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.9rem; position: relative;
}
.tier.is-featured { background: var(--ink); color: var(--sand); border-color: var(--ink); box-shadow: var(--shadow); }
.tier.is-featured .tier-tag, .tier.is-featured .tier-else { color: rgba(244, 239, 230, 0.7); }
.tier.is-featured li::before { color: #e39a78; }
.tier-badge {
  position: absolute; top: -0.7rem; left: 1.4rem; background: var(--rust); color: #fff;
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 0.3rem 0.7rem; border-radius: 3px; font-weight: 600;
}
.tier h3 { font-size: 1.55rem; }
.tier-tag { color: var(--muted); font-size: 0.95rem; min-height: 3em; }
.tier-price { font-family: var(--serif); font-size: 3rem; line-height: 1; font-weight: 400; }
.tier-price small { font-family: var(--sans); font-size: 0.8rem; font-weight: 400; color: inherit; opacity: .7; margin-left: 0.3rem; }
.tier-else { font-size: 0.82rem; color: var(--muted); }
.tier-else b { font-weight: 500; font-family: var(--mono); font-size: 0.78rem; }
.tier ul { list-style: none; display: grid; gap: 0.55rem; font-size: 0.93rem; margin-top: 0.3rem; }
.tier li { padding-left: 1.3rem; position: relative; }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--saguaro); font-weight: 600; }
.tier .btn { margin-top: auto; align-self: flex-start; }
.tier.is-featured .btn-primary { background: var(--rust); color: #fff; }
.tier.is-featured .btn-primary:hover { background: #fff; color: var(--ink); }

/* ---------- Terms ---------- */
.terms-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.2rem; margin-top: 1.4rem;
}
.terms-card {
  background: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(31,27,23,0.06) 27px 28px), rgba(255, 255, 255, 0.55);
  border-radius: var(--radius); padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-left: 3px solid var(--rust);
}
.terms-card h3 { font-size: 1.1rem; margin-bottom: 0.8rem; }
.terms-card ul { list-style: none; display: grid; gap: 0.5rem; font-size: 0.92rem; }
.terms-card li { padding-left: 1.1rem; position: relative; }
.terms-card li::before { content: "—"; position: absolute; left: 0; color: var(--rust); }
.terms-card .addons li { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; padding-left: 0; }
.terms-card .addons li::after { content: ""; flex: 1; order: 1; border-bottom: 1px dotted rgba(31,27,23,0.35); transform: translateY(-4px); }
.terms-card .addons li b { order: 2; }
.terms-card .addons li::before { content: none; }
.terms-card .addons b { font-weight: 500; white-space: nowrap; font-family: var(--mono); font-size: 0.82rem; }

/* ---------- Process ---------- */
.process {
  list-style: none; counter-reset: step; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1.4rem 1.6rem; margin-top: 2.4rem;
}
.process li { counter-increment: step; padding-top: 1.1rem; border-top: 1px solid var(--line); position: relative; }
.process li::before {
  content: counter(step, decimal-leading-zero); font-family: var(--serif); font-size: 1.5rem; color: var(--rust);
  display: block; margin-bottom: 0.4rem;
}
.process h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.process p { font-size: 0.93rem; color: var(--ink-2); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(14rem, 2fr) 3fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about-photo img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; filter: saturate(.9); }
.about-text .title { max-width: 20ch; }
.about-text p { margin-bottom: 1.1rem; max-width: 58ch; }
.facts { list-style: none; display: grid; gap: 0.4rem; margin-top: 1.6rem; font-size: 0.9rem; letter-spacing: 0.02em; }
.facts li { padding-left: 1.1rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; background: var(--rust); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about-photo { max-width: 20rem; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 1rem; background: #fff; padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); }
.contact-form label { display: grid; gap: 0.35rem; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.contact-form .opt { text-transform: none; letter-spacing: 0; font-weight: 300; margin-left: 0.4rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; font-size: 1rem; font-weight: 300; text-transform: none; letter-spacing: 0; color: var(--ink);
  padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--sand); width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 7rem; }
.contact-form :is(input, select, textarea):focus { outline: 2px solid var(--saguaro); outline-offset: 1px; border-color: transparent; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form button { justify-self: start; }
.form-status { font-size: 0.9rem; color: var(--saguaro-deep); min-height: 1.4em; }
.form-status.is-error { color: var(--rust-deep); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.4rem var(--gutter) 2.6rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem 2rem; align-items: center; }
.footer-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.footer-name small { display: block; font-family: var(--sans); font-size: 0.8rem; color: var(--muted); font-weight: 300; }
.footer-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-nav a { text-decoration: none; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.footer-nav a:hover { color: var(--rust); }
.footer-base { font-size: 0.82rem; color: var(--muted); width: 100%; }
.footer-base a { color: inherit; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal.is-in, .is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Tracks ---------- */
.tracks-section { padding-top: clamp(3rem, 6vw, 5rem); }
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.4rem; margin-top: 1.2rem; }
.track {
  display: flex; flex-direction: column; gap: 0.7rem; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.8rem 1.6rem;
  transition: transform .25s, box-shadow .25s;
}
.track:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.track-icon { width: 44px; height: 44px; color: var(--rust); display: inline-flex; margin-bottom: 0.2rem; }
.track-icon svg { width: 100%; height: 100%; }
.track:hover .track-icon { color: var(--saguaro); }
.track h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.track p { color: var(--ink-2); font-size: 0.98rem; }
.track .text-link { margin-top: auto; align-self: flex-start; }

/* ---------- Work filter ---------- */
.filter { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.6rem; }
.filter button {
  font: inherit; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
  padding: 0.5rem 1rem; border-radius: 4px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.filter button:hover { border-color: var(--ink); }
.filter button.is-on { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.work-card.is-hidden { display: none; }
.theme-dune .work-card { background: #fff; }

/* ---------- Systems: pains ---------- */
.pains { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem 1.6rem; margin: 2.2rem 0 3rem; }
.pain { border-left: 2px solid var(--rust); padding-left: 1rem; }
.pain code {
  font-family: var(--mono); font-size: 0.82rem; color: #e39a78;
  display: block; margin-bottom: 0.3rem; word-break: break-all;
}
.pain p { font-size: 0.92rem; color: rgba(244, 239, 230, 0.78); }
.ladder-intro { color: rgba(244, 239, 230, 0.85); max-width: 56ch; margin-bottom: 1.6rem; font-size: 1.05rem; }

/* ---------- Systems: ladder ---------- */
.ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.1rem; }
.rung {
  position: relative; background: rgba(244, 239, 230, 0.06); border: 1px solid rgba(244, 239, 230, 0.14);
  border-radius: var(--radius); padding: 1.5rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem;
}
.rung.is-flagship { background: var(--sand); color: var(--ink); border-color: var(--sand); }
.rung-step { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: #e39a78; font-weight: 500; }
.rung.is-flagship .rung-step { color: var(--rust); }
.rung h3 { font-size: 1.3rem; }
.rung-from { font-family: var(--serif); font-size: 1.7rem; color: inherit; }
.rung-text { font-size: 0.93rem; color: rgba(244, 239, 230, 0.8); }
.rung.is-flagship .rung-text, .rung.is-flagship li { color: var(--ink-2); }
.rung ul { list-style: none; display: grid; gap: 0.45rem; font-size: 0.9rem; margin-top: 0.2rem; }
.rung li { padding-left: 1.2rem; position: relative; color: rgba(244, 239, 230, 0.85); }
.rung li::before { content: "✓"; position: absolute; left: 0; color: #e39a78; font-weight: 600; }
.rung.is-flagship li::before { color: var(--saguaro); }

/* ---------- Systems: audit callout ---------- */
.audit {
  margin-top: 2.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem;
  background: var(--rust); color: #fff; border-radius: var(--radius); padding: 1.6rem 1.8rem;
}
.audit h3 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.audit p { color: rgba(255, 255, 255, 0.9); max-width: 58ch; font-size: 0.98rem; }
.audit .btn-primary { background: var(--ink); color: var(--sand); white-space: nowrap; }
.audit .btn-primary:hover { background: #fff; color: var(--ink); }
.theme-ink .audit p { color: rgba(255, 255, 255, 0.9); }

/* Dune-themed about */
.theme-dune .about-text p { color: var(--ink-2); }

/* ---------- Paper grain (hero + dark sections only; no fixed overlay) ---------- */
.hero::after, .theme-ink::after, .theme-dune::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.theme-ink::after { opacity: .10; }
.theme-ink, .theme-dune { position: relative; }
.theme-ink > *, .theme-dune > * { position: relative; z-index: 1; }
.hero::after { z-index: 3; }

/* ---------- Saguaros ---------- */
.hero-art .saguaro { position: absolute; bottom: 0; fill: var(--ink); opacity: 0; animation: saguaro-in 1.2s ease-out .9s both; translate: 0 calc(var(--py, 0) * 0.14px); }
.hero-art .s1 { left: 6%; width: clamp(28px, 4vw, 54px); height: auto; }
.hero-art .s2 { left: 13%; width: clamp(18px, 2.6vw, 36px); height: auto; animation-delay: 1.1s; }
.hero-art .s3 { right: 22%; width: clamp(22px, 3.4vw, 46px); height: auto; animation-delay: 1.0s; }
@keyframes saguaro-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .hero-art .s3 { right: 8%; } }
@media (prefers-reduced-motion: reduce) { .hero-art .saguaro { animation: none; opacity: 1; translate: none; } }

/* ---------- Live demo ---------- */
.demo {
  margin: 2.2rem 0 0.6rem; background: #0f0d0b; border: 1px solid rgba(244,239,230,0.14); border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.82rem; overflow: hidden;
}
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid rgba(244,239,230,0.1); }
.demo-file { display: inline-flex; align-items: center; gap: 0.5rem; color: rgba(244,239,230,0.7); }
.demo-file::before { content: ""; width: 10px; height: 12px; background: var(--saguaro); border-radius: 2px; }
.demo-file code { color: #e39a78; }
.demo-run { font: inherit; font-size: 0.78rem; background: var(--rust); color: #fff; border: 0; padding: 0.45rem 0.9rem; border-radius: 4px; cursor: pointer; }
.demo-run:hover { background: #e07a50; }
.demo-run:disabled { opacity: .6; cursor: default; }
.demo-state { color: rgba(244,239,230,0.5); margin-left: auto; }
.demo-state.is-running { color: #e39a78; }
.demo-state.is-done { color: #8fc7a3; }
.demo-table { width: 100%; border-collapse: collapse; }
.demo-table th { text-align: left; font-weight: 500; color: rgba(244,239,230,0.5); padding: 0.55rem 1rem; border-bottom: 1px solid rgba(244,239,230,0.1); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.demo-table td { padding: 0.55rem 1rem; border-bottom: 1px solid rgba(244,239,230,0.06); color: rgba(244,239,230,0.85); transition: color .3s, background .3s; }
.demo-table tr.dirty td { color: rgba(244,239,230,0.55); font-style: italic; }
.demo-table tr.clean td { color: var(--sand); }
.demo-table tr.clean td:nth-child(3) { text-align: right; }
.demo-table tr.is-flag td:last-child { color: #e39a78; }
.demo-summary { padding: 0.8rem 1rem; color: #8fc7a3; min-height: 1.2em; font-size: 0.8rem; }
@media (max-width: 600px) { .demo-table th:nth-child(2), .demo-table td:nth-child(2) { display: none; } }
