/* ============================================================
   Essay Coaching — Warm & Editorial design system
   Single shared stylesheet for all pages.
   To re-theme the whole site, edit the variables in :root below.
   ============================================================ */

:root {
  /* Color palette */
  --ivory: #fbf7f0;
  --ivory-deep: #f3ecdf;
  --ink: #2b2a28;
  --ink-soft: #57534e;
  --terracotta: #c06b4e;
  --terracotta-dark: #a8553b;
  --sage: #7c8a6f;
  --line: #e3dac9;
  --white: #ffffff;

  /* Typography */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1120px;
  --radius: 14px;
  --shadow: 0 18px 40px -24px rgba(43, 42, 40, 0.35);
  --transition: 200ms ease;
}

/* ----------  Reset / base  ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--ivory);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

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

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}
h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}
h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1.1rem;
}

a {
  color: var(--terracotta-dark);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--terracotta);
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--terracotta-dark);
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ----------  Layout helpers  ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section--tint {
  background-color: var(--ivory-deep);
}

.section-head {
  max-width: 60ch;
  margin: 0 auto 3rem;
  text-align: center;
}
.section-head .lede {
  margin-left: auto;
  margin-right: auto;
}

.center {
  text-align: center;
}

/* ----------  Buttons  ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid var(--terracotta);
  background-color: var(--terracotta);
  color: var(--white);
  cursor: pointer;
  transition: all var(--transition);
}
.btn:hover {
  background-color: var(--terracotta-dark);
  border-color: var(--terracotta-dark);
  color: var(--white);
  transform: translateY(-1px);
}
.btn--ghost {
  background-color: transparent;
  color: var(--terracotta-dark);
}
.btn--ghost:hover {
  background-color: var(--terracotta);
  color: var(--white);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ----------  Header / nav  ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(251, 247, 240, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.nav__brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav__brand:hover {
  color: var(--ink);
}
.nav__brand span {
  color: var(--terracotta);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.97rem;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--ink);
}
.nav__links a.is-active {
  border-bottom: 2px solid var(--terracotta);
  padding-bottom: 2px;
}
.nav__cta {
  margin-left: 0.4rem;
}
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background-color: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}

/* ----------  Hero  ---------- */
.hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__photo {
  position: relative;
}
.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* Bias the crop toward the top so the subject's head isn't cut off. */
  object-position: 50% 15%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero__caption {
  margin: 1.1rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.hero__caption span {
  color: var(--terracotta-dark);
  font-style: italic;
}

/* Placeholder shown until a real photo is added */
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--ivory-deep), var(--line));
  border: 1px dashed var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* ----------  Cards / grids  ---------- */
.grid {
  display: grid;
  gap: 1.6rem;
}
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--ivory-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.1rem;
}
.card h3 {
  margin-bottom: 0.5rem;
}
.card p:last-child {
  margin-bottom: 0;
}

/* ----------  About / split layout  ---------- */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split__photo .photo-placeholder,
.split__photo img {
  /* Landscape headshot: use a near-natural ratio so the sides aren't cropped. */
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: 50% 35%;
}

.prose {
  max-width: 68ch;
}
.prose h2 {
  margin-top: 2rem;
}
.about-intro {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 1rem;
}

/* Stat / highlight row */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.stat__num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--terracotta);
  line-height: 1;
}
.stat__label {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ----------  Process steps  ---------- */
.steps {
  display: grid;
  gap: 1.4rem;
  counter-reset: step;
}
.step {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
}
.step__num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--terracotta);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 {
  margin-bottom: 0.3rem;
}
.step p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

/* Wide banner image (e.g. top of Student Experiences) */
.banner-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ----------  Testimonials  ---------- */
/* Staggered, alternating stream of wide cards for a natural reading flow. */
.quote-stream {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  max-width: 880px;
  margin: 0 auto;
}
.quote-stream .quote {
  width: 82%;
  max-width: 640px;
}
/* Odd cards hug the left, even cards hug the right and lean on the accent. */
.quote-stream .quote:nth-child(odd) {
  align-self: flex-start;
}
.quote-stream .quote:nth-child(even) {
  align-self: flex-end;
  background-color: var(--ivory-deep);
  border-color: var(--line);
}
/* Subtle vertical overlap so cards feel interleaved rather than listed. */
.quote-stream .quote:not(:first-child) {
  margin-top: -0.4rem;
}

