/* Goldstraw — compressed straw-panel homes. Shared design system.
   Palette: pine (dominant) + straw-gold (single accent) on warm limewash. */

:root {
  --ground: #f4f4ee;
  --panel: #ffffff;
  --ink: #1b231d;
  --muted: #6e7268;
  --line: #e3e1d6;
  --pine: #1e4620;
  --pine-deep: #173a1b;
  --straw: #c7972f;
  --straw-ink: #7a5a12;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;

  --measure: 66ch;
  --pad: clamp(3.5rem, 8vw, 7rem);
  --gut: clamp(1.25rem, 5vw, 4rem);
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--straw); outline-offset: 3px; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0; }

.eyebrow {
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em;
  font-weight: 700; color: var(--straw-ink); margin: 0;
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: #3a4239; max-width: 60ch; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.fill { color: var(--straw-ink); background: #f6edd6; padding: 0 .28em; border-radius: 4px;
  font-weight: 600; font-size: 0.92em; white-space: nowrap; }

/* ---- layout ---- */
.wrap { width: min(1120px, 100% - 2 * var(--gut)); margin-inline: auto; }
.stack > * + * { margin-top: 1.1rem; }
section { padding-block: var(--pad); }

/* ---- top nav ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.85rem; }
.brand { display: flex; align-items: baseline; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.brand__mark { font-weight: 800; letter-spacing: 0.02em; font-size: 1.25rem; color: var(--pine); }
.brand__tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.nav__links { display: flex; gap: 1.15rem; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav__links a { color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav__links a:hover { color: var(--pine); }
.nav__links a[aria-current="page"] { color: var(--pine); border-bottom: 2px solid var(--straw); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font: inherit; font-weight: 600;
  padding: 0.75rem 1.35rem; border-radius: var(--radius); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s ease, background .2s ease; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--pine); color: #fff; }
.btn--primary:hover { background: var(--pine-deep); }
.btn--ghost { background: transparent; color: var(--pine); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--pine); }
.btn--ondark { background: var(--straw); color: #221a05; }
.btn--ondark:hover { background: #d8a83c; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---- hero ---- */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--gut); align-items: center; }
.hero__cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.6rem; }
@media (max-width: 820px) { .hero__grid { grid-template-columns: 1fr; } }

/* ---- wall cross-section figure ---- */
.figcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; box-shadow: 0 1px 2px rgba(20,40,20,.05); }
.figcard figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.6rem; text-align: center; }

