/* ==========================================================================
   [Your Business Name] — SAT tutoring landing page
   Warm, editorial, minimalist. Cream paper + a single muted sage accent.
   Type: Fraunces (display serif) / Mulish (body sans).

   HOW TO EDIT QUICKLY:
   - Colors, fonts, spacing all live in :root below — change once, applies everywhere.
   - To swap the accent (e.g. terracotta or muted blue), edit the --sage* values.
   ========================================================================== */

:root {
  /* ---- Palette: warm neutrals + one muted sage accent ---- */
  --cream:        #F6F2EA;  /* page background (warm off-white) */
  --paper:        #FCFAF5;  /* raised surfaces: cards, nav */
  --cream-deep:   #EFE9DC;  /* subtle alt sections / hairlines */
  --ink:          #2C2A26;  /* headlines (warm near-black, never pure) */
  --text:         #514B43;  /* body copy */
  --muted:        #6B655C;  /* captions, secondary text */

  --sage:         #7E9B7A;  /* light accent: icons, small marks */
  --sage-deep:    #4F6647;  /* buttons, links, focus (high contrast on cream) */
  --sage-deep-2:  #3E5138;  /* hover */
  --sage-hl:      rgba(126, 155, 122, 0.40); /* highlighter swipe */
  --sage-tint:    #EBF0E7;  /* faint sage wash for soft surfaces */

  /* ---- Type ---- */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fluid type scale */
  --fs-eyebrow:  0.82rem;
  --fs-body:     clamp(1.02rem, 0.97rem + 0.25vw, 1.15rem);
  --fs-lead:     clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-h3:       clamp(1.25rem, 1.15rem + 0.5vw, 1.45rem);
  --fs-h2:       clamp(1.9rem, 1.5rem + 1.8vw, 2.85rem);
  --fs-h1:       clamp(2.3rem, 1.6rem + 3.4vw, 4.1rem);

  /* ---- Layout / rhythm ---- */
  --container:   1080px;
  --narrow:      720px;
  --section-pad: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  --radius:      18px;
  --radius-sm:   12px;
  --shadow:      0 18px 40px -24px rgba(58, 50, 38, 0.35);
  --shadow-soft: 0 10px 30px -22px rgba(58, 50, 38, 0.4);
}

/* ==========================================================================
   Base / reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Account for the sticky header when jumping to in-page anchors */
:target { scroll-margin-top: 6rem; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

a { color: var(--sage-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sage-deep-2); }

/* Visible, accessible focus for keyboard users everywhere */
:focus-visible {
  outline: 3px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
}
.container--narrow { max-width: var(--narrow); }

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

/* Soft sage wave divider (generated asset) */
.section.what {
  background-image: url("./assets/section-bg.jpg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 140% auto;
}

/* ==========================================================================
   Shared bits: eyebrow label, section title, highlighter mark
   ========================================================================== */
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 1rem;
}

.section__title {
  font-size: var(--fs-h2);
  max-width: 20ch;
  margin-bottom: 1.5rem;
}

/* SIGNATURE ELEMENT: a soft sage "highlighter" swipe behind key phrases.
   On-theme for test prep (marking up a page); the one memorable flourish. */
.mark {
  background-image: linear-gradient(180deg, transparent 58%, var(--sage-hl) 58%);
  background-repeat: no-repeat;
  padding-inline: 0.08em;
  /* keep the highlight intact across line wraps */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary {
  background-color: var(--sage-deep);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover {
  background-color: var(--sage-deep-2);
  color: #fff;
  transform: translateY(-2px);
}
.btn--lg { padding: 1.1em 2em; font-size: 1.05rem; }

/* ==========================================================================
   Header / nav (sticky)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Generated "strewn leaves" banner art spans the whole header.
     A translucent cream wash sits on top so the wordmark + nav stay legible.
     Tune the 0.55 values up (more wash, fainter leaves) or down (bolder leaves). */
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(246, 242, 234, 0.55), rgba(246, 242, 234, 0.55)),
    url("./assets/header-leaves.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--cream-deep);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { width: 38px; height: 38px; border-radius: 9px; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.nav__link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}
.nav__link:hover { color: var(--sage-deep); }
.nav__cta { color: #fff; }

/* Hamburger toggle — hidden on desktop */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--cream-deep);
  border-radius: 10px;
}
.nav__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background-color: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  /* Generated ambient image + a left-weighted cream overlay so the
     dark headline on the left stays legible. Image objects sit on the right. */
  background-image:
    linear-gradient(
      100deg,
      rgba(246, 242, 234, 0.96) 0%,
      rgba(246, 242, 234, 0.85) 34%,
      rgba(246, 242, 234, 0.35) 64%,
      rgba(246, 242, 234, 0.08) 100%
    ),
    url("./assets/hero.jpg");
  background-size: cover;
  background-position: right center;
}
.hero__inner {
  padding-block: clamp(4rem, 3rem + 9vw, 9rem);
}
.hero__content { max-width: 40rem; }
.hero__title {
  font-size: var(--fs-h1);
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.hero__subhead {
  font-size: var(--fs-lead);
  color: var(--text);
  max-width: 34rem;
  margin-bottom: 2.25rem;
}

/* ==========================================================================
   What you get
   ========================================================================== */
.what__list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.what__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  background-color: var(--paper);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-soft);
}
.what__item p { font-size: var(--fs-lead); color: var(--ink); }
.what__rule {
  margin-top: 0.65em;
  width: 1.75rem;
  height: 3px;
  border-radius: 3px;
  background-color: var(--sage);
}
.what__closing {
  margin-top: 2.25rem;
  font-size: var(--fs-lead);
  color: var(--text);
  max-width: 46ch;
}

