/* =========================================================================
   Dr. Vera Rubin — shared design system
   Prestigious / classical · Playfair Display + Hanken Grotesk
   ========================================================================= */

:root {
  /* color */
  --cream:      #F6F1E8;
  --cream-2:    #F1EADD;
  --paper:      #FCFAF5;
  --white:      #FFFFFF;
  --ink:        #211C18;
  --ink-soft:   #463F38;
  --muted:      #6E665C;
  --muted-2:    #8A8175;
  --line:       #E6DCCD;
  --line-soft:  #EFE8DB;
  --wine:       #6B1E2E;
  --wine-dark:  #561522;
  --wine-tint:  #F3E7E4;
  --wine-soft:  #9A4456;
  --gold:       #9C7A3C;

  /* type */
  --display: "Playfair Display", Georgia, serif;
  --body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(33,28,24,.04), 0 12px 32px -16px rgba(33,28,24,.18);
  --shadow-lg: 0 2px 4px rgba(33,28,24,.05), 0 30px 60px -28px rgba(33,28,24,.30);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

::selection { background: var(--wine); color: #fff; }

/* ---- type scale ---- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; color: var(--ink); margin: 0; line-height: 1.06; letter-spacing: -0.01em; }
.display {
  font-size: clamp(3rem, 7.5vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
h2.section-title { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.04; }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.12; }

.eyebrow {
  font-family: var(--body);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--wine);
  margin: 0;
}
.eyebrow.muted { color: var(--muted-2); }

.lead { font-size: clamp(1.12rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink-soft); }
.muted { color: var(--muted); }

p { margin: 0 0 1.1em; text-wrap: pretty; }

/* ---- layout ---- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1340px; margin-inline: auto; padding-inline: var(--gutter); }
section { position: relative; }
.section-pad { padding-block: clamp(64px, 9vw, 128px); }
.bg-cream { background: var(--cream); }
.bg-paper { background: var(--paper); }
.bg-ink   { background: var(--ink); color: var(--cream); }
.bg-wine  { background: var(--wine); color: #fff; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---- buttons ---- */
.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: .98rem;
  letter-spacing: .005em;
  display: inline-flex; align-items: center; gap: .6em;
  padding: 0.92em 1.5em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  line-height: 1;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--wine); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.btn-primary:hover { background: var(--wine-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(0,0,0,.02); }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-light:hover { background: rgba(255,255,255,.2); }
.btn-lg { padding: 1.05em 1.8em; font-size: 1.04rem; }
.btn-wa { background: #1f8a5b; color:#fff; }
.btn-wa:hover { background:#197049; transform: translateY(-1px); }

.link-arrow {
  font-weight: 600; color: var(--wine); text-decoration: none;
  display: inline-flex; align-items: center; gap: .45em;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: gap .18s ease, border-color .2s ease;
}
.link-arrow:hover { gap: .7em; border-color: var(--wine); }
.link-arrow svg { width: .9em; height: .9em; }

/* =====================  NAV  ===================== */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 0 var(--gutter);
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; }
.brand .mark {
  font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--ink);
  letter-spacing: -0.01em; white-space: nowrap;
}
.brand .mark .dr { color: var(--wine); }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav-links a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .98rem;
  position: relative; padding: 6px 0; white-space: nowrap;
}
.nav-links a.cta { display: none; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: var(--wine); transition: right .25s ease;
}
.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn)[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta { margin-left: 4px; }
/* win specificity over `.nav-links a` base padding/color */
.nav-links a.nav-cta { color: #fff; padding: .72em 1.25em; }
.nav-links a.nav-cta:hover { color: #fff; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-inner { height: 64px; position:relative; }
  .nav-toggle {
    display:grid; place-content:center; width:42px; height:42px; padding:0;
    border:1px solid var(--line); border-radius:var(--radius); background:var(--paper);
    color:var(--ink); cursor:pointer;
  }
  .nav-toggle span, .nav-toggle::before, .nav-toggle::after {
    content:""; display:block; width:19px; height:1.5px; background:currentColor;
    transition:transform .2s ease, opacity .2s ease;
  }
  .nav-toggle span { margin:5px 0; }
  .nav-open .nav-toggle span { opacity:0; }
  .nav-open .nav-toggle::before { transform:translateY(6.5px) rotate(45deg); }
  .nav-open .nav-toggle::after { transform:translateY(-6.5px) rotate(-45deg); }
  .nav-links {
    display:none; position:absolute; top:calc(100% + 1px); left:0; right:0;
    padding:16px var(--gutter) 22px; background:var(--paper); border-bottom:1px solid var(--line);
    box-shadow:var(--shadow); align-items:stretch; gap:0;
  }
  .nav-open .nav-links { display:flex; flex-direction:column; }
  .nav-links a, .nav-links a:not(.nav-cta) { display:block; padding:12px 0; font-size:1rem; }
  .nav-links a:not(.btn)::after { left:0; right:auto; width:28px; bottom:7px; }
  .nav-links a:not(.btn):hover::after, .nav-links a:not(.btn)[aria-current="page"]::after { right:auto; }
  .nav-links .nav-cta { margin:12px 0 0; width:max-content; padding:.8em 1.15em; }
}

/* =====================  FOOTER  ===================== */
.footer { background: var(--ink); color: var(--cream); padding-block: clamp(56px, 7vw, 88px) 40px; }
.footer a { color: var(--cream); text-decoration: none; opacity: .82; }
.footer a:hover { opacity: 1; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(246,241,232,.14);
}
.footer h4 { color: #fff; font-family: var(--body); font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.1rem; opacity: .65; }
.footer .mark { font-family: var(--display); font-size: 1.7rem; color:#fff; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.footer-bottom { display:flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; font-size: .85rem; opacity: .6; }
@media (max-width: 740px){ .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px){ .footer-grid { grid-template-columns: 1fr; } }

/* =====================  STAT STRIP  ===================== */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.stat {
  padding: clamp(28px, 3.5vw, 46px) clamp(20px, 2.6vw, 38px);
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 3.6vw, 3.3rem); line-height: 1; letter-spacing: -.02em; }
.stat .num span { color: var(--wine); }
.stat .lbl { margin-top: .6rem; color: var(--muted); font-size: .95rem; line-height: 1.35; }
@media (max-width: 820px){ .stat-strip { grid-template-columns: 1fr 1fr; } .stat:nth-child(2){border-right:0;} .stat:nth-child(1),.stat:nth-child(2){border-bottom:1px solid var(--line);} }
@media (max-width: 460px){ .stat-strip { grid-template-columns: 1fr; } .stat { border-right: 0; border-bottom: 1px solid var(--line);} .stat:last-child{border-bottom:0;} }

/* =====================  CARDS  ===================== */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(26px, 3vw, 40px);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); }

/* image placeholder slots */
.slot {
  background:
    repeating-linear-gradient(135deg, var(--cream-2) 0 14px, var(--cream) 14px 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid; place-content: center; text-align: center;
  color: var(--muted-2); position: relative; overflow: hidden;
}
.slot .tag {
  font-family: var(--body); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.7); padding: .5em .8em; border-radius: 100px; border: 1px solid var(--line);
}
image-slot {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--cream-2);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Local imagery for the visual prototype. */
.portrait-image { display:block; object-fit:cover; object-position:center; background:var(--cream-2); }
#hero-portrait { object-fit:contain; background:#a6a5a6; }
#rec-1, #rec-2, #rec-3 { background-image: url("assets/student-performance.jpg"); }

/* badges / chips */
.chip {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  padding: .42em .85em; border-radius: 100px;
  background: var(--wine-tint); color: var(--wine);
  border: 1px solid color-mix(in srgb, var(--wine) 16%, transparent);
}
.chip.neutral { background: var(--cream); color: var(--ink-soft); border-color: var(--line); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1; transform:none; transition:none; } html{scroll-behavior:auto;} }

/* small utilities */
.eyebrow-rule { display:flex; align-items:center; gap:.9rem; }
.eyebrow-rule::after { content:""; height:1px; flex:1; background:var(--line); }
.stack-sm > * + * { margin-top: .8rem; }
.grid { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px){ .cols-2, .cols-3 { grid-template-columns: 1fr; } }
