/* ═══════════════════════════════════════════════════════════════════════════
   THE FRAMED WORD - design system
   ═══════════════════════════════════════════════════════════════════════════

   The design plan (per the highend-web-design skill), recorded here so the
   next session extends it instead of fighting it:

   Concept   A gallery wall. The page ground is the wall; the art sits in
             drawn gilt frames with real mats and real proportions (8.5x11 and
             11x17); titles live on placards beneath, like a hung show. While
             the collection is being framed, the frames hang empty and say so:
             the waiting slot IS the brand.

   One bold  The hero: a single large empty frame holding the brand statement
   element   as if it were the plate of an engraving. Everything else stays
             quiet around it.

   Colour    gallery  #F6F4EF  the wall; page ground
   roles     ink      #211D18  warm umber near-black; all text
             lapis    #2B3C8C  ultramarine, the historic pigment of sacred art;
                               INTERACTION ONLY: links, buttons, focus ring
             gilt     #B08D3E  FRAMES AND PLACARDS ONLY, never UI, never text
             mat      #FFFEFA  mat board; frame interiors and placards
             A hex outside this block is a bug.

   Type      Fraunces (display; headings, wordmark, placard titles, drop cap)
             Public Sans (text; body, nav, buttons, captions)

   Physics   Shadows exist only where the real world puts them: under frames
             and placards. Nothing else casts one.

   Not used  on purpose (the tells): all-caps eyebrow labels, middle-dot metas,
   here      appended arrows, per-card shadow kit, entrance animations,
             terracotta-on-cream, numbered markers on non-sequences.
   ═══════════════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..700&family=Public+Sans:wght@400;500;600;700&display=swap");

:root {
  --gallery: #f6f4ef;
  --gallery-deep: #edeae1;
  --ink: #211d18;
  --ink-soft: #5c554a;
  --ink-faint: #8a8172;
  --lapis: #2b3c8c;
  --lapis-deep: #1f2d6b;
  --lapis-wash: rgba(43, 60, 140, 0.08);
  --gilt: #b08d3e;
  --gilt-deep: #8a6d2c;
  --gilt-hi: #d8bc7a;
  --mat: #fffefa;
  --line: rgba(33, 29, 24, 0.16);
  --line-soft: rgba(33, 29, 24, 0.09);
  --frame-shadow: 0 18px 38px -18px rgba(33, 29, 24, 0.45), 0 4px 10px -4px rgba(33, 29, 24, 0.25);
  --plate-shadow: 0 2px 6px -2px rgba(33, 29, 24, 0.3);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Public Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--gallery);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* The wall has texture if you look: a faint plaster grain, nothing more. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(33, 29, 24, 0.028) 1px, transparent 1px);
  background-size: 26px 26px;
}

a {
  color: var(--lapis);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(43, 60, 140, 0.35);
}

a:hover {
  color: var(--lapis-deep);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--lapis);
  outline-offset: 3px;
  border-radius: 1px;
}

img {
  max-width: 100%;
  display: block;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 460;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variation-settings: "opsz" 100;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.1rem);
  max-width: 22ch;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  max-width: 26ch;
}

h3 {
  font-size: 1.32rem;
  line-height: 1.25;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--mat);
  font-size: 0.85rem;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Anchored sections land clear of the sticky masthead. */
section[id],
h2[id],
h3[id] {
  scroll-margin-top: 96px;
}

/* ── Shell ─────────────────────────────────────────────────────────────────── */

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Masthead ──────────────────────────────────────────────────────────────── */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  background: color-mix(in srgb, var(--gallery) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.28rem;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--ink);
}

/* The logo device: the o of "Word" sits inside its own tiny gilt frame. */
.wordmark-o {
  display: inline-block;
  border: 1.5px solid var(--gilt);
  padding: 0 0.05em;
  margin: 0 0.03em;
  line-height: 1.05;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--gilt);
}

.nav-toggle {
  display: none;
}

.nav-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--mat);
}

.nav-button span {
  display: block;
  height: 2px;
  background: var(--ink);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  background: var(--lapis);
  border: 1px solid var(--lapis);
  color: var(--mat);
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--lapis-deep);
  border-color: var(--lapis-deep);
  color: var(--mat);
}