.quote {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
}
.quote__mark {
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 0.5;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
}
.quote p {
  font-size: 1.08rem;
}
.quote__author {
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 600;
}
.quote__role {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.feature-quote {
  text-align: center;
  max-width: 52ch;
  margin: 0 auto;
}
.feature-quote p {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.4;
  color: var(--ink);
}

/* ----------  Pricing  ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  align-items: start;
}
.price-card {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.price-card--featured {
  border-color: var(--terracotta);
  border-width: 2px;
  box-shadow: var(--shadow);
  position: relative;
}
.price-card__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--terracotta);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
}
.price-card__price {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  color: var(--ink);
  margin: 0.6rem 0 0.2rem;
}
.price-card__price span {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0;
  display: grid;
  gap: 0.7rem;
}
.price-card li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--ink-soft);
}
.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 700;
}
.price-card .btn {
  margin-top: auto;
  text-align: center;
}

/* ----------  FAQ / accordion-ish  ---------- */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
.faq details {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 1.4rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--terracotta);
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  padding-bottom: 1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ----------  Contact  ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact-info p {
  color: var(--ink-soft);
}
.contact-info a {
  font-weight: 600;
}
.form {
  display: grid;
  gap: 1.1rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label {
  font-size: 0.9rem;
  font-weight: 600;
}
.field input,
.field textarea,
.field select {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--white);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(192, 107, 78, 0.15);
}
.form__note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Embedded third-party widget (e.g. Calendly scheduler or a form iframe) */
.embed {
  width: 100%;
}
.embed__frame {
  width: 100%;
  min-height: 700px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--white);
}
.embed__fallback {
  color: var(--ink-soft);
  background-color: var(--ivory-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ----------  CTA band  ---------- */
.cta-band {
  background-color: var(--ink);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.cta-band h2 {
  color: var(--ivory);
}
.cta-band p {
  color: rgba(251, 247, 240, 0.8);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

/* ----------  Footer  ---------- */
.site-footer {
  background-color: var(--ivory-deep);
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
}
.footer-brand span {
  color: var(--terracotta);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ----------  Page hero (interior pages)  ---------- */
.page-hero {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  text-align: center;
}
.page-hero .lede {
  margin-left: auto;
  margin-right: auto;
}

/* ----------  Responsive  ---------- */
@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background-color: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.5rem 1.5rem;
    transform: translateY(-120%);
    transition: transform 280ms ease;
    box-shadow: var(--shadow);
  }
  .nav__links.is-open {
    transform: translateY(0);
  }
  .nav__links li {
    width: 100%;
  }
  .nav__links a {
    display: block;
    padding: 0.7rem 0;
    width: 100%;
    font-size: 1.05rem;
  }
  .nav__links a.is-active {
    border-bottom: none;
    color: var(--terracotta);
  }
  .nav__cta {
    margin: 0.6rem 0 0;
  }
  /* The "Book a call" CTA is an <a class="btn"> inside the nav. Without this,
     the generic ".nav__links a" rule above strips its horizontal padding and
     left-aligns the label inside the pill. Restore proper button styling. */
  .nav__cta .btn {
    width: auto;
    padding: 0.85rem 1.6rem;
    text-align: center;
  }
  .nav__toggle {
    display: flex;
  }
  .hero__grid,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero__photo {
    order: -1;
    max-width: 360px;
    margin: 0 auto;
  }
  .grid--2,
  .grid--3,
  .price-grid,
  .stats {
    grid-template-columns: 1fr;
  }
  .price-card--featured {
    order: -1;
  }
  /* Testimonials: full-width, no alternating offset on small screens. */
  .quote-stream .quote,
  .quote-stream .quote:nth-child(odd),
  .quote-stream .quote:nth-child(even) {
    width: 100%;
    max-width: none;
    align-self: stretch;
    margin-top: 0;
  }
}

/* AOS safety net: AOS's stylesheet sets [data-aos] to opacity:0 before its
   JS animates them in. If that JS never runs (CDN blocked, JS disabled, or
   reduced-motion), keep everything fully visible. We only let AOS hide
   elements once main.js has confirmed it initialized (html.aos-ready). */
html:not(.aos-ready) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

/* On phones, shorten the fade-up travel so reveals feel snappy, not sluggish.
   (AOS's default fade-up translateY is ~100px, which is a lot on a small
   screen.) Only the pre-animation start state is overridden. */
@media (max-width: 599px) {
  html.aos-ready [data-aos="fade-up"]:not(.aos-animate) {
    transform: translateY(24px);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}
