/* 4 EYES CLUB — magazine spread design system v2.
   Real magazine feel: section theming, openers, running heads, folios. */

/* Section accent colors */
.mag-page[data-section="Frame Finder"] { --sec: #B4762A; }
.mag-page[data-section="Trend Radar"] { --sec: #FF5A1F; }
.mag-page[data-section="Lens Lab"] { --sec: #2A7FB4; }
.mag-page[data-section="Style & Culture"] { --sec: #C2438F; }
.mag-page[data-section="Smart Buys"] { --sec: #2E9E5B; }
.mag-page[data-section="The Craft"] { --sec: #8A5A2A; }
.mag-page[data-section="Club Quiz"] { --sec: #FF5A1F; }
.mag-page[data-section="Glossary"] { --sec: #6E6558; }
.mag-page[data-section="Next Issue"] { --sec: #FF5A1F; }
.mag-page[data-section="Back Cover"] { --sec: #FF5A1F; }
.mag-page[data-section="Editor's Letter"] { --sec: #B4762A; }
.mag-page { --sec: #FF5A1F; }

/* Text-safe variants of each section accent (>=4.5:1 on white/bone). --sec stays
   for graphics (rules, borders, badges); --sec-ink for all text. */
.mag-page[data-section="Frame Finder"] { --sec-ink: #8A5A1E; }
.mag-page[data-section="Trend Radar"] { --sec-ink: #B53308; }
.mag-page[data-section="Lens Lab"] { --sec-ink: #226B9B; }
.mag-page[data-section="Style & Culture"] { --sec-ink: #C2438F; }
.mag-page[data-section="Smart Buys"] { --sec-ink: #1F7A43; }
.mag-page[data-section="The Craft"] { --sec-ink: #8A5A2A; }
.mag-page[data-section="Club Quiz"] { --sec-ink: #B53308; }
.mag-page[data-section="Glossary"] { --sec-ink: #6E6558; }
.mag-page[data-section="Next Issue"] { --sec-ink: #B53308; }
.mag-page[data-section="Back Cover"] { --sec-ink: #B53308; }
.mag-page[data-section="Editor's Letter"] { --sec-ink: #8A5A1E; }
.mag-page { --sec-ink: #B53308; }

/* AC04: small caps labels in magazine pages always use the AA-safe ink variant;
   links in magazine body text are underlined, never colour alone */
.mag-page .mag-section, .mag-page .toc-sec { color: var(--sec-ink); }
.mag-page p.body-text a, .mag-page .mag-body-pad p a { text-decoration: underline; text-underline-offset: 2px; }

.mag-hero { padding: 56px 24px 8px; }
.mag-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  text-transform: uppercase;
  margin: 0 0 12px;
}

.mag-toc { padding: 32px 24px; }
.mag-toc h2 {
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}
.toc-list li { break-inside: avoid; margin-bottom: 2px; }
.toc-list a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 4px;
  color: var(--ink);
  border-bottom: 1px dotted var(--line);
  font-size: 0.95rem;
}
.toc-list a:hover { color: var(--pop-deep); text-decoration: none; }
.toc-num {
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: var(--sec-ink, var(--pop-deep));
  min-width: 2.2em;
}
.toc-sec {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-left: auto;
  padding-left: 12px;
}

.mag-reader { padding: 24px; max-width: 880px; }

.mag-page { display: none; }
.mag-page.active { display: block; animation: mag-in 0.35s ease; }
@keyframes mag-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

.mag-page-inner {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  min-height: 60vh;
  box-shadow: 0 20px 50px rgba(27,23,18,0.10);
  position: relative;
  overflow: hidden;
}

/* Running head */
.mag-running {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 34px 0;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.mag-running .mag-running-sec { color: var(--sec-ink); }

/* Folio */
.mag-folio {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 34px 22px;
  margin: 26px 0 0;
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sec-ink);
}
.mag-folio::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--sec);
  margin-left: 14px;
  opacity: 0.35;
}

.mag-body-pad { padding: 26px 44px 6px; }

/* Section kicker */
.mag-section {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sec-ink);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mag-section::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--sec);
  display: inline-block;
}

.mag-page h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0 0 12px;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.mag-dek {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #3A332B;
  margin: 0 0 26px;
  line-height: 1.5;
}
.mag-byline {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8A5A2A;
  margin: -14px 0 26px;
}

.mag-page-inner p.body-text { font-size: 1.06rem; line-height: 1.75; }

.mag-dropcap::first-letter {
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 3.6em;
  font-weight: 700;
  float: left;
  line-height: 0.82;
  padding-right: 12px;
  padding-top: 4px;
  color: var(--sec-ink);
}

.mag-page blockquote {
  border: none;
  border-left: 5px solid var(--sec);
  margin: 2.2em 0 1em;
  padding: 0.6em 0 0.6em 1.4em;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.4;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(0,0,0,0.025), transparent 70%);
}

/* Section opener spread */
.mag-opener-img {
  margin: 0;
  position: relative;
}
.mag-opener-img img { width: 100%; aspect-ratio: 16 / 8.5; object-fit: cover; }
.mag-opener-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(27,23,18,0.55));
}
.mag-opener-kicker {
  position: absolute;
  bottom: 18px;
  left: 34px;
  z-index: 2;
  margin: 0;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.mag-opener .mag-body-pad { padding-top: 30px; }
.mag-opener h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  text-transform: uppercase;
  line-height: 0.98;
}

/* Cover + back cover */
.mag-cover-full { margin: 0; }
.mag-cover-full img { width: 100%; display: block; }

/* Inline prev/next */
.mag-inline-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding: 16px 4px;
}
.mag-inline-nav a {
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 720px) {
  .toc-list { columns: 1; }
  .mag-reader { padding: 12px; }
  .mag-body-pad { padding: 22px 24px 4px; }
  .mag-running { padding: 14px 20px 0; }
  .mag-folio { padding: 0 20px 18px; }
  .mag-opener-kicker { left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .mag-page.active { animation: none; }
}

/* ============ v3: layout archetype system ============ */

/* Shared figure treatment */
.mag-page figure { margin: 0; }
.mag-page figcaption {
  font-size: 0.82rem; color: var(--muted); font-style: italic;
  padding: 10px 28px 0; line-height: 1.5;
}

/* FEATURE: 16:9 hero image, headline below */
.mag-feat-img img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
  border-radius: 10px 10px 0 0;
}
.mag-feat-img { margin-bottom: 6px; }

/* SPLIT: image beside text */
.mag-split {
  display: grid; grid-template-columns: 5fr 6fr; gap: 0;
  align-items: start;
}
.mag-split.flip { grid-template-columns: 6fr 5fr; }
.mag-split.flip .mag-split-img { order: 2; }
.mag-split-img { margin: 0; }
/* Never crop faces/glasses in split layouts: show the full image */
.mag-split-img img {
  width: 100%; height: auto; display: block;
}
.mag-split-text { padding: 34px 34px 30px; }
.mag-split-text h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.mag-pull-sm {
  border-left: 4px solid var(--sec); margin: 22px 0 0; padding: 4px 0 4px 18px;
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 1.12rem; line-height: 1.55; color: var(--ink);
}

/* IMAGEBREAK: full-bleed photo, title overlaid */
.mag-imagebreak { position: relative; margin: 0; }
.mag-imagebreak img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
  border-radius: 10px 10px 0 0;
}
.mag-imagebreak::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px 10px 0 0;
  background: linear-gradient(to top, rgba(10,8,6,0.82) 0%, rgba(10,8,6,0.25) 45%, transparent 70%);
}
.mag-imagebreak-title {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 26px 34px 20px; color: #fff;
}
.mag-imagebreak-title h1 {
  color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); margin: 6px 0 0;
  text-transform: uppercase; letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0,0,0,0.5);
}
.mag-imagebreak-title .mag-section.light { color: var(--sec); filter: brightness(1.35); }
.mag-imagebreak figcaption {
  position: absolute; z-index: 2; top: 14px; left: 18px; right: 18px; margin: 0;
  color: rgba(255,255,255,0.94); font-size: 0.8rem; font-style: italic; line-height: 1.45;
  text-shadow: 0 1px 10px rgba(0,0,0,0.65);
}

/* QUOTE: giant pull quote leads */
.mag-quote-xl {
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(1.6rem, 4.2vw, 2.6rem); line-height: 1.3; font-style: italic;
  color: var(--ink); margin: 6px 0 26px; padding: 0;
  border: none; position: relative;
}
.mag-quote-xl::before {
  content: "\201C"; display: block; font-size: 4.2rem; line-height: 0.6;
  color: var(--sec-ink); margin-bottom: 14px; font-style: normal;
}
[data-arch="quote"] h1 { font-size: clamp(1.4rem, 3vw, 2rem); }

/* COLUMNS: two-column body text */
.mag-cols2 { columns: 2; column-gap: 34px; }
.mag-cols2 p { break-inside: avoid; }
.mag-cols2 p:first-child { margin-top: 0; }

/* CALLOUT: text + tinted sidebar */
.mag-callout-grid {
  display: grid; grid-template-columns: 7fr 4fr; gap: 30px;
  padding: 34px 34px 30px; align-items: start;
}
.mag-callout-main h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-top: 0; }
.mag-callout-box {
  background: color-mix(in srgb, var(--sec) 10%, var(--white));
  border-top: 5px solid var(--sec); border-radius: 0 8px 8px 8px;
  padding: 22px 20px; position: sticky; top: 20px;
}
.mag-callout-box::before {
  content: "CLUB NOTE"; display: block; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.18em; color: var(--sec-ink); margin-bottom: 10px;
}
.mag-callout-box p {
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 1.08rem; line-height: 1.6; margin: 0; color: var(--ink);
}

/* Standard pull quote (feature pages) */
.mag-pull {
  border: none; margin: 28px 0; padding: 6px 0 6px 24px;
  border-left: 5px solid var(--sec);
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: clamp(1.25rem, 2.8vw, 1.6rem); line-height: 1.5; color: var(--ink);
}

/* QUIZ */
.quiz-q {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px 22px; margin: 0 0 18px;
}
.quiz-qtext { font-weight: 700; font-size: 1.08rem; margin: 0 0 12px; line-height: 1.5; }
.quiz-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9em; height: 1.9em; border-radius: 50%;
  background: var(--sec-ink); color: #fff; font-size: 0.85rem; margin-right: 10px;
}
.quiz-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quiz-opts li {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.97rem; line-height: 1.5;
}
.q-opt-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7em; height: 1.7em; border-radius: 6px; font-weight: 800; font-size: 0.8rem;
  background: color-mix(in srgb, var(--sec) 14%, var(--white)); color: var(--ink);
  margin-right: 10px;
}

/* GLOSSARY */
.mag-gloss { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 34px; margin: 8px 0 0; }
.gloss-item { break-inside: avoid; padding: 12px 0; border-bottom: 1px dotted var(--line); }
.gloss-item dt {
  font-weight: 800; font-size: 1.02rem; color: var(--ink); margin-bottom: 3px;
}
.gloss-item dt::after { content: ""; display: block; width: 26px; height: 3px; background: var(--sec); margin-top: 5px; }
.gloss-item dd { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--ink); }

/* Archetype headline variety */
[data-arch="feature"] h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
[data-arch="columns"] h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
[data-arch="callout"] .mag-section { margin-bottom: 2px; }

/* QUIZ RESULTS (p095) */
.quiz-results { margin-top: 28px; border-top: 3px solid var(--sec); padding-top: 22px; }
.quiz-results > h2 {
  font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px;
}
.quiz-key { font-size: 1.02rem; line-height: 1.7; margin-bottom: 18px; }
.quiz-result {
  background: var(--bone); border: 1px solid var(--line); border-left: 5px solid var(--sec);
  border-radius: 0 8px 8px 0; padding: 16px 20px; margin: 0 0 14px;
}
.quiz-result h3 {
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--sec-ink); margin: 0 0 6px;
}
.quiz-result p { margin: 0; font-size: 0.98rem; line-height: 1.65; }

/* Skip link */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bone); font-weight: 800;
  padding: 12px 20px; border-radius: 0 0 6px 6px; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 0; outline: 3px solid var(--pop); outline-offset: 2px; color: var(--bone); }

/* Keyboard focus */
:focus-visible { outline: 3px solid var(--pop-deep); outline-offset: 3px; border-radius: 2px; }

/* Responsive */
@media (max-width: 720px) {
  .mag-split, .mag-split.flip { grid-template-columns: 1fr; }
  .mag-split.flip .mag-split-img { order: 0; }
  .mag-split-img img { min-height: 0; height: auto; aspect-ratio: auto; }
  .mag-cols2 { columns: 1; }
  .mag-callout-grid { grid-template-columns: 1fr; }
  .mag-callout-box { position: static; }
  .mag-gloss { grid-template-columns: 1fr; }
}

/* Correction notice (pages fixed after publication — see Standards & Corrections) */
.mag-corrected {
  margin-top: 2.2em; padding: 10px 14px; border: 1px solid var(--line, #DED5C2);
  border-left: 4px solid var(--pop-deep, #B53308); background: rgba(0,0,0,0.03);
  font-size: 0.88rem; font-style: italic;
}

/* Optician oversight credit (Lens Lab section) */
.mag-oversight {
  margin-top: 2.2em; padding: 10px 14px; border: 1px solid var(--line, #DED5C2);
  border-left: 4px solid #2A7FB4; background: rgba(42,127,180,0.05);
  font-size: 0.88rem; font-weight: 600;
}

/* Sources lines appended to fact-dense magazine pages */
.mag-sources{font-size:.85rem;line-height:1.5;opacity:1;color:#4A3826;border-top:1px solid rgba(27,23,18,.18);margin-top:2rem;padding-top:1rem}
.mag-sources a{text-decoration:underline;text-underline-offset:2px}

/* AC04: AA-contrast links in sources lines and read views; lens-compare labels */
.mag-sources a { color: #7A2E0E; }
.mag-reader .mag-page a, .mag-reader .mag-sources a { color: #7A2E0E; }
.lens-compare > div > p:first-child { color: #1F6391 !important; }

.mag-page h1 { text-transform: uppercase; }
.mag-date { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.6; margin: 2px 0 10px; }
.mag-share { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 6px; font-size: 0.92rem; font-weight: 700; }
.mag-share span { text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.65; }
.mag-share a { color: #7A2E0E; }
.mag-page .body-text a, .mag-sources a, .reader-page a, .reader-intro .lede-ish a { text-decoration: underline; text-underline-offset: 2px; }
