/* ═══════════════════════════════════════════════════════════
   RING EVER AFTER · "Champagne Atelier" design system
   Espresso onyx · warm ivory · champagne gold · Marcellus caps
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=Jost:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #c09a58;            /* champagne gold */
  --gold-bright: #e8cf9a;     /* highlight gold */
  --gold-light: #d8bc88;
  --cream: #f9f5ee;           /* warm ivory */
  --cream-deep: #f1e9db;
  --dark: #181310;            /* espresso onyx */
  --dark-soft: #221b16;
  --text: #37312b;
  --muted: #7c7266;
  --border: #e7ddcd;
  --border-gold: rgba(192,154,88,0.35);
  --white: #ffffff;
  --shadow-soft: 0 10px 40px rgba(24,19,16,0.08);
  --shadow-lift: 0 18px 50px rgba(24,19,16,0.14);
  --serif: 'Marcellus', 'Cormorant Garamond', serif;
  --serif-italic: 'Cormorant Garamond', serif;
  --sans: 'Jost', sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--text);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

::selection { background: var(--gold); color: var(--white); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 48px;
  background: rgba(249,245,238,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.35s ease, background 0.35s ease;
}
nav.scrolled { box-shadow: 0 4px 30px rgba(24,19,16,0.09); background: rgba(249,245,238,0.97); }

.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 1; min-width: 0; }
.nav-logo img { height: 88px; width: auto; display: block; transition: height 0.3s ease; }
nav.scrolled .nav-logo img { height: 68px; }

.nav-center { display: flex; align-items: center; gap: 4px; list-style: none; }

.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 10px 16px;
  text-decoration: none; color: var(--text);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 400;
  transition: color 0.2s;
  position: relative;
}
.nav-item > a::before {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 6px;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-item > a:hover { color: var(--gold); }
.nav-item > a:hover::before { transform: scaleX(1); }
.nav-item:has(.nav-dropdown) > a::after {
  content: ' ▾'; font-size: 0.55rem; vertical-align: 2px; opacity: 0.55;
}

.nav-dropdown {
  visibility: hidden; opacity: 0; transform: translateY(8px);
  position: absolute; top: 100%; left: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  min-width: 235px; z-index: 300;
  box-shadow: var(--shadow-lift);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  padding: 6px 0;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { visibility: visible; opacity: 1; transform: translateY(0); }
.nav-dropdown a {
  display: block; padding: 11px 22px;
  text-decoration: none; color: var(--text);
  font-size: 0.8rem; letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
}
.nav-dropdown a:hover { background: var(--cream); color: var(--gold); padding-left: 27px; }

.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.nav-cta {
  background: var(--dark); color: var(--gold-bright);
  padding: 12px 26px; font-size: 0.7rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  border: 1px solid var(--dark);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px;
  background: none; border: none; cursor: pointer;
  padding: 8px; flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 24px; height: 1.5px;
  background: var(--dark);
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  color: rgba(249,245,238,0.5);
  padding: 80px 60px 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  overflow: hidden;
  position: relative;
}
footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}
.footer-col { min-width: 0; }
.footer-brand .footer-logo-link { display: inline-block; margin-bottom: 18px; }
.footer-brand .footer-logo-link img { height: 110px; width: auto; display: block; filter: brightness(0) invert(0.92) sepia(0.25); }
.footer-brand p { font-size: 0.87rem; line-height: 1.9; margin-bottom: 10px; max-width: 340px; }
footer h2 {
  font-family: var(--serif);
  font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 22px; font-weight: 400;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: 11px; }
footer ul a {
  text-decoration: none; color: rgba(249,245,238,0.5);
  font-size: 0.87rem; transition: color 0.2s, padding-left 0.2s; letter-spacing: 0.03em;
}
footer ul a:hover { color: var(--gold-bright); padding-left: 5px; }
.footer-social { display: flex; gap: 18px; margin-top: 18px; }
.footer-social a {
  color: rgba(249,245,238,0.4); text-decoration: none;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--gold-bright); }
.footer-bottom {
  background: var(--dark);
  margin: 0; padding: 26px 60px;
  border-top: 1px solid rgba(249,245,238,0.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.74rem; color: rgba(249,245,238,0.3);
  letter-spacing: 0.04em;
}
.footer-bottom a { color: rgba(249,245,238,0.3); text-decoration: none; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--gold); }

