/* Nova High — design tokens + components (v2: conceptual one-pager) */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(1.875rem, 1.2rem + 2.2vw, 3rem);
  --text-3xl: clamp(2.75rem, 1.2rem + 4.2vw, 4.75rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Nova palette: white page, cream bands, navy ink, sage + orange accents */
  --color-bg: #ffffff;
  --color-cream: #fff8ee;
  --color-blue-band: #f1f5f8;
  --color-surface: #ffffff;
  --color-surface-offset: #f1f5f8;
  --color-text: #0a3246;
  --color-text-muted: #4f5e68;
  --color-text-inverse: #fffbf6;
  --color-text-inverse-muted: #c9d3d9;
  --color-primary: #135e9e;
  --color-primary-hover: #0e4a7e;
  --color-cta: #f37335;
  --color-cta-hover: #f78d57;
  --color-cta-active: #e8692c;
  --color-accent-text: #d4541a;      /* orange deepened for text on light surfaces */
  --color-sage: #a9b48a;
  --color-sage-text: #6f7b50;        /* sage deepened for text on light surfaces */
  --color-navy: #0a3246;
  --color-navy-raised: #124157;
  --color-border: oklch(from var(--color-text) l c h / 0.13);
  --color-border-inverse: oklch(from var(--color-text-inverse) l c h / 0.18);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 2.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.3 0.04 240 / 0.07);
  --shadow-md: 0 2px 4px oklch(0.3 0.04 240 / 0.05), 0 10px 28px oklch(0.3 0.04 240 / 0.08);
  --shadow-lg: 0 4px 8px oklch(0.3 0.04 240 / 0.06), 0 24px 56px oklch(0.3 0.04 240 / 0.13);

  --content-narrow: 760px;
  --content-wide: 1160px;

  --font-display: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  --section-pad: clamp(var(--space-16), 8vw, var(--space-24));
}

/* ---------- Layout primitives ---------- */

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-12));
}

section { padding-block: var(--section-pad); position: relative; }

/* Bands. Each band dips a small curved notch of the band above into its top edge. */
.band--cream { background: var(--color-cream); }
.band--white { background: var(--color-bg); }
.band--blue { background: var(--color-blue-band); }

.band::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  width: 7.5rem;
  height: 2.75rem;
  transform: translateX(-50%);
  background: var(--notch, var(--color-bg));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 44' preserveAspectRatio='none'%3E%3Cpath d='M0 0h120C82 0 66 16 60 44 54 16 38 0 0 0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 44' preserveAspectRatio='none'%3E%3Cpath d='M0 0h120C82 0 66 16 60 44 54 16 38 0 0 0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
.why { --notch: var(--color-bg); }
.commitments { --notch: var(--color-cream); }
.work { --notch: var(--color-bg); }
.skills { --notch: var(--color-blue-band); }
.contact { --notch: var(--color-bg); }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: calc(-1 * var(--space-20));
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  background: var(--color-navy);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--font-display); color: var(--color-text); }

h1 { font-size: var(--text-3xl); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: var(--text-2xl); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
h3 { font-size: var(--text-lg); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }

.accent { color: var(--color-accent-text); }
.accent-sage { color: var(--color-sage-text); }

.lead { font-size: var(--text-lg); line-height: 1.55; color: var(--color-text-muted); }

a { color: var(--color-primary); text-underline-offset: 0.2em; }
a:hover { color: var(--color-primary-hover); }

.section-head { max-width: 44rem; margin-bottom: clamp(var(--space-8), 5vw, var(--space-12)); }
.section-head p { margin-top: var(--space-5); color: var(--color-text-muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
}

.btn--primary { background: var(--color-cta); color: var(--color-navy); }
.btn--primary:hover { background: var(--color-cta-hover); color: var(--color-navy); }
.btn--primary:active { background: var(--color-cta-active); }

.btn--navy { background: var(--color-navy); color: var(--color-text-inverse); }
.btn--navy:hover { background: var(--color-navy-raised); color: var(--color-text-inverse); }
.btn--navy:active { background: var(--color-primary-hover); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.site-header.is-scrolled { border-bottom-color: var(--color-border); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--space-20);
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: var(--radius-sm); }
.brand img { height: 2.75rem; width: auto; background: none; }

.site-nav { display: flex; align-items: center; flex: 1; }
.site-nav ul { display: flex; align-items: center; justify-content: center; gap: var(--space-8); flex: 1; }
.site-nav li { max-width: none; }
.site-nav ul a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}
.site-nav ul a:hover { color: var(--color-text); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text);
}
.nav-toggle:hover { background: oklch(from var(--color-text) l c h / 0.06); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-4) clamp(var(--space-5), 4vw, var(--space-12)) var(--space-6);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-interactive), visibility var(--transition-interactive);
  }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav ul a {
    width: 100%;
    min-height: 3rem;
    font-size: var(--text-base);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
  }
  .brand img { height: 2.25rem; }
  .header-inner { min-height: var(--space-16); }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(var(--space-10), 6vw, var(--space-20)) clamp(var(--space-20), 10vw, var(--space-32)); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(var(--space-10), 6vw, var(--space-24));
  align-items: center;
}

