/* Open house, morning. Shared tokens and components for all three surfaces. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2-variations"),
       url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric matched fallbacks keep the swap from shifting lines. */
@font-face { font-family: "Archivo Fallback"; src: local("Arial"); size-adjust: 101%; ascent-override: 87%; descent-override: 21%; line-gap-override: 0%; }
@font-face { font-family: "Serif Fallback"; src: local("Georgia"); size-adjust: 97%; ascent-override: 104%; descent-override: 33%; line-gap-override: 0%; }

:root {
  color-scheme: light;

  --plaster: oklch(0.972 0.005 105);
  --plaster-2: oklch(0.945 0.008 100);
  --oak: oklch(0.88 0.04 78);
  --oak-soft: oklch(0.925 0.026 80);
  --oak-deep: oklch(0.60 0.075 62);
  --pine: oklch(0.27 0.035 168);
  --pine-2: oklch(0.44 0.03 168);
  --pine-field: oklch(0.31 0.04 168);
  --pine-field-2: oklch(0.36 0.042 168);
  --on-pine: oklch(0.972 0.005 105);
  --on-pine-2: oklch(0.82 0.025 150);
  --clay: oklch(0.54 0.13 42);
  --clay-press: oklch(0.48 0.12 40);
  --clay-soft: oklch(0.93 0.035 50);
  --sage: oklch(0.90 0.04 150);
  --sage-ink: oklch(0.42 0.07 150);
  --rule: oklch(0.86 0.012 120);
  --rule-strong: oklch(0.72 0.015 140);
  --white: oklch(1 0 0);

  --font-ui: "Archivo", "Archivo Fallback", "Helvetica Neue", Arial, sans-serif;
  --font-read: "Source Serif 4", "Serif Fallback", Georgia, serif;

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 8rem;

  --t-xs: 0.8125rem; --t-sm: 0.875rem; --t-base: 1rem; --t-md: 1.125rem;
  --t-lg: 1.35rem; --t-xl: 1.62rem; --t-2xl: 1.94rem; --t-3xl: 2.33rem;
  --t-display: clamp(2.4rem, 1.4rem + 3.6vw, 4.6rem);

  --r-control: 6px;
  --r-panel: 12px;

  --shadow-bar: 0 1px 2px oklch(0.27 0.035 168 / 0.08), 0 8px 24px oklch(0.27 0.035 168 / 0.10);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 150ms;
  --dur-2: 220ms;
  --dur-3: 900ms;

  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--pine-2) var(--plaster-2); }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--pine);
  font-family: var(--font-ui);
  font-size: var(--t-base);
  line-height: 1.5;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--clay);
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 640; }
p, li, dd { text-wrap: pretty; }
p { margin: 0; }
table { border-collapse: collapse; }

::selection { background: var(--oak); color: var(--pine); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--plaster-2); }
::-webkit-scrollbar-thumb { background: var(--pine-2); border: 3px solid var(--plaster-2); border-radius: 12px; }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in oklch, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 2px; }

.display {
  font-family: var(--font-ui);
  font-stretch: 118%;
  font-weight: 640;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.read { font-family: var(--font-read); font-size: var(--t-md); line-height: 1.6; }
.num, .tnum { font-variant-numeric: tabular-nums lining-nums; }

.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;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--pine); color: var(--on-pine); padding: var(--s-2) var(--s-4); border-radius: var(--r-control);
}
.skip-link:focus { top: var(--s-4); }

/* Icons: one drawn set, one stroke. */
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border-radius: var(--r-control); border: 1px solid transparent;
  font-family: var(--font-ui); font-weight: 600; font-size: var(--t-base); letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.btn .icon { width: 1.15em; height: 1.15em; }
.btn-primary { background: var(--clay); color: var(--white); }
.btn-primary:hover { background: var(--clay-press); }
.btn-primary:active { background: oklch(0.44 0.11 40); }
.btn-secondary { background: transparent; color: var(--pine); border-color: var(--pine); }
.btn-secondary:hover { background: var(--pine); color: var(--on-pine); }
.btn-quiet {
  min-height: 44px; padding: 0 var(--s-1); background: none; border: 0; color: var(--pine);
  font-weight: 560; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in oklch, currentColor 45%, transparent);
}
.btn-quiet:hover { text-decoration-color: currentColor; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.on-pine .btn-secondary { color: var(--on-pine); border-color: var(--on-pine-2); }
.on-pine .btn-secondary:hover { background: var(--on-pine); color: var(--pine); }
.on-pine .btn-quiet { color: var(--on-pine); }
.on-pine :focus-visible { outline-color: var(--oak); }

/* Fields */
.field { display: grid; gap: var(--s-1); }
.field label, .field .label { font-weight: 600; font-size: var(--t-sm); }
.field .hint { font-size: var(--t-sm); color: var(--pine-2); }
.input {
  min-height: 48px; width: 100%; padding: 0 var(--s-3);
  background: var(--white); border: 1px solid var(--pine-2); border-radius: var(--r-control);
  font-size: var(--t-base);
}
.input:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-color: var(--pine); }
.input[aria-invalid="true"] { border-color: var(--clay-press); }
.field-error { color: var(--clay-press); font-size: var(--t-sm); font-weight: 560; }
.choice { display: flex; gap: var(--s-2); align-items: flex-start; }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--clay); }

/* Concept bar and render label */
.concept-bar {
  background: var(--pine); color: var(--on-pine);
  font-size: var(--t-xs); font-weight: 560; letter-spacing: 0.02em;
  padding: var(--s-2) var(--s-4); text-align: center;
}
.concept-bar a { color: var(--on-pine); }
.render-label { font-size: var(--t-xs); color: var(--pine-2); letter-spacing: 0.01em; }

/* Image frame with reserved ratio */
.frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--plaster-2); container-type: inline-size; }
.frame picture { position: absolute; inset: 0; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame[data-placeholder] img { opacity: 0.6; }
.house-no {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  font-family: var(--font-ui); font-weight: 600; font-stretch: 100%;
  font-size: calc(var(--fs, 1.1) * 1cqw); line-height: 1; letter-spacing: 0.02em;
  color: var(--ink, oklch(0.2 0.01 160)); pointer-events: none; user-select: none;
  font-variant-numeric: lining-nums;
}
@container (max-width: 300px) { .house-no { display: none; } }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule); padding: var(--s-6) var(--s-4) var(--s-7);
  font-size: var(--t-sm); color: var(--pine-2);
}
.site-footer .inner { max-width: 72rem; margin: 0 auto; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