.button.quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.button.quiet:hover {
  border-color: var(--ink);
  background: var(--mat);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.75rem;
}

/* ── The frames ────────────────────────────────────────────────────────────── */
/* Three nested layers, matching a real frame: a gilt moulding, a bevel, a mat.
   The only shadows on the site hang here. */

.frame {
  display: block;
  padding: clamp(10px, 2.2vw, 18px);
  background:
    linear-gradient(135deg, var(--gilt-hi) 0%, var(--gilt) 34%, var(--gilt-deep) 72%, var(--gilt) 100%);
  border: 1px solid var(--gilt-deep);
  box-shadow: var(--frame-shadow);
}

.mat {
  display: block;
  height: 100%;
  padding: clamp(14px, 3vw, 30px);
  background: var(--mat);
  box-shadow:
    inset 0 0 0 1px rgba(33, 29, 24, 0.12),
    inset 0 2px 8px rgba(33, 29, 24, 0.12);
}

.mat img,
.mat .mat-empty {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The waiting slot: bare canvas weave behind a bevel, honest about being empty. */
.mat-empty {
  background:
    repeating-linear-gradient(0deg, rgba(33, 29, 24, 0.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(33, 29, 24, 0.035) 0 1px, transparent 1px 4px),
    var(--gallery-deep);
  box-shadow: inset 0 0 0 1px rgba(33, 29, 24, 0.1);
}

.hung {
  margin: 0;
  break-inside: avoid;
}

/* True print proportions, held by the artwork area. */
.frame-lg .mat > * {
  aspect-ratio: 11 / 17;
}

.frame-sm .mat > * {
  aspect-ratio: 8.5 / 11;
}

/* The placard beneath each frame, engraved-plate style. */
.plate {
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 14px auto 0;
  padding: 0.55rem 1.1rem;
  text-align: center;
  background: var(--mat);
  border: 1px solid var(--gilt);
  box-shadow: var(--plate-shadow);
}

.plate-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ink);
}

