/* ════════════════════════════════════════════════════════════════════════════
   FRITHR — Standard Issue placeholder (full-bleed photographic)
   ════════════════════════════════════════════════════════════════════════════ */

/* Self-hosted fonts (latin, SIL OFL 1.1) — no external requests. */
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 600;
  src: url("../Fonts/cormorant-garamond.woff2") format("woff2"); font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500;
  src: url("../Fonts/cormorant-garamond-italic.woff2") format("woff2"); font-display: swap;
}
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 300 400;
  src: url("../Fonts/jost.woff2") format("woff2"); font-display: swap;
}
@font-face {
  font-family: "Jost"; font-style: italic; font-weight: 300;
  src: url("../Fonts/jost-italic.woff2") format("woff2"); font-display: swap;
}

:root {
  --bone:   #E8E3D9;
  --bronze: #9C7A3C;
  --muted:  #6E6A62;
  --frith:  #3E6F69;
  --ink:    #0B0905;   /* warm near-black — letterbox + scrim base */

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ui:      "Jost", system-ui, -apple-system, sans-serif;

  --maxw: 560px;
  --dur:  200ms;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--ui);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;     /* editorial lockup sits low, like the campaign */
  overflow: hidden;              /* one viewport, no scroll */
  position: relative;
  isolation: isolate;
  padding: clamp(28px, 6vh, 72px) clamp(24px, 6vw, 88px);
  padding-bottom: max(clamp(28px, 6vh, 72px), env(safe-area-inset-bottom));
}

/* ── Full-bleed hero (imagery model: warm, natural light, matte) ─── */
.hero {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 18%;      /* hold both faces as the frame narrows */
  z-index: -3;
}

/* warm matte scrims — darken low + left so the bone lockup reads */
.scrim {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(to top,
      rgba(11,9,5,0.94) 0%, rgba(11,9,5,0.74) 16%,
      rgba(11,9,5,0.30) 40%, rgba(11,9,5,0.04) 60%, transparent 72%),
    linear-gradient(105deg, rgba(11,9,5,0.58) 0%, rgba(11,9,5,0.12) 40%, transparent 62%),
    radial-gradient(130% 80% at 50% 0%, rgba(11,9,5,0.34), transparent 52%);
}

/* fine cloth/film grain over the whole frame */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: soft-light;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Lockup ──────────────────────────────────────────────────────────── */
.lockup {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: clamp(16px, 2.6vh, 26px);
}

.eyebrow {
  margin: 0;
  font-family: var(--ui);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--bronze);
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.6rem, 9.4vw, 3.9rem);
  line-height: 0.92;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--bone);
}

.gloss {
  margin: 0;
  max-width: 40ch;
  font-family: var(--ui);
  font-weight: 300;
  font-size: clamp(0.84rem, 2.4vw, 0.96rem);
  line-height: 1.62;
  letter-spacing: 0.03em;
  color: rgba(232, 227, 217, 0.7);
  text-wrap: pretty;
}
.gloss em { font-style: italic; color: rgba(232, 227, 217, 0.86); }

.statement {
  margin: 0;
  max-width: 22ch;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.35rem, 4.2vw, 1.92rem);
  line-height: 1.24;
  letter-spacing: 0.005em;
  color: var(--bone);
  text-wrap: balance;
}

/* ── Capture ─────────────────────────────────────────────────────────── */
.capture-slot { width: 100%; max-width: 400px; margin-top: clamp(2px, 1vh, 8px); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.field { display: flex; align-items: stretch; gap: 10px; }

.field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 50px;
  padding: 0 15px;
  background: rgba(12, 10, 6, 0.46);
  color: var(--bone);
  font-family: var(--ui);
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(232, 227, 217, 0.32);
  border-radius: 0;
  outline: none;
  transition: border-color var(--dur) ease, background-color var(--dur) ease;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: rgba(232, 227, 217, 0.5); opacity: 1; letter-spacing: 0.04em; }
.field input:hover { border-color: rgba(232, 227, 217, 0.52); }
.field input:focus,
.field input:focus-visible {
  border-color: var(--bronze);
  background: rgba(12, 10, 6, 0.62);
  box-shadow: 0 0 0 1px var(--bronze);
}
.field input[aria-invalid="true"] { border-color: rgba(156, 122, 60, 0.8); }

.field button {
  flex: 0 0 auto;
  height: 50px;
  min-width: 76px;
  padding: 0 22px;
  background: rgba(12, 10, 6, 0.30);
  color: var(--bone);
  font-family: var(--ui);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--bronze);
  border-radius: 0;
  cursor: pointer;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}
.field button:hover { background: var(--bronze); color: var(--ink); }
.field button:active { transform: translateY(1px); }
.field button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--bronze), 0 0 0 3px rgba(156, 122, 60, 0.4);
}

.error {
  min-height: 1.1em;
  margin: 12px 2px 0;
  font-family: var(--ui);
  font-weight: 300;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(192, 152, 86, 0.96);   /* muted bronze — never red */
  opacity: 0;
  transition: opacity var(--dur) ease;
}
.error.show { opacity: 1; }

.confirm { margin: 0; padding: 13px 2px; }
.confirm .word {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.3rem, 4.2vw, 1.6rem); letter-spacing: 0.01em; color: var(--bone);
}
.confirm .loc {
  margin-left: 0.5ch; font-family: var(--ui); font-weight: 300;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(232, 227, 217, 0.62); white-space: nowrap;
}
.fade { transition: opacity var(--dur) ease; }
.fade-out { opacity: 0; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(20px, 3.4vh, 36px);
}
/* tablet-weave band (Birka): fine chevron lattice, Frith petrol + Brass */
.interlace { width: clamp(116px, 22vw, 150px); height: 12px; opacity: 0.6; flex: 0 0 auto; }
.interlace path { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
.interlace .weave-brass { stroke: var(--bronze); }
.interlace .weave-frith { stroke: var(--frith); }
.footer-line {
  margin: 0;
  font-family: var(--ui);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 227, 217, 0.58);
  white-space: nowrap;
}

/* ── Entrance ────────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wordmark-settle {
  from { opacity: 0; transform: translateY(14px); letter-spacing: 0.12em; }
  to   { opacity: 1; transform: translateY(0);    letter-spacing: 0.22em; }
}
@keyframes hero-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: no-preference) {
  .hero        { animation: hero-in 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .eyebrow     { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 180ms both; }
  .wordmark    { animation: wordmark-settle 880ms cubic-bezier(0.2, 0.7, 0.2, 1) 300ms both; }
  .gloss       { animation: rise 720ms cubic-bezier(0.2, 0.7, 0.2, 1) 520ms both; }
  .statement   { animation: rise 720ms cubic-bezier(0.2, 0.7, 0.2, 1) 680ms both; }
  .capture-slot{ animation: rise 720ms cubic-bezier(0.2, 0.7, 0.2, 1) 860ms both; }
  .foot        { animation: rise 720ms cubic-bezier(0.2, 0.7, 0.2, 1) 1020ms both; }
}
@media (prefers-reduced-motion: reduce) {
  .fade, .error, .field input, .field button { transition: none; }
}

/* short / wide desktop — let the column breathe but stay one screen */
@media (min-width: 880px) {
  body { padding-bottom: max(clamp(40px, 8vh, 84px), env(safe-area-inset-bottom)); }
}
@media (max-height: 620px) {
  .lockup { gap: clamp(12px, 2vh, 18px); }
  .foot { margin-top: 16px; }
}
