/* ==========================================================================
   Granite Homestead — The Prescott Egg Club
   Shared stylesheet. Warm, editorial, hand-made. Paper tones + granite ink.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand palette */
  --ink: #26231f;
  --paper: #f7f2e7;
  --yolk: #e9a521;
  --pine: #4a5d4e;
  --clay: #b4552f;

  /* Semantic — light (default) */
  --bg: var(--paper);
  --bg-alt: #f1eadb;
  --bg-deep: #ece3d1;
  --surface: #fdfaf3;
  --text: var(--ink);
  --text-soft: #5c564d;
  --text-faint: #7d7669;
  --rule: rgba(38, 35, 31, 0.16);
  --rule-strong: rgba(38, 35, 31, 0.38);
  --accent: var(--yolk);
  --accent-ink: #6b4808;
  --pine-text: #3c4d40;
  --clay-text: #9b431f;
  --btn-text: #1d1a16;
  --grain-opacity: 0.05;

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Instrument Sans', 'Inter', system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem; /* 17px body */
  --text-lg: 1.1875rem;
  --text-xl: 1.5rem;
  --text-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --text-3xl: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
  --text-hero: clamp(2.35rem, 1.35rem + 3.1vw, 3.9rem);

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  --measure: 62ch;
  --page: 1200px;
  --page-narrow: 780px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme='dark'] {
  --bg: #191712;
  --bg-alt: #201d17;
  --bg-deep: #13110d;
  --surface: #241f19;
  --text: #f2ecdd;
  --text-soft: #c6bda9;
  --text-faint: #a49a86;
  --rule: rgba(242, 236, 221, 0.18);
  --rule-strong: rgba(242, 236, 221, 0.42);
  --accent: #f0b53f;
  --accent-ink: #f4c765;
  --pine-text: #a9c1ad;
  --clay-text: #e08c62;
  --btn-text: #17140f;
  --grain-opacity: 0.07;
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img,
picture,
svg {
  max-width: 100%;
  display: block;
}
img {
  height: auto;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 var(--sp-4);
  font-variation-settings: 'SOFT' 30, 'WONK' 1, 'opsz' 36;
  text-wrap: balance;
}
p,
li {
  text-wrap: pretty;
}
h1 {
  font-size: var(--text-3xl);
}
h2 {
  font-size: var(--text-2xl);
}
h3 {
  font-size: var(--text-xl);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 20;
  letter-spacing: -0.005em;
}
h4 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0;
}
p {
  margin: 0 0 var(--sp-4);
  max-width: var(--measure);
}
:focus-visible {
  outline: 2px solid var(--clay-text);
  outline-offset: 3px;
  border-radius: 1px;
}
::selection {
  background: var(--accent);
  color: #1d1a16;
}

