/* ============================================================
   THE WRITTEN VERSION
   ------------------------------------------------------------
   The same content, as a plain document.

   With JavaScript it is taken out of the visual flow but left in
   the accessibility tree, so a screen reader gets one clean,
   complete reading instead of a scroll-timed composition it
   cannot perceive. Without JavaScript — or on a printer — it is
   simply the site, and it is designed to be worth reading.
   ============================================================ */

.doc {
  max-width: 78ch;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 120px) var(--gutter) clamp(64px, 12vh, 160px);
  position: relative;
  z-index: 1;
}

/* The device, as a picture. On the cover it is foil under a moving lamp;
   here the page is flat and unlit, so it is simply the mark. */
.doc__mark {
  display: block;
  width: clamp(120px, 22vw, 190px);
  height: auto;
  margin-bottom: clamp(20px, 4vh, 40px);
}

.doc__kicker {
  font-family: var(--font-meta);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: var(--track-meta-wide);
  text-transform: uppercase;
  color: var(--color-accent-base);
  margin-bottom: 1.4em;
}

.doc h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: var(--track-display);
  color: var(--color-text-primary);
}

.doc__lede {
  font-size: var(--t-lede);
  color: var(--color-text-secondary);
  margin-top: 1em;
  max-width: 48ch;
}

.doc__head { border-bottom: 1px solid var(--color-border-faint); padding-bottom: clamp(24px, 5vh, 56px); }

.doc__sec { padding: clamp(28px, 6vh, 64px) 0; border-bottom: 1px solid var(--color-border-faint); }

.doc h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--color-accent-light);
  margin-bottom: 0.9em;
}

.doc h3 {
  font-family: var(--font-meta);
  font-size: var(--t-meta);
  font-weight: 600;
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--color-text-body);
  margin: 2em 0 0.8em;
}

.doc p { color: var(--color-text-body); margin-bottom: 1em; max-width: 68ch; }
.doc__role { color: var(--color-accent-base); font-size: var(--t-small); }

.doc ul {
  columns: 2;
  column-gap: clamp(20px, 4vw, 54px);
  margin-bottom: 1.4em;
}
.doc ul li {
  break-inside: avoid;
  padding: 0.3em 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.05);
  color: var(--color-text-body);
  font-size: var(--t-small);
}

.doc dl { margin-top: 1em; }
.doc dt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-accent-light);
  margin-top: 1.2em;
}
.doc dd { margin: 0.4em 0 0; color: var(--color-text-body); }

.doc__person {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(18px, 3vw, 40px);
  align-items: start;
  padding: clamp(18px, 3vh, 34px) 0;
}
.doc__person img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(0.5) contrast(1.08) brightness(0.9);
}

.doc address {
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: 2;
}
.doc a { color: var(--color-accent-light); text-decoration: underline; text-underline-offset: 3px; }

.doc__foot {
  padding-top: clamp(24px, 4vh, 48px);
  font-family: var(--font-meta);
  font-size: var(--t-micro);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--color-text-faint);
}

@media (max-width: 640px) {
  .doc ul { columns: 1; }
  .doc__person { grid-template-columns: minmax(0, 1fr); }
  .doc__person img { max-width: 240px; }
}

/* ---------- when the experience is running ---------- */
html.js .doc {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- ...until a keyboard reaches it ----------
   The skip link targets it and its links can take focus; hidden, that
   put a focus ring on nothing (Phase 4.8 keyboard walk). While it holds
   focus, or is the skip link's target, it is shown as what it is: the
   written volume, a page over the experience, readable and scrollable.
   Focus leaving it hides it again. CSS only — nothing runs. */
html.js .doc:focus-within,
html.js .doc:target {
  position: fixed;
  inset: 0;
  z-index: 180;
  width: auto;
  height: auto;
  margin: 0;
  padding: clamp(48px, 9vh, 120px) max(var(--gutter), calc((100vw - 78ch) / 2)) clamp(64px, 12vh, 160px);
  overflow: auto;
  clip: auto;
  clip-path: none;
  white-space: normal;
  max-width: none;
  background: var(--color-bg-void);
}

/* ---------- print: only the document ---------- */
@media print {
  html.js .doc {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0 0 24pt;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    max-width: none;
  }
  .doc, .doc p, .doc li, .doc dd, .doc address { color: #111; }
  .doc h1, .doc h2, .doc dt { color: #000; }
  .doc h3 { color: #333; }
  .doc a { color: #000; }
  .doc__sec, .doc__head { border-color: #ccc; }
  .doc__person img { filter: grayscale(1); max-width: 120pt; }
  .doc__mark { width: 90pt; }
}


/* the contact form in the written version (Phase 5.6) */
.doc__formhead { margin-top: 2em; }
.doc__form { max-width: 60ch; margin-top: 1em; }
.doc .cf__l { font-size: var(--t-small); }

/* the first-visit notice: disclaimer and cookies (Phase 5.8, consent.js) */
.notice {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 200;
  width: min(940px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px 14px 22px;
  background: rgb(12 10 8 / 0.94);
  box-shadow: inset 0 0 0 1px rgb(214 168 104 / 0.34), 0 24px 60px -20px rgb(0 0 0 / 0.9);
  color: var(--color-text-secondary);
  transform: translate3d(-50%, 18px, 0);
  opacity: 0;
  transition: opacity 500ms var(--ease-editorial), transform 700ms var(--ease-arrive);
}
.notice.is-on { opacity: 1; transform: translate3d(-50%, 0, 0); }
.notice__t { margin: 0; font-size: 0.86rem; line-height: 1.55; }
.notice__t b { color: var(--color-text-primary); font-weight: 400; }
.notice__t a { color: var(--color-accent-light); }
.notice__ok {
  flex: 0 0 auto;
  padding: 12px 18px;
  border: 0;
  background: linear-gradient(160deg, #2c2116, #17110c);
  box-shadow: inset 0 0 0 1px rgb(214 168 104 / 0.55);
  color: var(--color-text-primary);
  font-family: var(--font-meta);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: var(--track-meta-wide);
  text-transform: uppercase;
  cursor: pointer;
}
.notice__ok:hover, .notice__ok:focus-visible { box-shadow: inset 0 0 0 1px rgb(236 200 140 / 0.95); }
@media (max-width: 720px) {
  .notice { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
  .notice__t { font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) { .notice { transition: none; } }