.hero-copy .lead {
  margin-top: var(--space-8);
  padding-left: var(--space-5);
  border-left: 3px solid var(--color-sage);
  max-width: 33rem;
}

.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

.hero-media { position: relative; justify-self: center; width: min(100%, 30rem); }
.hero-media .hero-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
}

.star { position: absolute; fill: currentColor; pointer-events: none; }
.star--a { color: var(--color-sage); width: 4.5rem; height: 4.5rem; top: -1.25rem; right: -0.5rem; }
.star--b { color: var(--color-sage); width: 1.75rem; height: 1.75rem; top: 4rem; right: -2.25rem; opacity: 0.75; }
.star--c { color: var(--color-sage); width: 1.5rem; height: 1.5rem; bottom: 0.5rem; left: 1rem; opacity: 0.75; }
.star--d { color: var(--color-cta); width: 3.25rem; height: 3.25rem; bottom: -1.25rem; right: 1.5rem; }
.star--e { color: var(--color-cta); width: 1.375rem; height: 1.375rem; bottom: -2.75rem; right: 0.25rem; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { width: min(82%, 24rem); }
  .star--a { width: 3.25rem; height: 3.25rem; top: -0.75rem; right: -0.5rem; }
  .star--b { right: -1.5rem; }
}

/* ---------- Why ---------- */

.why { padding-bottom: 0; }
.why .intro { text-align: center; margin-inline: auto; max-width: var(--content-narrow); }
.why .intro p { margin: var(--space-6) auto 0; color: var(--color-text-muted); font-size: var(--text-lg); line-height: 1.6; }

/* ---------- How students learn ---------- */

.learn-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: start;
}
.learn-copy h2 { font-size: var(--text-xl); }
.learn-copy p { margin-top: var(--space-5); color: var(--color-text-muted); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  max-width: none;
}
.card-star { width: 1.75rem; height: 1.75rem; fill: var(--color-cta); margin-bottom: var(--space-4); }
.card h3 { font-size: var(--text-base); font-weight: 600; }
.card p { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }

@media (max-width: 860px) { .learn-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Commitments ---------- */

.commit-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: center;
}
.commit-media { position: relative; }
.commit-media img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}
.commit-copy h2 { font-size: var(--text-xl); }
.commit-copy > p { margin-top: var(--space-5); color: var(--color-text-muted); }
.commit-title { margin-top: var(--space-8); font-size: var(--text-lg); font-weight: 700; }

.commit-list { margin-top: var(--space-5); display: grid; gap: var(--space-5); }
.commit-list li { display: grid; grid-template-columns: 1.25rem 1fr; column-gap: var(--space-4); align-items: start; }
.commit-list svg { width: 1.25rem; height: 1.25rem; margin-top: 0.3em; fill: var(--color-sage); }
.commit-list strong { display: block; font-family: var(--font-display); font-weight: 700; color: var(--color-sage-text); line-height: 1.3; }
.commit-list span { display: block; margin-top: var(--space-1); color: var(--color-text-muted); }

@media (max-width: 860px) {
  .commit-grid { grid-template-columns: 1fr; }
  .commit-media { max-width: 30rem; }
  .commit-media img { aspect-ratio: 4 / 3; }
  .commit-media { margin-bottom: var(--space-6); }
}

/* ---------- Kinds of work ---------- */

.work-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
.work-strip li { max-width: none; }
.work-strip li:nth-child(even) { margin-top: var(--space-10); }
.work-strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.work-strip p { margin-top: var(--space-3); font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); }

@media (max-width: 760px) {
  .work-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
  .work-strip li:nth-child(even) { margin-top: var(--space-8); }
}