/* Paper grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme='dark'] body::after,
[data-theme='dark'] ~ * body::after {
  mix-blend-mode: screen;
}

/* ---------- 3. Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.wrap--narrow {
  max-width: var(--page-narrow);
}
.section {
  padding-block: var(--sp-9);
}
.section--tight {
  padding-block: var(--sp-7);
}
.section--alt {
  background: var(--bg-alt);
}
.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.stack > * + * {
  margin-top: var(--sp-4);
}
.grid {
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 720px) {
  .grid--2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: var(--sp-3) var(--sp-4);
  z-index: 10000;
}
.skip-link:focus {
  left: var(--sp-4);
  top: var(--sp-4);
}

/* ---------- 4. Type utilities ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-text);
  margin: 0 0 var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 6rem;
}
.eyebrow--plain::after {
  display: none;
}
.lede {
  font-size: var(--text-lg);
  color: var(--text-soft);
  max-width: 56ch;
}
.small {
  font-size: var(--text-sm);
  color: var(--text-soft);
}
.tiny {
  font-size: var(--text-xs);
  color: var(--text-faint);
  letter-spacing: 0.01em;
}
.mark {
  background: linear-gradient(transparent 62%, rgba(233, 165, 33, 0.42) 62%);
  padding-inline: 0.05em;
}
.nowrap {
  white-space: nowrap;
}

/* Legal badge — the required "NEST RUN EGGS" marking */
.nestrun-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--btn-text);
  background: var(--accent);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  line-height: 1;
}
.nestrun-badge svg {
  flex: none;
}
p.nestrun-badge {
  width: fit-content;
  justify-self: start;
  margin-block: var(--sp-5);
}
.nestrun-strip {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--sp-3);
}
[data-theme='dark'] .nestrun-strip {
  background: var(--bg-deep);
  border-block: 1px solid var(--rule);
}
.nestrun-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.nestrun-strip strong {
  font-size: var(--text-sm);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.nestrun-strip span {
  font-size: var(--text-sm);
  color: rgba(247, 242, 231, 0.78);
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    background-color 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn--primary {
  background: var(--accent);
  color: var(--btn-text);
}
.btn--primary:hover {
  background: #d9930f;
}
.btn--ghost {
  border-color: var(--rule-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--text);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.btn--dark {
  background: var(--ink);
  color: var(--paper);
}
[data-theme='dark'] .btn--dark {
  background: var(--paper);
  color: var(--ink);
}
.btn--block {
  width: 100%;
}
.textlink {
  color: var(--clay-text);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  font-weight: 500;
}
.textlink:hover {
  color: var(--text);
}

/* ---------- 6. Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}
.brand__mark {
  color: var(--text);
  flex: none;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 18;
}
.brand__name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 2px;
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--text-soft);
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover {
  color: var(--text);
}
.nav a[aria-current='page'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.nav .btn {
  padding: 0.65rem 1.1rem;
  border-bottom: 0;
}
.nav a.btn--primary,
.nav a.btn--primary:hover {
  color: var(--btn-text);
}
.nav .btn:hover {
  color: var(--btn-text);
}
.header-tools {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.theme-toggle {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-soft);
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--rule-strong);
}
.theme-toggle .icon-sun {
  display: none;
}
[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}
[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  color: var(--text);
}
@media (max-width: 480px) {
  .brand {
    gap: 0.55rem;
  }
  .brand__name {
    font-size: 0.9375rem;
    white-space: nowrap;
  }
  .brand__name small {
    font-size: 0.5625rem;
    letter-spacing: 0.14em;
  }
}
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: var(--sp-4) var(--sp-5) var(--sp-6);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.2s var(--ease),
      transform 0.2s var(--ease),
      visibility 0.2s;
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
  }
  .nav[data-open='true'] {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav a {
    padding-block: var(--sp-4);
    border-bottom: 1px solid var(--rule);
    font-size: var(--text-lg);
  }
  .nav a[aria-current='page'] {
    color: var(--accent-ink);
  }
  .nav .btn {
    margin-top: var(--sp-5);
    padding: 0.95rem 1.2rem;
  }
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule);
}
.hero__inner {
  display: grid;
  gap: var(--sp-7);
  padding-block: var(--sp-8) var(--sp-8);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
    padding-block: var(--sp-8) var(--sp-9);
    align-items: start;
  }
}
.hero h1 {
  font-size: var(--text-hero);
  max-width: 20ch;
  margin-bottom: var(--sp-5);
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 72;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.hero__figure {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 0.6rem;
}
.hero__figure img {
  width: 100%;
  object-fit: cover;
}
.hero__figure figcaption {
  font-size: var(--text-xs);
  color: var(--text-faint);
  padding: var(--sp-3) var(--sp-2) var(--sp-1);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
  color: var(--text-soft);
}
.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* Full-bleed image band */
.band {
  position: relative;
  min-height: 46vh;
  display: grid;
  align-items: end;
  color: #f7f2e7;
  background: var(--ink);
  overflow: hidden;
}
.band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}
.band__inner {
  position: relative;
  padding-block: var(--sp-8) var(--sp-7);
  background: linear-gradient(to top, rgba(20, 18, 14, 0.82), rgba(20, 18, 14, 0));
  width: 100%;
}
.band h2,
.band p {
  color: #f7f2e7;
}
.band p {
  color: rgba(247, 242, 231, 0.88);
  margin-bottom: 0;
}

/* ---------- 8. Cards / lists ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.card h3 {
  margin: 0;
}
.card p {
  margin: 0;
  color: var(--text-soft);
}
.card__num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--accent-ink);
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 20;
}
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-4);
}
.feature-list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--text-soft);
  max-width: var(--measure);
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 11px;
  height: 14px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--accent);
}
.divided {
  border-top: 1px solid var(--rule);
}
.divided > * {
  border-bottom: 1px solid var(--rule);
  padding-block: var(--sp-5);
}

/* ---------- 9. Pricing ---------- */
.price-grid {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 780px) {
  .price-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.plan {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
}
.plan--feature {
  border-color: var(--rule-strong);
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.plan__tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pine-text);
  margin-bottom: var(--sp-4);
}
.plan__price {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.8rem + 2vw, 3.2rem);
  line-height: 1;
  font-variation-settings: 'SOFT' 20, 'WONK' 1, 'opsz' 60;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.plan__price em {
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-soft);
}
.plan h3 {
  margin: var(--sp-4) 0 var(--sp-2);
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: var(--sp-4) 0 var(--sp-6);
  display: grid;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--text-soft);
}
.plan ul li {
  padding-left: 1.15rem;
  position: relative;
}
.plan ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 9px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--pine-text);
}
.plan .btn {
  margin-top: auto;
}
.callout {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  padding: var(--sp-5);
  margin-block: var(--sp-6);
}
.callout p:last-child {
  margin-bottom: 0;
}
.callout--pine {
  border-left-color: var(--pine-text);
  background: color-mix(in srgb, var(--pine) 10%, transparent);
}

