/* =============================================
   TOKENS
   ============================================= */
:root {
  --clr-bg:        #FAF8F5;
  --clr-bg-alt:    #F0EDE8;
  --clr-navy:      #1E2B3C;
  --clr-navy-soft: #354A63;
  --clr-teal:      #2A9D8F;
  --clr-teal-dark: #1F7A6E;
  --clr-muted:     #5E6E82;
  --clr-border:    #DDD9D2;

  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body:    'Atkinson Hyperlegible', Arial, sans-serif;

  --fs-sm:   0.9rem;
  --fs-base: 1.125rem;
  --fs-lg:   1.375rem;
  --fs-xl:   2rem;
  --fs-2xl:  2.75rem;
  --fs-3xl:  3.5rem;

  --lh-tight: 1.2;
  --lh-body:  1.75;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  --radius-sm: 6px;
  --radius-md: 12px;

  --max-w:        1100px;
  --max-w-narrow: 680px;

  --transition: 200ms ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--clr-bg);
  color: var(--clr-navy);
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: var(--clr-teal); }
a:hover { color: var(--clr-teal-dark); }

h1, h2, h3 {
  font-family: var(--ff-display);
  line-height: var(--lh-tight);
  color: var(--clr-navy);
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, var(--fs-3xl)); }
h2 { font-size: clamp(1.6rem, 3.5vw, var(--fs-2xl)); margin-bottom: var(--space-md); }
h3 { font-size: var(--fs-lg); margin-bottom: var(--space-xs); }

p + p { margin-top: 1em; }

strong { font-weight: 700; }

/* =============================================
   LAYOUT HELPERS
   ============================================= */
.container {
  width: 90%;
  max-width: var(--max-w);
  margin-inline: auto;
}

.container--narrow {
  max-width: var(--max-w-narrow);
}

.section {
  /* Fill at least the full viewport; overflow naturally if content is taller on small screens */
  min-height: 100vh;
  padding-block: var(--space-xl);
  /* Reserve space at the bottom for the scroll arrow */
  padding-bottom: calc(var(--space-xl) + 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* =============================================
   NAV
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--space-sm) 5%;
  gap: var(--space-md);
}

.nav-logo {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--clr-navy);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--clr-navy-soft);
  font-size: var(--fs-sm);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--clr-teal); }

.nav-cta {
  background: var(--clr-teal);
  color: #fff !important;
  padding: 0.45em 1.1em;
  border-radius: var(--radius-sm);
  transition: background var(--transition) !important;
}

.nav-cta:hover { background: var(--clr-teal-dark) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-block;
  background: var(--clr-teal);
  color: #fff;
  text-decoration: none;
  padding: 0.75em 1.75em;
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: var(--clr-teal-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  /* Slightly less than 100vh so the About section peeks below — signals scrollability */
  min-height: 88vh;
  padding-block: var(--space-xl);
  padding-top: calc(var(--space-xl) + var(--space-md));
  padding-bottom: calc(var(--space-xl) + 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-eyebrow {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-teal);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.hero-heading {
  margin-bottom: var(--space-sm);
  max-width: 16ch;
}

.hero-tagline {
  font-size: var(--fs-lg);
  color: var(--clr-navy-soft);
  max-width: 52ch;
  margin-bottom: var(--space-md);
  /* Signature element: teacher's annotation mark */
  border-left: 4px solid var(--clr-teal);
  padding-left: 1.2em;
  line-height: 1.6;
}

/* Scroll indicator arrow — sits at the bottom of hero + every section */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  color: var(--clr-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity var(--transition);
  animation: bounce 2.2s ease-in-out infinite;
  /* Ensure it never overlaps content by sitting in its own layer */
  z-index: 1;
}

.scroll-indicator:hover {
  opacity: 1;
  color: var(--clr-teal-dark);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-indicator { animation: none; }
}

/* =============================================
   SECTION LABELS
   ============================================= */
.section-label {
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-teal);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

/* =============================================
   ABOUT
   ============================================= */
.section-about { background: var(--clr-bg-alt); }

/* Section heading sits above the cards */
.section-about h2 { margin-bottom: var(--space-md); }

/* Two cards side by side */
.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
}

/* Each card: secondary bg, rounded corners, internal padding */
.about-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
}

/* Photo wrapper — keeps the decorative ring inside the card */
.about-photo-wrap {
  position: relative;
  width: 160px;
  flex-shrink: 0;
}

.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 3px solid var(--clr-teal);
  opacity: 0.3;
}

.about-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 4px solid var(--clr-bg-alt);
}

/* Card text block — left-align once below the photo */
.about-card-text {
  width: 100%;
  text-align: left;
}

.about-card-text h3 {
  margin-bottom: 2px;
}

.about-card-role {
  font-size: var(--fs-sm);
  color: var(--clr-teal);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--space-sm) !important;
}

/* Credentials bar */
.credential-row {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--clr-border);
}