/* ==========================================================================
   About me
   ========================================================================== */
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: clamp(2rem, 1rem + 5vw, 5rem);
  align-items: center;
}
.about__photo {
  aspect-ratio: 1 / 1;
  border-radius: 50%;             /* circular frame lives on the container now */
  overflow: hidden;               /* clips the zoomed photo to the circle */
  box-shadow: var(--shadow);
  background-color: var(--cream-deep); /* gentle tint before photo loads */
}
.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Vertical framing: LOWER the % to show more hair (top), RAISE for more chin. */
  object-position: center 22%;
  /* The photo is portrait, so it fills the width exactly with no room to pan
     sideways. We zoom in a touch (scale) to create slack, then nudge the
     image right (translateX) so the face sits centered.
     translateX: + moves the face RIGHT, - moves it LEFT. */
  transform: scale(1.12) translateX(3.5%);
}
.about__text p { margin-bottom: 1.1rem; max-width: 52ch; }
.about__text p:last-child { margin-bottom: 0; }

/* ==========================================================================
   How it works (4 steps)
   ========================================================================== */
.how__steps {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.how__step {
  background-color: var(--paper);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-soft);
}
.how__icon {
  width: 72px;
  height: 72px;
  margin-bottom: 1.1rem;
}
.how__num {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 0.4rem;
}
.how__step-title { font-size: var(--fs-h3); margin-bottom: 0.5rem; }
.how__step p { color: var(--text); }

/* Testimonials — styles kept in case you add a testimonials block later */
.testimonials {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.testimonial {
  margin: 0;
  background-color: var(--paper);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}
.testimonial blockquote {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.5;
}
.testimonial figcaption { color: var(--muted); font-size: 0.95rem; }

/* ==========================================================================
   FAQ (native <details>)
   ========================================================================== */
.faq__list { margin-top: 2.5rem; }
.faq__item {
  border-bottom: 1px solid var(--cream-deep);
}
.faq__item summary {
  list-style: none;             /* remove default triangle */
  cursor: pointer;
  padding: 1.4rem 2.5rem 1.4rem 0;
  position: relative;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
/* Custom + / − marker */
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--sage-deep), var(--sage-deep)) center / 14px 2px no-repeat,
    linear-gradient(var(--sage-deep), var(--sage-deep)) center / 2px 14px no-repeat;
  transform: translateY(-50%);
  transition: transform 0.25s ease;
}
.faq__item[open] summary::after {
  transform: translateY(-50%) rotate(135deg);  /* + becomes × */
}
.faq__answer { padding: 0 0 1.5rem; }
.faq__answer p { max-width: 60ch; color: var(--text); }

/* ==========================================================================
   Final CTA
   ========================================================================== */
.final-cta {
  /* Generated bookshelf/desk scene (hero art style) behind the closing CTA.
     A radial cream wash is denser in the center to protect the centered text,
     lighter at the edges so the bookshelf + desk still read. Tune the alpha
     values up for fainter scene / more legibility, down for a bolder scene. */
  background-color: var(--sage-tint); /* fallback before image loads */
  background-image:
    radial-gradient(ellipse 90% 85% at 50% 50%,
      rgba(246, 242, 234, 0.86) 0%,
      rgba(246, 242, 234, 0.62) 100%),
    url("./assets/cta-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.final-cta__inner { text-align: center; }
.final-cta .section__title { max-width: none; }
.final-cta__lead {
  font-size: var(--fs-lead);
  color: var(--text);
  max-width: 46ch;
  margin: 0 auto 2.25rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--cream-deep);
  padding-block: 3rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer__links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.footer__links a:hover { color: var(--sage-deep); }
.footer__legal {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Accessibility helpers
   ========================================================================== */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.75rem; }

/* ==========================================================================
   Scroll-reveal (progressive enhancement; only when .js is set)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .how__steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  /* Mobile nav: collapse links into a dropdown panel */
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem clamp(1.25rem, 0.8rem + 2vw, 2.5rem) 1.5rem;
    background-color: var(--paper);
    border-bottom: 1px solid var(--cream-deep);
    box-shadow: var(--shadow);
    /* hidden by default; toggled open via [data-open] */
    display: none;
  }
  .nav__menu[data-open] { display: flex; }
  .nav__link { padding: 0.6rem 0; }
  .nav__cta { text-align: center; margin-top: 0.5rem; }

  /* Hamburger -> X when open */
  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Strengthen the hero overlay so text stays legible over the image */
  .hero {
    background-image:
      linear-gradient(
        180deg,
        rgba(246, 242, 234, 0.95) 0%,
        rgba(246, 242, 234, 0.82) 55%,
        rgba(246, 242, 234, 0.55) 100%
      ),
      url("./assets/hero.jpg");
    background-position: center;
  }
}

@media (max-width: 620px) {
  .about__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .about__photo { max-width: 240px; }
  .about__text p { margin-inline: auto; }
  .how__steps { grid-template-columns: 1fr; }
  .section__title { max-width: none; }
}

/* ==========================================================================
   Reduced motion: respect the user's preference
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