/* ---------- 10. Capacity meter ---------- */
.capacity {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: var(--sp-6);
}
@media (min-width: 900px) {
  .capacity {
    padding: var(--sp-7);
  }
}
.capacity__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  align-items: baseline;
  justify-content: space-between;
}
.capacity__figure {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1;
  font-variation-settings: 'SOFT' 20, 'WONK' 1, 'opsz' 40;
}
.capacity__figure em {
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.meter {
  margin-top: var(--sp-5);
  height: 18px;
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-radius: 999px;
  overflow: hidden;
}
.meter__fill {
  height: 100%;
  width: 0;
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 88%, #fff) 0 7px,
      var(--accent) 7px 14px
    );
  transition: width 1.4s var(--ease);
  border-radius: 999px;
}
.meter__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.capacity__stats {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
}
@media (min-width: 640px) {
  .capacity__stats {
    grid-template-columns: repeat(3, 1fr);
  }
}
.stat dt {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--sp-2);
}
.stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 24;
}

/* ---------- 11. Steps ---------- */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.steps li {
  counter-increment: step;
  display: grid;
  gap: var(--sp-2) var(--sp-5);
  grid-template-columns: 3rem 1fr;
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--accent-ink);
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 18;
  line-height: 1.2;
}
.steps h3 {
  margin: 0 0 var(--sp-2);
  grid-column: 2;
}
.steps p {
  margin: 0;
  grid-column: 2;
  color: var(--text-soft);
}

/* ---------- 12. Forms ---------- */
.form-shell {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: var(--sp-6);
}
@media (min-width: 900px) {
  .form-shell {
    padding: var(--sp-7);
  }
}
.field-grid {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 680px) {
  .field-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
  .field-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field > label {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.field .req {
  color: var(--clay-text);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  width: 100%;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.field textarea {
  min-height: 7rem;
  resize: vertical;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% + 2px),
    calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent);
  outline: none;
}
.field .hint {
  font-size: var(--text-xs);
  color: var(--text-faint);
}
.error {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--clay-text);
  min-height: 0;
  margin: 0.4rem 0 0;
  display: none;
}
.field[data-invalid='true'] input,
.field[data-invalid='true'] select,
.field[data-invalid='true'] textarea {
  border-color: var(--clay-text);
  background-color: color-mix(in srgb, var(--clay) 7%, var(--bg));
}
.field[data-invalid='true'] .error,
[data-field][data-invalid='true'] .error {
  display: block;
}
.radio-set {
  border: 0;
  margin: 0;
  padding: 0;
}
.radio-set legend {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0;
  margin-bottom: var(--sp-3);
}
.radio-row {
  display: grid;
  gap: var(--sp-3);
}
@media (min-width: 560px) {
  .radio-row {
    grid-template-columns: 1fr 1fr;
  }
}
.radio-card {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: var(--sp-4);
  cursor: pointer;
  background: var(--bg);
}
.radio-card:hover {
  border-color: var(--text);
}
.radio-card input {
  margin-top: 0.25rem;
  accent-color: var(--accent);
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}
.radio-card span {
  font-size: var(--text-sm);
  font-weight: 600;
}
.radio-card small {
  display: block;
  font-weight: 400;
  color: var(--text-soft);
  margin-top: 2px;
}
.radio-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.form-status {
  margin-top: var(--sp-5);
  font-size: var(--text-sm);
}
.form-status[data-state='error'] {
  color: var(--clay-text);
  font-weight: 600;
}
.form-success {
  border: 1px solid var(--pine-text);
  background: color-mix(in srgb, var(--pine) 12%, transparent);
  padding: var(--sp-6);
}
.form-success h3 {
  margin-top: 0;
}
[hidden] {
  display: none !important;
}