.plate-line {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.plate-note {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

/* The salon hang: a columned wall, frames staggering naturally. */
.wall {
  columns: 3 250px;
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: 0.5rem 0;
}

.wall .hung {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-frame {
  justify-self: center;
  width: min(430px, 100%);
}

.hero-frame .mat > span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  aspect-ratio: 8.5 / 11;
  padding: clamp(1rem, 3vw, 1.75rem);
  text-align: center;
}

.hero-frame .engraving {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.35;
  color: var(--ink);
}

.hero-frame .engraving-rule {
  width: 44px;
  height: 1px;
  margin: 0 auto;
  background: var(--gilt);
}

.hero-frame .engraving-sub {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

/* The answer-first block: set like the opening of a chapter, with the page's
   single drop cap. Bookish on purpose; this is a shop for the Word on walls. */
.answer {
  max-width: 62ch;
  margin-top: 1.4rem;
  font-size: 1.11rem;
  line-height: 1.72;
  color: var(--ink);
}

.answer::first-letter {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 3.1em;
  line-height: 0.82;
  float: left;
  padding: 0.06em 0.12em 0 0;
  color: var(--lapis);
}

.lead {
  max-width: 60ch;
  margin-top: 1.1rem;
  color: var(--ink-soft);
}

/* ── Sections ──────────────────────────────────────────────────────────────── */

.section {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}

.section + .section {
  border-top: 1px solid var(--line-soft);
}

.section-head {
  max-width: 70ch;
  margin-bottom: 2rem;
}

.section-head p {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.band {
  background: var(--gallery-deep);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* ── Prose (the guides) ────────────────────────────────────────────────────── */

.prose {
  max-width: 68ch;
}

.prose p {
  line-height: 1.75;
}

.prose p + p,
.prose ul + p,
.prose p + ul,
.prose ol + p,
.prose p + ol {
  margin-top: 1.15rem;
}

.prose h3 {
  margin-top: 2.4rem;
  margin-bottom: 0.85rem;
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.3rem;
  line-height: 1.7;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose strong {
  font-weight: 650;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 2px solid var(--gilt);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
}

blockquote cite {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--font-text);
  font-style: normal;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.breadcrumb {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.breadcrumb ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: inline;
}

.breadcrumb li + li::before {
  content: " / ";
  color: var(--ink-faint);
}

.breadcrumb a {
  color: var(--ink-soft);
}

/* ── Comparison tables ─────────────────────────────────────────────────────── */

.table-scroll {
  overflow-x: auto;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  text-align: left;
  background: var(--mat);
  border: 1px solid var(--line);
}

table.compare caption {
  margin-bottom: 0.8rem;
  text-align: left;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-soft);
}

table.compare th,
table.compare td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

table.compare thead th {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  background: var(--gallery-deep);
}

table.compare tbody th {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.05rem;
  white-space: nowrap;
}

table.compare td {
  color: var(--ink-soft);
}

table.compare td strong {
  color: var(--ink);
}

/* ── FAQ ───────────────────────────────────────────────────────────────────── */

.faq {
  display: grid;
  gap: 0.65rem;
  max-width: 74ch;
}

.faq-item {
  background: var(--mat);
  border: 1px solid var(--line-soft);
}

.faq-item[open] {
  border-color: var(--line);
}

.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 54px;
  padding: 0.9rem 1.15rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.99rem;
  list-style: none;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  color: var(--lapis);
}

.faq-item[open] > summary::after {
  content: "\2013";
}

.faq-body {
  padding: 0 1.15rem 1.1rem;
}

.faq-body p {
  max-width: 68ch;
  line-height: 1.68;
  color: var(--ink-soft);
}

.faq-body p + p {
  margin-top: 0.85rem;
}

.faq-body strong {
  color: var(--ink);
}

/* ── Guide cards (cluster links) ───────────────────────────────────────────── */

.guides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem 1.4rem 1.3rem;
  background: var(--mat);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gilt);
  color: var(--ink);
  text-decoration: none;
}

.guide-card:hover {
  border-color: var(--ink);
  border-top-color: var(--gilt);
  color: var(--ink);
}

.guide-card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.6;
}

.guide-card .go {
  margin-top: auto;
  padding-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--lapis);
  text-decoration: underline;
  text-decoration-color: rgba(43, 60, 140, 0.35);
  text-underline-offset: 3px;
}

/* ── Provenance line ───────────────────────────────────────────────────────── */

.page-meta {
  margin-top: 2rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* ── Colophon ──────────────────────────────────────────────────────────────── */

.colophon {
  margin-top: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  background: var(--gallery-deep);
}

.colophon-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 2.25rem 0 2.5rem;
}

.colophon-brand {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.15rem;
}

.colophon p {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.colophon-brand + p {
  margin-top: 0.4rem;
}

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.colophon-links a {
  font-size: 0.92rem;
}

.colophon-credit {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.84rem;
  color: var(--ink-faint);
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .nav-button {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0.75rem 0.9rem;
    background: var(--gallery);
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem 0.25rem;
    font-size: 1.02rem;
    border-bottom: 1px solid var(--line-soft);
  }

  .site-nav a[aria-current="page"] {
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
    font-weight: 650;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-frame {
    order: -1;
    width: min(330px, 88%);
  }
}

@media (max-width: 860px) {
  table.compare caption {
    display: block;
    width: 100%;
  }

  table.compare thead {
    display: none;
  }

  table.compare,
  table.compare tbody,
  table.compare tr,
  table.compare th,
  table.compare td {
    display: block;
    width: 100%;
  }

  table.compare tbody tr {
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 0;
  }

  table.compare tbody th {
    white-space: normal;
    border-bottom: 1px solid var(--line-soft);
  }

  table.compare td {
    border-bottom: none;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  table.compare td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--ink-faint);
  }
}

@media (max-width: 640px) {
  .shell,
  .masthead,
  .colophon-inner {
    width: calc(100% - 32px);
  }

  .wall {
    columns: 2 150px;
  }

  .answer {
    font-size: 1.04rem;
  }

  .button {
    width: 100%;
  }
}