/* ── SECTION HELPERS ── */
.section-label {
  font-size: 0.66rem; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px; font-weight: 400;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 400; color: var(--dark); line-height: 1.22;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
/* Cormorant Garamond has a much smaller x-height than Marcellus, so italic
   accents need a size + weight bump to read as the same size as the roman text.
   line-height:1 keeps the taller glyphs from opening up the heading's line box. */
.section-title em, .page-hero h1 em, .hero h1 em, .cta-band h2 em {
  font-family: var(--serif-italic);
  font-style: italic; font-weight: 500;
  font-size: 1.16em; line-height: 1;
  color: var(--gold);
  letter-spacing: 0;
}
.section-sub {
  font-size: 0.95rem; color: var(--muted);
  max-width: 580px; line-height: 1.9;
}
.divider {
  width: 70px; height: 1px; margin: 22px 0;
  background: linear-gradient(90deg, var(--gold), transparent);
  position: relative;
}
.divider::after {
  content: '◆'; position: absolute; left: -3px; top: 50%;
  transform: translateY(-52%); font-size: 7px; color: var(--gold);
}
.section-header-center { text-align: center; max-width: 740px; margin: 0 auto 60px; }
.section-header-center .divider { margin: 20px auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.section-header-center .divider::after { left: 50%; transform: translate(-50%, -52%); }
.section-header-center .section-sub { margin: 0 auto; }

/* ── DIAMOND GUIDE NAV (shared by every guide page) ── */
.guide-nav { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-bottom:64px; }
.guide-nav a {
  padding:11px 24px; border:1px solid var(--border); border-radius:999px;
  font-size:0.68rem; letter-spacing:0.18em; text-transform:uppercase;
  text-decoration:none; color:var(--muted);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.guide-nav a:hover { border-color:var(--gold); color:var(--gold); }
.guide-nav a.active { background:var(--dark); color:var(--gold-bright); border-color:var(--dark); }

/* ── EDUCATION DIAGRAM (diamond guide pages) ── */
.edu-figure {
  background: linear-gradient(150deg, var(--cream) 0%, var(--cream-deep) 100%);
  border: 1px solid var(--border);
  padding: 44px 42px 38px;
  max-width: 1080px; margin: 0 auto;
}
.edu-figure-head { display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap; }
.edu-figure-head h2 {
  font-family: var(--serif); font-size: 1.8rem; font-weight: 400;
  color: var(--dark); letter-spacing: 0.14em; text-transform: uppercase;
}
.edu-figure-head p { font-size: 0.88rem; color: var(--muted); line-height: 1.7; flex: 1; min-width: 240px; }
/* Diagram rows are a grid of small self-contained SVGs so they reflow on
   narrow screens instead of forcing the page to scroll sideways. */
/* start-aligned so a label wrapping to two lines never shunts its diagram
   out of line with the others */
.dia-row { display: grid; gap: 22px; margin-top: 30px; align-items: start; }
.dia-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.dia-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.dia-row.cols-6 { grid-template-columns: repeat(6, 1fr); }
.dia-item { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.dia-art { width: 100%; max-width: 190px; margin: 0 auto; }
.dia-art svg { width: 100%; height: auto; display: block; }
/* equal-height box so differently sized stones share one baseline */
.dia-base { width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: flex-end; justify-content: center; }
.dia-base .dia-art { margin: 0; }
.dia-name {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--dark); margin-top: 14px;
}
.dia-note {
  font-family: var(--sans); font-size: 0.64rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-top: 5px; line-height: 1.55;
}
.dia-caption {
  text-align: center; font-family: var(--sans);
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-top: 28px;
}

/* colour rarity ramp */
.dia-ramp {
  height: 9px; margin: 28px 0 10px; border: 1px solid var(--border-gold);
  background: linear-gradient(90deg, #ffffff, #fdfaf2, #fbf1d8, #f7e6b0, #f2d888);
}
.dia-ramp-labels {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}

/* diagram primitives */
.dia-outline { fill: none; stroke: var(--gold); stroke-width: 1.3; stroke-linejoin: round; }
.dia-facet   { fill: none; stroke: var(--gold); stroke-width: 0.7; opacity: 0.4; }
.dia-ray     { fill: none; stroke: var(--dark); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: 0.75; }
.dia-head    { fill: var(--dark); opacity: 0.8; stroke: none; }
.dia-src     { fill: none; stroke: var(--dark); stroke-width: 1; opacity: 0.5; }
.dia-incl    { fill: var(--muted); opacity: 0.85; stroke: none; }
.edu-figure text { font-family: var(--sans); fill: var(--muted); }
.edu-figure text.dia-title { font-size: 10px; letter-spacing: 0.18em; fill: var(--dark); }
.edu-figure text.dia-sub   { font-size: 9px; letter-spacing: 0.1em; }
.edu-figure text.dia-grade { font-size: 13px; letter-spacing: 0.1em; fill: var(--dark); }

/* ── GRADE TABLE ── */
.grade-table {
  display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  margin-top: 30px;
}
.grade-cell { background: var(--white); padding: 22px 18px; text-align: center; }
.grade-cell h3 {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dark); margin-bottom: 10px;
}
.grade-cell p { font-size: 0.76rem; color: var(--muted); line-height: 1.75; }
/* The recommended cell stays white like the others so it never blends into the
   cream panel behind it; emphasis comes from a gold cap rule instead. */
.grade-cell.is-best { box-shadow: inset 0 3px 0 var(--gold); }
.grade-cell.is-best h3 { color: var(--gold); }

/* ── VIDEO BELOW THE DIAGRAM ── */
.edu-video { max-width: 900px; margin: 0 auto; }
.edu-video-frame {
  position: relative; aspect-ratio: 16/9; width: 100%;
  overflow: hidden; border: 1px solid var(--border); background: var(--cream-deep);
}
.edu-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── BUTTONS ── */
.btn-primary, .btn-outline, .btn-gold, .btn-white {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 40px; text-decoration: none;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  font-family: var(--sans); font-weight: 400;
  cursor: pointer; border: 1px solid transparent;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
  min-height: 50px;
}
.btn-primary { background: var(--dark); color: var(--gold-bright); border-color: var(--dark); }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--white); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(192,154,88,0.35); }
.btn-outline { border-color: var(--dark); color: var(--dark); background: transparent; }
.btn-outline:hover { background: var(--dark); color: var(--gold-bright); transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--white); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(192,154,88,0.4); }
.btn-white { background: var(--white); color: var(--dark); border-color: var(--white); }
.btn-white:hover { background: var(--dark); color: var(--gold-bright); border-color: var(--gold); transform: translateY(-2px); }