/* ---------- 13. FAQ ---------- */
.faq {
  border-top: 1px solid var(--rule);
}
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: var(--sp-5) 2.5rem var(--sp-5) 0;
  position: relative;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.faq .faq__body {
  padding-bottom: var(--sp-5);
}
.faq .faq__body p:last-child {
  margin-bottom: 0;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(247, 242, 231, 0.82);
  padding-block: var(--sp-8) var(--sp-6);
  font-size: var(--text-sm);
}
[data-theme='dark'] .site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--rule);
}
.site-footer a {
  color: rgba(247, 242, 231, 0.82);
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 242, 231, 0.25);
}
.site-footer a:hover {
  color: #fff;
  border-bottom-color: var(--accent);
}
.site-footer a.brand,
.site-footer a.btn {
  border-bottom: 0;
}
.site-footer h2,
.site-footer h3 {
  color: var(--paper);
}
.footer-grid {
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 820px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: var(--sp-7);
  }
}
.site-footer h3 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 242, 231, 0.55);
  margin-bottom: var(--sp-4);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
}
.site-footer .brand__mark {
  color: var(--paper);
}
.site-footer .brand__name {
  color: var(--paper);
}
.site-footer .brand__name small {
  color: rgba(247, 242, 231, 0.5);
}
.footer-legal {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(247, 242, 231, 0.18);
  display: grid;
  gap: var(--sp-4);
}
.footer-legal p {
  max-width: 78ch;
  color: rgba(247, 242, 231, 0.7);
  font-size: var(--text-xs);
  line-height: 1.7;
  margin: 0;
}
.footer-legal .nestrun-badge {
  color: #1d1a16;
}
.footer-bottom {
  margin-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(247, 242, 231, 0.55);
}

/* ---------- 15. Misc blocks ---------- */
.figure {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 0.6rem;
}
.figure img {
  width: 100%;
}
.figure figcaption {
  font-size: var(--text-xs);
  color: var(--text-faint);
  padding: var(--sp-3) var(--sp-2) var(--sp-1);
}
.split {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }
  .split--narrow-img {
    grid-template-columns: 0.85fr 1.15fr;
  }
  .split--reverse .split__media {
    order: 2;
  }
}
.future-item {
  display: grid;
  gap: var(--sp-2);
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 720px) {
  .future-item {
    grid-template-columns: 12rem 1fr;
    gap: var(--sp-5);
    align-items: baseline;
  }
}
.future-item .pill {
  justify-self: start;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--text-faint);
}
.future-item p {
  margin: 0;
  color: var(--text-soft);
}
.future-item h3 {
  margin: 0 0 var(--sp-2);
}
.cta-band {
  background: var(--bg-deep);
  border-block: 1px solid var(--rule);
  text-align: center;
}
.cta-band .wrap {
  display: grid;
  justify-items: center;
  gap: var(--sp-4);
}
.cta-band p {
  margin: 0 auto;
}
.quote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.35;
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 28;
  border-left: 3px solid var(--accent);
  padding-left: var(--sp-5);
  margin: var(--sp-6) 0;
  max-width: 44ch;
}
.area-list {
  list-style: none;
  padding: 0;
  margin: var(--sp-5) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.area-list li {
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: var(--text-sm);
}
.compliance {
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--pine) 7%, var(--surface));
  padding: var(--sp-6);
}
.compliance dl {
  margin: var(--sp-5) 0 0;
  display: grid;
  gap: var(--sp-4);
}
.compliance dt {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--pine-text);
}
.compliance dd {
  margin: 0.3rem 0 0;
  color: var(--text-soft);
}

