/* Jacob Yuan Tutoring — cool academic palette with ocean-blue,
   cyan and turquoise accents over soft white and mist-grey surfaces. */

:root {
  --paper: #f8fbfc;
  --surface: #eaf2f4;
  --ink: #102b3b;
  --ink-soft: #49616d;
  --line: #b6d6dc;
  --line-soft: #dbeaec;
  --accent: #168aad;
  --accent-deep: #0b5972;
  --cyan: #59d7e8;
  --turquoise: #2bbbad;
  --highlight: #35c8c0;

  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --max: 960px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .motion-ready .reveal { opacity: 1; transform: none; }
  .motion-ready .section-head.reveal .rule { transform: none; }
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 95% 18%, rgba(89, 215, 232, 0.11), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 1.3rem; font-weight: 700; }

h1 {
  color: var(--ink);
  background: linear-gradient(110deg, var(--ink) 10%, #176f91 58%, #159e9a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }

a { color: var(--accent-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
}

.section-title-label {
  display: inline-block;
  font-size: clamp(1.4rem, 2.4vw, 1.6rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.3em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

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

header.site {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(248, 251, 252, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
}

/* --- Hero --- */

.hero {
  padding: 72px 0 56px;
  background-image:
    radial-gradient(circle at 78% 30%, rgba(89, 215, 232, 0.34), transparent 22rem),
    linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(207, 225, 231, 0.72) 55%, rgba(43, 187, 173, 0.18)),
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
  background-position: center, center, center top, center top;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.hero h1 { max-width: 14ch; }
.hero p.lede { font-size: 1.15rem; max-width: 46ch; }

/* --- Buttons --- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 3px;
  border: 1px solid var(--accent-deep);
  color: #fff;
  background: linear-gradient(110deg, var(--accent-deep), var(--accent) 62%, var(--turquoise));
  box-shadow: 0 8px 22px rgba(11, 89, 114, 0.17);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11, 89, 114, 0.24); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { border-color: var(--accent-deep); color: var(--accent-deep); background: transparent; }

/* --- Sections --- */

section { padding: 56px 0; }
section[id] { scroll-margin-top: 88px; }
section.surface {
  background: linear-gradient(120deg, var(--surface), #f7fbfc 52%, rgba(89, 215, 232, 0.12));
  border-block: 1px solid rgba(182, 214, 220, 0.55);
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}

.section-head .label { white-space: nowrap; }

/* --- Scroll reveals --- */

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready .reveal.reveal-soft { transform: translateY(18px); }

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.motion-ready .section-head.reveal .rule {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.18s;
}

.motion-ready .section-head.reveal.is-visible .rule { transform: scaleX(1); }
.motion-ready .hero h1.reveal { transform: translateY(38px); }
.motion-ready .hero h1.reveal.is-visible { transform: translateY(0); }

/* --- Steps (legitimate sequence: 01/02/03) --- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 24px;
}

.step .num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 10px;
}

.step h3 { margin-bottom: 6px; }
.step p { margin: 0; font-size: 0.95rem; }

.step {
  padding: 22px 20px;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), var(--turquoise)) 1;
  background: rgba(255, 255, 255, 0.58);
}

/* --- Tutor / achievements --- */

.tutor {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}

.tutor img {
  width: 100%;
  border-radius: 3px;
  border: 1px solid var(--line);
  box-shadow: 14px 14px 0 rgba(53, 200, 192, 0.16);
}

.achievements {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.achievements li {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink);
}

.achievements li .mark {
  font-family: var(--mono);
  color: var(--highlight-ink, var(--accent-deep));
  flex-shrink: 0;
}

/* --- Testimonials --- */

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.testimonial {
  border-left: 3px solid var(--highlight);
  padding: 20px 20px 20px 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 30px rgba(16, 43, 59, 0.05);
}

.testimonial p {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  font-style: italic;
}

.testimonial cite {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* --- CTA band --- */

.cta-band {
  text-align: left;
  padding: 64px 0;
  background: linear-gradient(115deg, #102b3b, #155e78 58%, #169b98);
}

.cta-band h2 { max-width: 20ch; margin-bottom: 20px; }
.cta-band h2 { color: #fff; }
.cta-band .btn { background: #fff; border-color: #fff; color: var(--accent-deep); box-shadow: none; }
.cta-band .btn:hover { color: var(--accent-deep); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16); }

/* --- Programs page --- */

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  margin-top: 24px;
}

.program-tier {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(234, 242, 244, 0.55));
}
.program-tier:last-child { border-right: none; }

.program-tier .years { font-family: var(--mono); color: var(--accent-deep); font-size: 0.8rem; display: block; margin-bottom: 8px; }
.program-tier .rate { font-family: var(--serif); font-size: 2rem; display: block; margin: 6px 0; }
.program-tier .rate span { font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); }

.subject-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.subject-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 3px;
  color: var(--ink-soft);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-details dt {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent-deep);
  margin-top: 20px;
}
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: 4px 0 0; color: var(--ink); }

form.card {
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 48px rgba(16, 43, 59, 0.07);
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.97rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}

.field textarea { min-height: 110px; resize: vertical; }

.hp-field { position: absolute; left: -9999px; }

/* --- Legal pages --- */

.legal h2 { margin-top: 1.6em; font-size: 1.2rem; font-family: var(--sans); font-weight: 600; }
.legal ul { color: var(--ink-soft); }
.legal { max-width: 68ch; }
.updated { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 2em; }

/* --- Footer --- */

footer.site {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0;
  margin-top: 40px;
  background: linear-gradient(110deg, #eef5f6, #f8fbfc 50%, rgba(89, 215, 232, 0.13));
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-grid a { color: var(--ink-soft); }
.footer-links { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; }

/* --- Responsive --- */

@media (max-width: 760px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.85rem; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .tutor { grid-template-columns: 1fr; }
  .tutor img { max-width: 180px; }
  .testimonials { grid-template-columns: 1fr; }
  .program-grid { grid-template-columns: 1fr; }
  .program-tier { border-right: none; border-bottom: 1px solid var(--line); }
  .program-tier:last-child { border-bottom: none; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav { align-items: flex-start; flex-direction: column; gap: 12px; padding-block: 14px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 10px; }
  section[id] { scroll-margin-top: 122px; }
  .brand-mark { width: 40px; height: 33px; }
}