/* ---- stat row ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--panel); padding: 1.4rem 1.2rem; }
.stat__n { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: var(--pine); letter-spacing: -0.03em; }
.stat__l { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---- cards ---- */
.grid { display: grid; gap: 1.1rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid--3 { grid-template-columns: 1fr; } .grid--2 { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card h3 { margin-bottom: 0.4rem; }
.card__k { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--straw-ink); font-weight: 700; }

/* ---- full-bleed band ---- */
.band { background: var(--pine); color: #eaf0e8; }
.band .eyebrow { color: #cbb98a; }
.band h2 { color: #fff; }
.band a.btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.band a.btn--ghost:hover { border-color: #fff; }

/* ---- statement / pull-quote ---- */
.statement { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.35; max-width: 22ch; }

/* ---- feature list ---- */
.flist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.flist li { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; }
.flist li::before { content: ""; width: 0.7rem; height: 0.7rem; margin-top: 0.5rem; border-radius: 2px;
  background: var(--straw); }

/* ---- gallery ---- */
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
@media (max-width: 820px) { .gal { grid-template-columns: repeat(2, 1fr); } }
.tile { aspect-ratio: 4 / 3; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--pine); color: #dfe7dc; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem; text-decoration: none; }
.tile:nth-child(3n+2) { background: #33502f; }
.tile:nth-child(3n) { background: #2a2519; color: #ece0c2; }
.tile span { font-size: 0.78rem; opacity: 0.85; }
.tile strong { font-size: 1rem; }
/* real photo cards */
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #ece9de; margin: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo figcaption { position: absolute; inset: auto 0 0 0; padding: 0.85rem 0.8rem 0.7rem;
  font-size: 0.8rem; color: #fff; line-height: 1.3;
  background: linear-gradient(to top, rgba(20,26,15,0.82), rgba(20,26,15,0)); }
.photo figcaption b { font-weight: 650; }
/* graceful state before a real file is dropped in */
.photo--empty::before { content: attr(data-label); position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; text-align: center; padding: 1rem;
  color: #8a8674; font-size: 0.82rem; }
/* hero photo */
.hero__photo { margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #ece9de;
  box-shadow: 0 24px 48px -26px rgba(20,30,15,0.5); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16 / 11; }
.hero__photo figcaption { padding: 0.65rem 0.9rem; font-size: 0.8rem; color: var(--muted);
  background: #fbfbf7; border-top: 1px solid var(--line); }

/* ---- pricing table ---- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: start; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }
.tier { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.tier--feature { border-color: var(--pine); box-shadow: 0 6px 24px rgba(30,70,32,.09); }
.tier__price { font-size: 2rem; font-weight: 800; color: var(--pine); letter-spacing: -0.02em; }

/* ---- form ---- */
.form { display: grid; gap: 1rem; max-width: 40rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--pine); outline: none; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .field--row { grid-template-columns: 1fr; } }

/* ---- footer ---- */
.foot { background: var(--pine-deep); color: #c9d4c6; padding-block: 3rem 2rem; }
.foot a { color: #eaf0e8; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr; } }
.foot h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: #9fb59b; margin: 0 0 0.6rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; font-size: 0.95rem; }
.foot__legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 0.8rem; color: #8fa48b; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---- panel profiles ---- */
.profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 760px) { .profiles { grid-template-columns: repeat(2, 1fr); } }
.profile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-align: center; }
.profile svg { width: 100%; height: 120px; }
.profile img { width: 100%; height: 150px; object-fit: cover; display: block;
  border-radius: calc(var(--radius) - 5px); }
.profile b { display: block; margin-top: 0.5rem; font-size: 0.95rem; }
.profile span { color: var(--muted); font-size: 0.8rem; }

/* ---- build animation (staged construction) ---- */
.build { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.build svg { width: 100%; height: auto; display: block; }
.build__stage { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.build__stage li { font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700;
  color: var(--muted); background: #eef0e8; border: 1px solid var(--line); border-radius: 999px; padding: 0.26rem 0.7rem; }
.build.play .build__stage li { animation: chip 1.5s ease both; }
.build__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.85rem; flex-wrap: wrap; }
.build__cap { color: var(--muted); font-size: 0.84rem; }
.build__replay { font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; color: var(--pine);
  background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.9rem; }
.build__replay:hover { border-color: var(--pine); }
.part { transform-box: fill-box; transform-origin: center; }
.hook { opacity: 0; }
.build.play .p-found { animation: grow 0.4s cubic-bezier(.2,.8,.2,1) both; }
.build.play .p-wall  { animation: rise 0.5s cubic-bezier(.2,.8,.2,1) both; }
.build.play .p-roof  { animation: drop 0.5s cubic-bezier(.2,.8,.2,1) 0.7s both; }
.build.play .p-render{ animation: fade 0.55s ease 1.0s both; }
.build.play .p-stud  { animation: fade 0.35s ease 0.2s both; }
.build.play .p-open  { animation: pop 0.4s cubic-bezier(.2,.9,.3,1.25) 1.35s both; }
.build.play .p-pv    { animation: fade 0.45s ease 1.65s both; }
.build.play .p-sun   { animation: glow 0.55s ease 1.85s both; }
.build.play .hook    { animation: hook 0.95s ease 0.15s both; }
@keyframes grow { from { transform: translateY(12px) scaleY(.35); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(54px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes drop { from { transform: translateY(-56px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop  { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes glow { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes hook { 0% { transform: translateY(-44px); opacity: 1; } 68% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes chip { 0% { color: var(--muted); background: #eef0e8; border-color: var(--line); }
  30%, 72% { color: #fff; background: var(--pine); border-color: var(--pine); }
  100% { color: var(--muted); background: #eef0e8; border-color: var(--line); } }
@media (prefers-reduced-motion: reduce) { .build .part, .build .hook, .build__stage li { animation: none !important; } }

/* ---- video slot ---- */
.videoslot { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px dashed #b9c3ad;
  background: #eef1e8; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.6rem; text-align: center; padding: 1.2rem; color: var(--muted); }
.videoslot__play { width: 62px; height: 62px; border-radius: 50%; background: var(--pine); color: #fff;
  display: flex; align-items: center; justify-content: center; }

/* ---- energy-flow diagram ---- */
.flow { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.flow svg { width: 100%; height: auto; display: block; }
.flow-line { fill: none; stroke: var(--straw); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 6 8; animation: flowdash 1.1s linear infinite; }
@keyframes flowdash { to { stroke-dashoffset: -28; } }
.flow figcaption { color: var(--muted); font-size: 0.84rem; margin-top: 0.7rem; text-align: center; }
@media (prefers-reduced-motion: reduce) { .flow-line { animation: none; } }