/* ---------- 16. Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 16. Photo placeholder slot ---------- */
.photo-slot {
  aspect-ratio: 3 / 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  text-align: center;
  padding: var(--sp-6) var(--sp-5);
  border: 2px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text-faint);
}
.photo-slot svg {
  color: var(--clay-text);
  opacity: 0.75;
}
.photo-slot__label {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-soft);
}
.photo-slot__note {
  margin: 0;
  max-width: 32ch;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--text-faint);
}

/* ---------- 17. Tier pricing table ---------- */
.tier-table {
  width: 100%;
  margin-top: var(--sp-5);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}
.tier-table table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: var(--text-base);
}
.tier-table caption {
  caption-side: top;
  padding: var(--sp-4) var(--sp-5) 0;
  text-align: left;
  font-size: var(--text-sm);
  color: var(--text-faint);
}
.tier-table th,
.tier-table td {
  padding: var(--sp-3) var(--sp-5);
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.tier-table thead th {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.tier-table tbody tr:last-child th,
.tier-table tbody tr:last-child td {
  border-bottom: 0;
}
.tier-table tbody th {
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
}
.tier-table__price {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  white-space: nowrap;
}
.tier-table__row--flag {
  background: color-mix(in srgb, var(--yolk) 13%, transparent);
}
.tier-dash {
  color: var(--text-faint);
}

/* ---------- 18. Waiver block ---------- */
.waiver {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.waiver > legend,
.waiver .field-legend {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  padding: 0 var(--sp-2);
}
.waiver__intro {
  margin: var(--sp-2) 0 var(--sp-4);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--text-soft);
}
.waiver__terms {
  max-height: 18rem;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-soft);
  -webkit-overflow-scrolling: touch;
}
.waiver__terms > * + * {
  margin-top: var(--sp-3);
}
.waiver__terms li + li {
  margin-top: var(--sp-3);
}
.waiver__terms ol,
.waiver__terms ul {
  padding-left: 1.25rem;
  margin: 0;
}

/* ---------- 19. Checkbox card ---------- */
.check-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  font-size: var(--text-sm);
  line-height: 1.55;
}
.check-card input[type='checkbox'] {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--pine);
}
.check-card:hover {
  border-color: var(--pine-text);
}
.check-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 20. Small utilities ---------- */
.card--pad {
  padding: var(--sp-6);
}
.feature-list--tight > li + li {
  margin-top: var(--sp-2);
}
.pill--tight {
  padding: 0.15rem 0.5rem;
  font-size: var(--text-xs);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 21. Hand-drawn diagrams (eggs.html) ---------- */
.diagram {
  margin: var(--sp-7) 0 0;
  padding: var(--sp-6) var(--sp-5);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.diagram svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.diagram figcaption {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--text-faint);
}

/* Egg cross-section */
.dg-cuticle {
  fill: none;
  stroke: var(--clay-text);
  stroke-width: 7;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
  opacity: 0.75;
}
.dg-shell {
  fill: none;
  stroke: var(--text);
  stroke-width: 3.2;
}
.dg-membrane {
  fill: none;
  stroke: var(--pine-text);
  stroke-width: 1.4;
}
.dg-thin {
  fill: color-mix(in srgb, var(--surface) 55%, var(--bg-alt));
  stroke: none;
}
.dg-thick {
  fill: color-mix(in srgb, var(--yolk) 8%, transparent);
  stroke: var(--rule-strong);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
}
.dg-yolk {
  fill: var(--yolk);
  stroke: var(--accent-ink);
  stroke-width: 1.6;
}
.dg-disc {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 1.6;
}
.dg-air {
  fill: none;
  stroke: var(--pine-text);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}
.dg-strand {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.7;
}

/* Pore close-up */
.dg-shellblock {
  fill: color-mix(in srgb, var(--text) 9%, transparent);
  stroke: var(--text);
  stroke-width: 2;
}
.dg-cuticleblock {
  fill: color-mix(in srgb, var(--clay) 30%, transparent);
  stroke: var(--clay-text);
  stroke-width: 1.6;
}
.dg-membraneblock {
  fill: color-mix(in srgb, var(--pine) 26%, transparent);
  stroke: var(--pine-text);
  stroke-width: 1.1;
}
.dg-pore {
  fill: var(--surface);
  stroke: var(--text);
  stroke-width: 1.4;
}
.dg-arrow path {
  fill: none;
  stroke: var(--pine-text);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.dg-arrow .dg-arrowhead {
  fill: var(--pine-text);
  stroke: none;
}
.dg-arrow--blocked path {
  stroke: var(--clay-text);
}

/* Leaders & labels */
.dg-leader path {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1.2;
}
.dg-label text {
  font-family: var(--font-body);
  font-size: 14px;
  fill: var(--text-soft);
}
.dg-label--end text {
  text-anchor: end;
}
.dg-label .dg-sub {
  font-size: 12px;
  fill: var(--text-faint);
}

/* Storage chart */
.dg-grid path {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
}
.dg-axis {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1.4;
}
.dg-bar {
  rx: 2;
}
.dg-bar--warm {
  fill: color-mix(in srgb, var(--clay) 55%, transparent);
  stroke: var(--clay-text);
  stroke-width: 1.4;
}
.dg-bar--cool {
  fill: color-mix(in srgb, var(--pine) 48%, transparent);
  stroke: var(--pine-text);
  stroke-width: 1.4;
}
.dg-marker {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.6;
  stroke-dasharray: 4 3;
}
.dg-marker-label,
.dg-value text,
.dg-tick text,
.dg-axis-title {
  font-family: var(--font-body);
}
.dg-marker-label {
  font-size: 12px;
  fill: var(--text-faint);
}
.dg-value text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  fill: var(--text);
}
.dg-tick text {
  font-size: 12px;
  fill: var(--text-faint);
  text-anchor: middle;
}
.dg-axis-title {
  font-size: 12px;
  fill: var(--text-faint);
  text-anchor: middle;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .waiver {
    padding: var(--sp-4);
  }
  .waiver__terms {
    max-height: none;
    overflow-y: visible;
  }
}
.diagram__hint {
  display: none;
  margin: var(--sp-3) 0 0;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
@media (max-width: 700px) {
  .diagram {
    padding: var(--sp-4);
  }
  .diagram__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--sp-2);
  }
  .diagram__scroll svg {
    min-width: 580px;
  }
  .diagram__hint {
    display: block;
  }
  .dg-label text,
  .dg-value text {
    font-size: 17px;
  }
  .dg-marker-label,
  .dg-tick text,
  .dg-axis-title,
  .dg-label .dg-sub {
    font-size: 15px;
  }
}