/* ── PAGE HERO (interior pages) ── */
.page-hero {
  padding: 190px 60px 90px;
  background:
    radial-gradient(ellipse 900px 420px at 78% -10%, rgba(192,154,88,0.16) 0%, transparent 60%),
    linear-gradient(160deg, var(--cream) 30%, var(--cream-deep) 100%);
  position: relative; overflow: hidden;
  text-align: center;
}
.page-hero::after {
  content: '';
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(520px, 70vw); height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  font-weight: 400; line-height: 1.15; color: var(--dark);
  max-width: 840px; margin: 0 auto 22px;
  letter-spacing: 0.02em;
}
.page-hero p { font-size: 1rem; color: var(--muted); max-width: 620px; line-height: 1.9; margin: 0 auto; }
.page-hero .divider { margin: 20px auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.page-hero .divider::after { left: 50%; transform: translate(-50%,-52%); }
.page-hero .section-label { margin-bottom: 14px; }

/* ── CTA BAND ── */
.cta-band {
  background:
    radial-gradient(ellipse 700px 320px at 50% 120%, rgba(232,207,154,0.22) 0%, transparent 65%),
    var(--dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 60px; gap: 32px;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(600px, 80vw); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.cta-band h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  color: var(--cream); font-weight: 400; line-height: 1.28;
  letter-spacing: 0.02em;
  position: relative; z-index: 1;
}
.cta-band h2 em { color: var(--gold-bright); }
.cta-band > a { position: relative; z-index: 1; }

/* ── FORMS ── */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea, .contact-form select {
  border: 1px solid var(--border); background: var(--white);
  padding: 15px 18px; font-family: var(--sans);
  font-size: 16px; color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
  border-radius: 0; -webkit-appearance: none; appearance: none;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(192,154,88,0.14);
}
.contact-form textarea { height: 130px; resize: vertical; }
/* radios and checkboxes must not inherit the full-width text-field styling,
   or they render as large empty boxes */
.contact-form input[type="radio"],
.contact-form input[type="checkbox"] {
  width: auto; min-width: 0; padding: 0; border: none;
  background: none; box-shadow: none;
  -webkit-appearance: auto; appearance: auto;
  accent-color: var(--gold); flex-shrink: 0;
}

/* ── IMG PLACEHOLDER (legacy) ── */
.img-placeholder {
  background: var(--cream-deep);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  color: var(--muted); text-align: center;
}
.img-placeholder .ph-icon { font-size: 2.5rem; opacity: 0.35; }
.img-placeholder .ph-label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; }

/* ── REVEAL ANIMATION ── */
.fade-in {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ── DIAMOND GLINT (hero sparkle) ── */
.glint {
  position: absolute; width: 3px; height: 3px; pointer-events: none;
  background: var(--gold-bright); border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(232,207,154,0.7);
  opacity: 0;
  animation: glint-twinkle var(--glint-dur, 4s) ease-in-out var(--glint-delay, 0s) infinite;
}
.glint::before, .glint::after {
  content: ''; position: absolute; background: rgba(232,207,154,0.85);
  left: 50%; top: 50%;
}
.glint::before { width: 15px; height: 1px; transform: translate(-50%,-50%); }
.glint::after { width: 1px; height: 15px; transform: translate(-50%,-50%); }
@keyframes glint-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 0.95; transform: scale(1); }
}

