/* special.css — the "what makes it special" page (/what-makes-it-special).
   Rides on direct.css for the brand tokens and on home.css for the header,
   footer, buttons and section rhythm. This file adds the one thing the page is
   about: a portrait whose details are marked as REGIONS, a veil that takes the
   rest of the picture down a little while one is being looked at, and a card
   that says where that detail came from.
   The same veil answers to the feature list under the picture, so hovering a
   feature and hovering a region look identical — that is the page's argument.
   Light theme only — the warm paper IS the brand (docs/BRAND.md). */

.special-main { max-width: 68rem; }
.special-main .page-hero { padding-bottom: 1.6rem; }
.special-main .page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.special-main .lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 40rem; }
.special-main .hint { font-size: .9rem; color: var(--ink-faint); margin-top: .6rem; }
.special-main a { color: var(--accent); text-underline-offset: 3px; }
.special-main a:hover { color: var(--accent-deep); }
.special-main a.btn { color: #fff; }

/* ---- the picture and its cards ----
   .anatomy is the positioning context for the cards on a wide screen. .stage is
   the picture itself: everything inside is placed in percentages of the picture,
   so the regions and the veil's holes stay on their details at any width. */
.anatomy {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 2rem;
  align-items: start;
}
.stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-card);
  max-width: 38rem;
  justify-self: center;
  width: 100%;
  cursor: default;
}
.stage img { display: block; width: 100%; height: auto; }

/* The veil: a dark sheet over the picture with holes cut where the active
   details are. An SVG mask rather than clip-path so the holes can be several,
   rounded, and turned on by class alone. Off by default, and deliberately light
   — the point is to settle the rest of the picture, not to black it out. */
.veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 1;
}
.stage.lit .veil { opacity: 1; }
.veil .hole { visibility: hidden; }
.veil .hole.on { visibility: visible; }

/* A detail is a REGION of the picture, not a pin stuck on it. At rest only the
   small hollow ring shows, so thirteen of them sit quietly over the artwork;
   hover draws the outline around the whole thing. The button is the size of the
   detail, which also makes it a generous target. */
.reg {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .18s ease, background .18s ease;
}
.reg:hover, .reg.on {
  border-color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .06);
}
.reg:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ring {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .88);
  background: rgba(30, 22, 16, .28);
  box-shadow: 0 0 0 1px rgba(30, 22, 16, .35);
  transition: background .18s ease, transform .18s ease;
}
.reg:hover .ring, .reg.on .ring { background: var(--accent); transform: scale(1.15); }
.stage.lit .reg:not(.on) .ring { opacity: .3; }

/* The cards. One per detail, all in the document; only the active one shows.
   Wide screen: in the column beside the picture, level with its region (the --y
   the script sets). Phone: the dock at the bottom of the screen — see below. */
.cards { position: relative; min-height: 1px; }
.card-detail {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(42, 36, 32, .12);
  width: 17rem;
  max-width: 100%;
}
.card-detail[hidden] { display: none; }
.from {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .5rem;
}
.from.quiet { color: var(--ink-faint); }
.card-detail img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 11rem;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: .7rem;
  background: var(--paper-sunk);
}
.card-detail h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 .35rem;
}
.card-detail p { font-size: .92rem; margin: 0; color: var(--ink-soft); }
.card-detail blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 .6rem;
  padding-left: .9rem;
  border-left: 2px solid var(--accent);
}

/* What the column says before anything is chosen, so it is never an empty hole. */
.resting {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.resting[hidden] { display: none; }
.resting .big { font-family: var(--serif); font-size: 2.1rem; line-height: 1; margin: 0 0 .2rem; }
.resting .big-note { font-size: .92rem; color: var(--ink-soft); margin: 0 0 1rem; }
.resting ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.resting li { font-size: .92rem; color: var(--ink-soft); }
.resting .num { font-family: var(--serif); color: var(--accent); font-size: 1.05rem; margin-right: .5rem; }

/* The close button belongs to the phone dock only. */
.dock-close {
  display: none;
  position: absolute;
  top: .55rem;
  right: .7rem;
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  padding: .3rem;
  cursor: pointer;
  line-height: 0;
}
.dock-close:hover { color: var(--accent-deep); }

@media (min-width: 861px) {
  .cards { position: sticky; top: 1.5rem; }
  .card-detail { position: absolute; left: 0; top: var(--y, 0); }
  /* Sticky does the vertical work: the column scrolls with the picture and the
     card sits at the region's height, clamped by the script so it never runs off
     the picture's bottom. */
}

/* ---- the cue between the picture and the list ---- */
.scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin: 1.8rem 0 0;
  color: var(--ink-faint);
  font-size: .85rem;
}