/* ==========================================================================
   22. SIGN-UP PAGE — availability cards, fieldsets, conditional blocks
   ========================================================================== */

.avail-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .avail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.avail {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 3px solid var(--rule-strong);
}

.avail h3 {
  font-size: var(--text-lg);
  margin: 0;
  line-height: 1.15;
}

.avail p {
  margin: 0;
  font-size: 0.975rem;
  color: var(--ink-soft);
}

.avail .tiny {
  margin-top: auto;
  padding-top: 0.35rem;
}

.avail__status {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.avail--open {
  border-top-color: var(--pine);
}

.avail--open .avail__status {
  color: var(--pine-text);
}

.avail--soon {
  border-top-color: var(--clay);
}

.avail--soon .avail__status {
  color: var(--clay-text);
}

.avail--later {
  border-top-color: var(--yolk);
}

.avail .feature-list {
  margin: 0;
}

/* ---------- Fieldsets ---------- */

.fset {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
  padding: var(--sp-6) 0 0;
  min-inline-size: 0;
}

.fset:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.fset__legend {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0;
  margin-bottom: var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}

.fset__num {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.fset__intro {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: calc(var(--sp-4) * -0.5) 0 var(--sp-5);
  max-width: 62ch;
}

.fset__q {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.opt {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-left: 0.35rem;
}

/* ---------- Conditional reveal ---------- */

.conditional {
  border-left: 2px solid var(--rule-strong);
  padding-left: var(--sp-4);
  margin-top: var(--sp-5);
}

.conditional[hidden],
.field--conditional[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  .conditional:not([hidden]) {
    animation: condIn 0.28s ease both;
  }
}

@keyframes condIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .conditional {
    padding-left: var(--sp-3);
  }
}

/* ---------- Callout label ---------- */

.callout__label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
}