/* ── GOLD SHIMMER TEXT ── */
.shimmer-gold {
  background: linear-gradient(100deg, var(--gold) 20%, var(--gold-bright) 40%, #f6e8c4 50%, var(--gold-bright) 60%, var(--gold) 80%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold);
  animation: shimmer-slide 5.5s linear infinite;
}
@keyframes shimmer-slide {
  0% { background-position: 220% center; }
  100% { background-position: -20% center; }
}

/* ── CUT MARQUEE RIBBON ── */
.cut-ribbon {
  background: var(--dark); border-top: 1px solid rgba(192,154,88,0.25); border-bottom: 1px solid rgba(192,154,88,0.25);
  overflow: hidden; padding: 18px 0; position: relative;
}
.cut-ribbon-track {
  display: flex; gap: 0; width: max-content;
  animation: ribbon-scroll 38s linear infinite;
}
.cut-ribbon span {
  font-family: var(--serif);
  font-size: 0.82rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: rgba(232,207,154,0.75); white-space: nowrap;
  padding: 0 26px; display: inline-flex; align-items: center; gap: 26px;
}
.cut-ribbon span::after { content: '◆'; font-size: 7px; color: var(--gold); }
@keyframes ribbon-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .cut-ribbon-track { animation: none; } }

/* ── STICKY MOBILE CTA ── */
.mobile-cta-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 190;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(24,19,16,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(192,154,88,0.4);
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.mobile-cta-bar.show { transform: translateY(0); }
.mobile-cta-bar a {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--gold); color: var(--white);
  text-decoration: none; padding: 15px;
  font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase;
  transition: background 0.2s;
}
.mobile-cta-bar a:active { background: var(--gold-light); }

/* Keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}

/* ═══════════════════════════════════════
   TABLET  (≤960px)
═══════════════════════════════════════ */
@media (max-width: 960px) {
  nav { padding: 8px 16px; min-height: 66px; gap: 8px; }
  .nav-logo img, nav.scrolled .nav-logo img { height: 54px; }
  .nav-hamburger { display: flex; }

  /* Full-screen slide menu */
  .nav-center {
    position: fixed; top: 66px; left: 0; right: 0; bottom: 0;
    height: calc(100dvh - 66px);
    background: var(--cream);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 0 120px;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    transform: translateX(105%);
    transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
    display: flex; z-index: 250;
  }
  .nav-center.open { transform: translateX(0); }

  .nav-item { border-bottom: 1px solid var(--border); }
  .nav-item > a {
    padding: 18px 26px;
    font-size: 0.8rem; letter-spacing: 0.2em;
    font-family: var(--serif);
    color: var(--dark);
  }
  .nav-item > a::before { display: none; }
  .nav-item:has(.nav-dropdown) > a::after { content: ' +'; font-size: 0.85rem; float: right; opacity: 0.5; }
  .nav-item.mob-open:has(.nav-dropdown) > a::after { content: ' −'; }

  .nav-dropdown {
    visibility: visible; opacity: 1; transform: none;
    position: static; border: none; box-shadow: none;
    background: var(--cream-deep);
    min-width: 0; padding: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .nav-item.mob-open .nav-dropdown { max-height: 420px; }
  .nav-dropdown a { padding: 13px 40px; font-size: 0.86rem; }
  .nav-dropdown a:hover { padding-left: 40px; }

  .nav-cta { padding: 10px 16px; font-size: 0.64rem; letter-spacing: 0.14em; }

  .mobile-cta-bar { display: block; }

  footer { grid-template-columns: 1fr; padding: 60px 26px 0; gap: 40px; text-align: center; }
  .footer-brand .footer-logo-link img { height: 92px; margin: 0 auto; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-social { justify-content: center; }
  .footer-bottom { padding: 22px 26px calc(22px + 74px); flex-direction: column; gap: 8px; text-align: center; }

  .page-hero { padding: 130px 24px 60px; }
  .page-hero h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); }
  .page-hero p { font-size: 0.94rem; }

  .guide-nav { margin-bottom: 40px; gap: 8px; }
  .guide-nav a { padding: 9px 17px; font-size: 0.62rem; letter-spacing: 0.12em; }

  .edu-figure { padding: 26px 18px 22px; }
  /* stack the label above its description rather than cramming them side by side */
  .edu-figure-head { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
  .edu-figure-head h2 { font-size: 1.4rem; letter-spacing: 0.16em; }
  .edu-figure-head p { font-size: 0.84rem; min-width: 0; }
  .dia-row { gap: 14px; margin-top: 24px; }
  /* stays three across so every guide diagram reads the same way */
  .dia-row.cols-3 { gap: 8px; }
  .dia-art { max-width: 150px; }
  .dia-name { font-size: 0.62rem; letter-spacing: 0.1em; margin-top: 10px; }
  .dia-note { font-size: 0.56rem; letter-spacing: 0.02em; }
  .dia-caption { font-size: 0.6rem; letter-spacing: 0.1em; margin-top: 22px; }
  .dia-ramp { margin: 22px 0 8px; }
  .dia-ramp-labels { font-size: 0.54rem; letter-spacing: 0.05em; gap: 8px; }
  .grade-table { grid-template-columns: repeat(2, 1fr); margin-top: 22px; }
  .grade-cell { padding: 18px 14px; }
  .grade-cell p { font-size: 0.74rem; }
}

@media (max-width: 600px) {
  .dia-row.cols-5, .dia-row.cols-6 { gap: 6px; }
  .dia-name { font-size: 0.56rem; letter-spacing: 0.06em; }
  .dia-note { font-size: 0.5rem; }
  .grade-table { grid-template-columns: 1fr; }

  .section-title { font-size: clamp(1.6rem, 5.6vw, 2.3rem); }
  .section-header-center { margin-bottom: 40px; padding: 0 6px; }
  .section-sub { font-size: 0.92rem; }

  .cta-band { padding: 64px 26px; gap: 26px; }
  .cta-band h2 { font-size: clamp(1.55rem, 5.4vw, 2.1rem); }

  .cut-ribbon span { font-size: 0.72rem; padding: 0 18px; gap: 18px; }
}

/* ═══════════════════════════════════════
   PHONE (≤600px)
═══════════════════════════════════════ */
@media (max-width: 600px) {
  nav { min-height: 62px; padding: 6px 12px; }
  .nav-logo img, nav.scrolled .nav-logo img { height: 46px; }
  .nav-center { top: 62px; height: calc(100dvh - 62px); }
  .nav-cta { padding: 9px 13px; font-size: 0.6rem; }
  .nav-hamburger { width: 40px; height: 40px; }

  .page-hero { padding: 112px 18px 52px; }
  .page-hero h1 { font-size: clamp(1.75rem, 8vw, 2.3rem); margin-bottom: 16px; }
  .page-hero p { font-size: 0.9rem; }

  .section-title { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
  .section-sub { font-size: 0.88rem; }
  .section-header-center { margin-bottom: 32px; }
  .section-label { letter-spacing: 0.32em; font-size: 0.62rem; }

  .cta-band { padding: 54px 20px; gap: 22px; }

  .btn-primary, .btn-outline, .btn-gold, .btn-white {
    padding: 15px 28px; font-size: 0.7rem; min-height: 50px;
    width: 100%; max-width: 340px;
  }

  footer { padding: 48px 20px 0; gap: 34px; }
  .footer-brand .footer-logo-link img { height: 78px; }
}
