:root {
  color-scheme: light dark;
  --bg: #f6f3ee;
  --bg-2: #ece7df;
  --text: #1a1715;
  --text-2: #5e5750;
  --line: rgba(26, 23, 21, 0.14);
  --accent: #9a4f16;
  --on-accent: #ffffff;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110f0d;
    --bg-2: #1b1815;
    --text: #f3eee7;
    --text-2: #a59c92;
    --line: rgba(243, 238, 231, 0.14);
    --accent: #e3a35c;
    --on-accent: #110f0d;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right)); }
@media (min-width: 768px) { .wrap { padding-left: 40px; padding-right: 40px; } }

/* Bar */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.bar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.wordmark { font-weight: 700; font-size: 15px; letter-spacing: 0.18em; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--text); }
.nav .nav-cta { color: var(--accent); font-weight: 600; }
@media (max-width: 720px) { .nav a:not(.nav-cta) { display: none; } }

/* Type */
.eyebrow, .label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
h1 { font-size: clamp(48px, 8vw, 104px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 700; margin-top: 16px; }
h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.06; letter-spacing: -0.025em; font-weight: 700; margin-top: 12px; max-width: 18ch; }
.lede { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.45; color: var(--text-2); max-width: 30ch; margin-top: 24px; }
.note { color: var(--text-2); max-width: 46ch; margin-top: 16px; }
.muted { color: var(--text-2); }

/* Button */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; margin-top: 32px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: opacity 0.15s;
}
.button:hover { opacity: 0.88; }
.button:disabled { opacity: 0.5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hero */
.hero { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 80px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 6fr 5fr; align-items: end; gap: 64px; padding-top: 96px; padding-bottom: 120px; }
}
.count { margin-top: 16px; font-size: 14px; color: var(--text-2); }
.hero-image img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }

/* Thesis */
.thesis { padding-top: 64px; padding-bottom: 96px; border-top: 1px solid var(--line); }
.thesis-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
@media (min-width: 900px) { .thesis-grid { grid-template-columns: repeat(4, 1fr); } }
.thesis-grid li { color: var(--text-2); font-size: 17px; }
.thesis-grid span { display: block; color: var(--text); font-weight: 600; font-size: 20px; margin-bottom: 4px; }
.thesis-line { font-size: clamp(24px, 3vw, 36px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; margin-top: 64px; max-width: 26ch; }

/* Sections */
.section { padding-top: 64px; padding-bottom: 96px; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 48px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li { font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); }

/* Moodboard */
.board { columns: 2; column-gap: 8px; }
@media (min-width: 700px) { .board { columns: 3; column-gap: 12px; } }
@media (min-width: 1100px) { .board { columns: 4; } }
.tile {
  display: block; width: 100%; padding: 0; margin: 0 0 8px; border: 0; background: var(--bg-2);
  border-radius: 6px; overflow: hidden; cursor: zoom-in; break-inside: avoid;
}
@media (min-width: 700px) { .tile { margin-bottom: 12px; } }
.tile img { width: 100%; transition: transform 0.4s ease, opacity 0.2s; }
.tile:hover img { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) { .tile:hover img { transform: none; } }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 9, 8, 0.96); color: #f3eee7;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 128px); object-fit: contain; border-radius: 4px; }
.lb-close, .lb-nav {
  position: absolute; min-width: 44px; min-height: 44px; border: 0; background: transparent;
  color: #f3eee7; font: 500 15px/1 var(--font); cursor: pointer;
}
.lb-close { top: max(12px, env(safe-area-inset-top)); right: 16px; padding: 0 12px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 40px; width: 56px; height: 88px; opacity: 0.7; }
.lb-nav:hover { opacity: 1; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }

/* Week */
.week { border-top: 1px solid var(--line); }
.week > div { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .week > div { grid-template-columns: 3fr 9fr; gap: 24px; padding: 24px 0; } }
.week dt { font-weight: 600; }
.week dd { color: var(--text-2); font-size: 19px; }
@media (min-width: 700px) { .week dd { color: var(--text); font-size: 22px; letter-spacing: -0.01em; } }

/* House */
.house { display: grid; gap: 48px; }
@media (min-width: 900px) { .house { grid-template-columns: 5fr 7fr; gap: 64px; } }
.price-num { font-size: clamp(56px, 7vw, 88px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-unit { color: var(--text-2); margin-top: 8px; }
.price-note { color: var(--text-2); margin-top: 24px; max-width: 38ch; }
.perks { border-top: 1px solid var(--line); }
.perks li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 19px; }

/* Waitlist */
.join { display: grid; gap: 16px; }
@media (min-width: 900px) { .join { grid-template-columns: 5fr 6fr; gap: 64px; } .join .section-head { margin-bottom: 0; } }
.form { display: grid; gap: 20px; max-width: 560px; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 0; }
.roles legend { margin-bottom: 8px; }
.opt { font-weight: 400; color: var(--text-2); }
.field input {
  width: 100%; min-height: 48px; padding: 0 16px;
  font: 17px var(--font); color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  -webkit-appearance: none; appearance: none;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field input::placeholder { color: var(--text-2); }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .seg { grid-template-columns: repeat(4, 1fr); } }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; color: var(--text-2);
}
.seg input:checked + span { border-color: var(--text); color: var(--text); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .button { margin-top: 8px; justify-self: start; }
.form-msg { min-height: 1.5em; font-size: 15px; color: var(--text-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.done { align-self: start; padding-top: 8px; outline: none; }
.done-num { font-size: clamp(56px, 7vw, 88px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-top: 12px; font-variant-numeric: tabular-nums; }
.done a { color: var(--accent); }
[hidden] { display: none !important; }

/* Footer */
.foot {
  display: grid; gap: 8px; padding-top: 40px; padding-bottom: max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2);
}
.foot .wordmark { color: var(--text); }
@media (min-width: 700px) { .foot { grid-template-columns: 3fr 3fr 3fr 3fr; align-items: baseline; } }