.credential {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.credential strong {
  font-size: var(--fs-lg);
  font-family: var(--ff-display);
  color: var(--clr-navy);
}

.credential span {
  font-size: var(--fs-sm);
  color: var(--clr-muted);
}

/* Stack cards on mobile */
@media (max-width: 700px) {
  .about-cards {
    grid-template-columns: 1fr;
  }

  .about-photo-wrap {
    width: 130px;
  }

  .about-photo {
    width: 130px;
    height: 130px;
  }
}

/* =============================================
   SERVICES
   ============================================= */
.services-hint {
  color: var(--clr-muted);
  font-size: var(--fs-sm);
  margin-top: calc(var(--space-xs) * -1);
  margin-bottom: var(--space-md);
}

/* Two columns — one per tutor */
.services-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
}

/* Column header: tutor name + role */
.services-column-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--clr-teal);
}

.services-column-name {
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--clr-navy);
}

.services-column-role {
  font-size: var(--fs-sm);
  color: var(--clr-muted);
}

/* Cards stacked vertically within each column */
.services-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Service card — rendered as a button for full keyboard + click access */
.service-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--clr-bg-alt);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 0;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  font-family: var(--ff-body);
  color: var(--clr-navy);
  position: relative;
}

.service-card:hover {
  border-color: var(--clr-teal);
  background: var(--clr-bg);
}

/* Selected state */
.service-card[aria-pressed="true"] {
  border-color: var(--clr-teal);
  background: var(--clr-bg);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

.service-card[aria-pressed="true"] .service-select-label {
  color: var(--clr-teal);
  font-weight: 700;
}

.service-card[aria-pressed="true"] .service-select-label::before {
  content: '✓ ';
}

.service-card-inner {
  padding: var(--space-sm) var(--space-md);
}

.service-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0;
}

.service-price {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--clr-teal);
  white-space: nowrap;
  flex-shrink: 0;
}

.service-card p {
  font-size: var(--fs-sm);
  color: var(--clr-navy-soft);
  line-height: 1.6;
  margin-top: 0;
}

.service-select-label {
  display: inline-block;
  margin-top: var(--space-xs);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  transition: color var(--transition);
}

/* Stack columns on mobile */
@media (max-width: 700px) {
  .services-columns {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   HOW IT WORKS
   ============================================= */

/*
  Background image technique:
  - The section has position: relative
  - A ::before pseudo-element holds the image at reduced opacity
  - The actual content sits on top at full opacity
  - This way the text is never affected by the image opacity

  To activate: add your photo as images/session-bg.jpg
  The placeholder teal tint shows until the image is added.
*/
.section-hiw {
  position: relative;
  background: var(--clr-bg-alt);
  isolation: isolate;
}

.section-hiw::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url('../images/both1.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
}

/* Fallback tint if no image yet */
.section-hiw::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--clr-bg-alt);
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.step-marker {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--clr-teal);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2em;
}

/* =============================================
   TESTIMONIALS
   ============================================= */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.testimonial {
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border-left: 4px solid var(--clr-teal);
}

.testimonial p {
  font-style: italic;
  color: var(--clr-navy-soft);
  margin-bottom: var(--space-sm);
}

.testimonial p::before { content: '\201C'; }
.testimonial p::after  { content: '\201D'; }

.testimonial footer {
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  font-style: normal;
}

/* =============================================
   CONTACT
   ============================================= */
.section-contact { background: var(--clr-bg-alt); }

.contact-intro {
  color: var(--clr-navy-soft);
  margin-bottom: var(--space-md);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--clr-navy);
}

.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  color: var(--clr-navy);
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 0.65em 0.9em;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

/* Select-specific: arrow and no default appearance */
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='3,5 8,11 13,5' stroke='%235E6E82' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8em center;
  padding-right: 2.5em;
  cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--clr-teal);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.18);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* Small hint text below a field */
.form-hint {
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  margin-top: 2px !important;
}

.form-hint a {
  color: var(--clr-teal);
  text-decoration: underline;
}

/* Submit button disabled state */
.btn-primary:disabled {
  background: var(--clr-border);
  color: var(--clr-muted);
  cursor: not-allowed;
  transform: none;
}

/* Hint text below submit button */
.form-submit-hint {
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  margin-top: calc(var(--space-xs) * -0.5) !important;
}

.form-submit-hint.hidden {
  display: none;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--clr-navy);
  color: rgba(255,255,255,0.7);
  padding-block: var(--space-md);
  font-size: var(--fs-sm);
  text-align: center;
}

.site-footer .container { display: flex; flex-direction: column; gap: 4px; }

.footer-note { color: rgba(255,255,255,0.45); }

/* =============================================
   MOBILE NAV
   ============================================= */
@media (max-width: 700px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--clr-bg);
    border-bottom: 1px solid var(--clr-border);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-sm) 5%;
    gap: var(--space-sm);
  }

  .nav-links.open { display: flex; }

  .site-header { position: relative; }
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary:hover { transform: none; }
}

/* =============================================
   FOCUS STYLES (accessibility)
   ============================================= */
:focus-visible {
  outline: 3px solid var(--clr-teal);
  outline-offset: 3px;
  border-radius: 2px;
}