/* ---- the feature list ----
   Each feature lights its details in the picture, and carries the same source
   thumbnails the card shows, so the list reads as visually as the card does. */
.features h2 { margin-bottom: .4rem; }
.features .intro { color: var(--ink-soft); margin-bottom: 1.6rem; max-width: 40rem; }
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem 1.4rem;
}
.feature {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: .85rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-card);
  padding: .95rem 1.1rem;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.feature:hover, .feature.on, .feature:focus-within {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.feat-tiles { display: flex; flex-direction: column; gap: .3rem; }
.feat-tiles img,
.feat-tiles .tile {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--paper-sunk);
}
/* Two marks stand in where a detail came from words rather than a photograph:
   a quote for text painted letter for letter, lines for the conversation. */
.tile-quote {
  font-family: var(--serif);
  color: var(--accent);
  background: var(--accent-wash);
  border-color: #E8D2C2;
  font-size: 1.3rem;
  line-height: 1;
  text-align: center;
  padding-top: .55rem;
}
.tile-talk {
  color: var(--ink-faint);
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.feature h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 .3rem;
}
.feature h3 button {
  /* The clickable part is a real button, styled as the heading, so keyboards
     and screen readers get it. */
  all: unset;
  cursor: pointer;
  display: block;
}
.feature h3 button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.feature p { font-size: .94rem; color: var(--ink-soft); margin: 0; }

/* ---- the rest of the page ---- */
.special-main section { padding: 2.8rem 0; }
.special-main section.picture { padding-top: 1rem; padding-bottom: 1.6rem; }
.special-main section + section { border-top: 1px solid var(--line); }
.special-main section.features { border-top: 1px solid var(--line); }
.special-main h2 { font-size: 1.55rem; margin: 0 0 1rem; }
.dont { max-width: 46rem; }
.dont ul { list-style: none; margin: 0; padding: 0; }
.dont li { padding: .8rem 0; border-top: 1px solid var(--line); font-size: 1rem; }
.dont li:first-child { border-top: none; padding-top: 0; }
.made { max-width: 46rem; }
.made p { font-size: 1rem; }
.made .fine { font-size: .88rem; color: var(--ink-faint); }
.cta-card { text-align: center; padding: 2rem; }
.cta-card h2 { margin-bottom: .6rem; }
.cta-card p { color: var(--ink-soft); margin-bottom: 1.3rem; }

@media (max-width: 860px) {
  .anatomy { grid-template-columns: 1fr; gap: 1rem; }
  .stage { max-width: none; }
  .feature-list { grid-template-columns: 1fr; }
  .special-main section { padding: 2rem 0; }
  .ring { width: 13px; height: 13px; }

  /* The dock. A phone has no room for a column beside the picture, and a card
     that opens somewhere up the page is a card the reader has to go looking for.
     So the answer always arrives in the same place: a bar at the bottom of the
     screen that holds the scroll cue until a detail takes it over. */
  .cards {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--paper-card);
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 26px rgba(42, 36, 32, .14);
    max-height: 52vh;
    overflow-y: auto;
  }
  body:not(.detail-open) .cards { display: none; }
  .card-detail {
    width: auto;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 1.1rem 1.1rem 1.5rem;
  }
  .card-detail img { max-height: 8rem; }
  .resting { display: none; }
  .dock-close { display: block; }

  .scroll-cue {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 39;
    margin: 0;
    padding: 1rem;
    background: var(--paper-card);
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 26px rgba(42, 36, 32, .14);
    color: var(--ink-soft);
    font-size: .9rem;
  }
  /* Gone once a detail has the bar, and gone once the list it points at is on
     screen — a cue to scroll somewhere you are already looking is noise. */
  body.detail-open .scroll-cue,
  body.features-seen .scroll-cue { display: none; }

  /* Room under the last section so the fixed bar never covers it. */
  .special-main { padding-bottom: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .veil, .reg, .ring, .feature { transition: none; }
}