/* ---------- Impact Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: start;
}
.skills-copy p { margin-top: var(--space-5); color: var(--color-text-muted); }

.skill-list { counter-reset: skill; border-top: 2px solid var(--color-navy); }
.skill-list li {
  counter-increment: skill;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 0.9fr) minmax(0, 1.3fr);
  column-gap: var(--space-5);
  align-items: baseline;
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--color-border);
  max-width: none;
}
.skill-list li::before {
  content: counter(skill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-accent-text);
  line-height: 1.25;
}
.skill-list h3 { font-size: var(--text-lg); }
.skill-list p { color: var(--color-text-muted); font-size: var(--text-sm); }

@media (max-width: 860px) { .skills-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  .skill-list li { grid-template-columns: 2rem minmax(0, 1fr); }
  .skill-list p { grid-column: 2; margin-top: var(--space-1); }
}

/* ---------- Contact ---------- */

.contact-panel {
  background: var(--color-navy);
  color: var(--color-text-inverse);
  border-radius: var(--radius-2xl);
  padding: clamp(var(--space-8), 5vw, var(--space-16));
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: start;
}
.contact-panel h2 { color: var(--color-text-inverse); }
.contact-panel .lead { color: var(--color-text-inverse); margin-top: var(--space-5); font-size: var(--text-base); }
.contact-note {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-inverse);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.35;
  color: var(--color-sage);
}

.contact-form { display: grid; gap: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field label { font-size: var(--text-sm); font-weight: 600; }
.field label span { font-weight: 400; color: var(--color-text-inverse-muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  background: #f4f8fb;
  color: var(--color-navy);
  font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--color-cta); outline-offset: 2px; }
.field input[aria-invalid='true'] { border-color: var(--color-cta); box-shadow: 0 0 0 2px var(--color-cta); }
.field .error { font-size: var(--text-sm); color: #ffc7a8; }
.contact-form .btn { justify-self: start; }
.form-note { font-size: var(--text-sm); color: var(--color-text-inverse-muted); }
.form-status { font-size: var(--text-sm); padding: var(--space-4); border-radius: var(--radius-md); background: oklch(from var(--color-text-inverse) l c h / 0.08); }
.form-status[hidden] { display: none; }

.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.copy-btn {
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-inverse);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
}
.copy-btn:hover { border-color: var(--color-text-inverse); }
.copy-btn:active { background: oklch(from var(--color-text-inverse) l c h / 0.1); }
.email-text { font-weight: 600; user-select: all; overflow-wrap: anywhere; }

@media (max-width: 860px) { .contact-panel { grid-template-columns: 1fr; border-radius: var(--radius-xl); } }

/* ---------- Footer ---------- */

.site-footer { background: var(--color-cream); padding-block: var(--space-4) var(--space-10); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-10); align-items: start; }
.footer-grid img { height: 3rem; width: auto; background: none; }
.footer-grid .about { margin-top: var(--space-5); font-size: var(--text-sm); color: var(--color-text-muted); max-width: 26rem; }
.footer-grid h2 { font-family: var(--font-display); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-sage-text); margin-bottom: var(--space-3); }
.footer-grid address, .footer-grid p { font-style: normal; font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; }
.footer-grid a { overflow-wrap: anywhere; }
.footer-base { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--color-border); font-size: var(--text-xs); color: var(--color-text-muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); } }

/* ---------- Scroll reveal (opacity only; visible by default) ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-fade linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes reveal-fade { from { opacity: 0.15; } to { opacity: 1; } }

/* Plain greedy wrapping for body copy: `pretty` left ragged mid-paragraph breaks in narrow columns. */
p, li, figcaption { text-wrap: wrap; }

/* Touch targets */
.brand { min-height: 44px; }
.footer-grid address a, .footer-grid p a, .footer-base a { display: inline-block; padding-block: 0.7rem; margin-block: -0.2rem; }
.footer-base a { padding-block: 0.85rem; }
.footer-base { align-items: center; }
.footer-grid h2 { color: #5d6842; }

/* Research line under "Why Nova High?" */
.why .intro .sources { margin-top: var(--space-6); font-size: var(--text-sm); line-height: 1.5; max-width: none; }
.why .intro .sources span { display: block; font-family: var(--font-display); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #5d6842; }
.why .intro .sources-links { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; column-gap: var(--space-5); }
@media (min-width: 640px) { .why .intro .sources-links { grid-template-columns: repeat(4, auto); } }
.why .intro .sources a { display: inline-block; padding-block: 0.75rem; white-space: nowrap; }
.field textarea#vf-idea { min-height: 5.5rem; }
