/* ============================================================
   FOXWOOD READING ROOM — STYLESHEET
   ============================================================ */

/* --- Custom properties ------------------------------------ */
:root {
  --purple: #4f2c57;
  --purple-dark: #361a3c;
  --teal: #3a4e58;
  --teal-hover: #4a6070;
  --lavender: #ccb8df;
  --lavender-dim: rgba(204, 184, 223, 0.55);
  --text: #f0e6f8;
  --text-muted: #d4bde8;
  --text-faint: rgba(210, 185, 240, 0.55);
  --nav-bg: rgba(36, 14, 44, 0.95);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --max-w: 1700px;
  --pad-section: 110px;
  --pad-x: 72px;
  --radius-card: 18px;
}

/* --- Reset ------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;

  font-size: 22px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--purple);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.75;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('images/site-bg.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  z-index: -1;
  animation: bg-fade-in 2.4s ease forwards;
}

@keyframes bg-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

img {
  display: block;
  max-width: 100%;
}
ul {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}

p {
  margin-bottom: 1em;
}
p:last-child {
  margin-bottom: 0;
}

/* --- Section wrapper -------------------------------------- */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* Full-viewport sections — each one owns its own screen */
.about,
.classes,
.tutoring,
.evaluations,
.faq,
.testimonials {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 200;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200, 175, 230, 0.14);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--text);
  white-space: nowrap;
  transition:
    color 0.5s,
    opacity 0.2s;
}
.nav-brand.is-dimmed {
  color: var(--lavender);
}
.nav-brand:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--lavender);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 20px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--lavender);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* X state */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  padding: 120px var(--pad-x) 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Hero two-column layout */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 6vw, 100px);
  max-width: var(--max-w);
  width: 100%;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

/* Arch logo frame */
.arch-frame {
  flex-shrink: 0;
  width: clamp(240px, 26vw, 420px);
  height: clamp(308px, 33vw, 540px);
  background: var(--lavender);
  border-radius: 50% 50% var(--radius-card) var(--radius-card) / 38% 38%
    var(--radius-card) var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 22px 24px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
}

/* Small arch variant (FAQ section) */
.arch-frame--sm {
  width: clamp(150px, 16vw, 240px);
  height: clamp(192px, 20vw, 308px);
  padding: 20px 16px 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}

.arch-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.logo-img {
  width: clamp(160px, 17vw, 270px);
  height: auto;
  mix-blend-mode: multiply;
}
.arch-frame--sm .logo-img {
  width: clamp(100px, 11vw, 170px);
}

.logo-wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.78rem;
  color: #3d1a58;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0;
}
.arch-frame--sm .logo-wordmark {
  font-size: 0.68rem;
}

/* Welcome bubble */
.welcome-bubble {
  background: rgba(58, 78, 88, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 62% 38% 54% 46% / 48% 56% 44% 52%;
  width: clamp(380px, 50vw, 700px);
  height: clamp(380px, 50vw, 700px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(52px, 7vw, 100px) clamp(40px, 6vw, 80px);
  flex-shrink: 0;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.24);
}

.welcome-eyebrow {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px !important;
}

.welcome-bubble p {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: var(--pad-section) var(--pad-x);
  position: relative;
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.teal-card {
  background: rgba(58, 78, 88, 0.58);
  border-radius: var(--radius-card);
  padding: clamp(32px, 3.5vw, 52px) clamp(28px, 3vw, 48px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.profile-photo {
  width: 200px;
  height: 280px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  float: right;
  margin: 4px 0 20px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  border: 3px solid rgba(204, 184, 223, 0.35);
}

.teal-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.teal-card h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(210, 185, 240, 0.28);
}
.teal-card h3:first-child {
  margin-top: 0;
}

.teal-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.74;
}

.teal-card ul {
  margin-bottom: 1em;
}
.teal-card ul li {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.72;
  padding-left: 1.1em;
  position: relative;
}
.teal-card ul li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--lavender);
}

.footnote {
  font-size: 0.7rem !important;
  color: var(--text-faint) !important;
  line-height: 1.55 !important;
  margin-top: 22px !important;
  padding-top: 14px;
  border-top: 1px solid rgba(210, 185, 240, 0.18);
}
.footnote a {
  color: var(--lavender-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.footnote a:hover {
  color: var(--lavender);
}

/* ============================================================
   CLASSES
   ============================================================ */
.classes {
  padding: var(--pad-section) var(--pad-x);
  position: relative;
  overflow: hidden;
}

.classes-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.classes-text h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.classes-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.classes-text strong {
  color: var(--text);
}
.classes-text em {
  font-style: italic;
}

.classes-cta {
  padding-top: 6px;
}

.cta-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pill-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============================================================
   PILL BUTTONS
   ============================================================ */
.pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 30px;
  background: var(--teal);
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.04em;
  transition: background 0.22s;
  cursor: pointer;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
}
.pill-btn:hover {
  background: var(--teal-hover);
}

/* Icon arrow — always visible, pinned to right edge */
.pill-btn:not(.pill-btn--email):not([disabled]) {
  justify-content: space-between;
  gap: 14px;
}
.pill-btn:not(.pill-btn--email):not([disabled])::after {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")
    center / 15px no-repeat;
  transition:
    background-color 0.22s ease,
    transform 0.22s ease;
}
.pill-btn:not(.pill-btn--email):not([disabled]):hover::after {
  background-color: rgba(255, 255, 255, 0.28);
  transform: translateX(3px);
}

.pill-btn--lg {
  padding: 18px 44px;
  font-size: 0.88rem;
}

.pill-btn--email {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  padding: 22px 40px;
  line-height: 1.4;
}

/* ============================================================
   TUTORING
   ============================================================ */
.tutoring {
  padding: var(--pad-section) var(--pad-x);
}

.tutoring-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}

.tutoring-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.tutoring-text strong {
  color: var(--text);
}

.tutoring-action {
  display: flex;
  justify-content: center;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  padding: var(--pad-section) var(--pad-x);
  position: relative;
  overflow: hidden;
}

.faq .teal-card {
  max-width: 860px;
  margin: 0 auto;
}

/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.accordion-item {
  border-bottom: 1px solid rgba(210, 185, 240, 0.2);
}
.accordion-item:last-child {
  border-bottom: none;
}

.accordion-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  gap: 16px;
  transition: color 0.2s;
}
.accordion-item summary::-webkit-details-marker {
  display: none;
}
.accordion-item summary:hover {
  color: var(--lavender);
}

.accordion-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--lavender);
  flex-shrink: 0;
  transition: transform 0.3s ease;
  line-height: 1;
  font-family: var(--font-body);
}
.accordion-item[open] > summary::after {
  transform: rotate(45deg);
}

.accordion-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.38s ease;
}

.accordion-body p {
  padding-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ============================================================
   EVALUATIONS
   ============================================================ */
.evaluations {
  padding: var(--pad-section) var(--pad-x);
  position: relative;
  overflow: hidden;
}

.evaluations-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}

.evaluations-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.evaluations-action {
  display: flex;
  justify-content: center;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials {
  padding: var(--pad-section) var(--pad-x);
  position: relative;
  overflow: hidden;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  margin-bottom: 52px;
  letter-spacing: 0.02em;
}

/* About, FAQ, Testimonials have green blocks below — center their headings */
#about .section-heading,
#faq .section-heading {
  text-align: center;
}

#testimonials .section-heading {
  text-align: center;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.carousel-viewport {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonials-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card {
  min-width: 100%;
  box-sizing: border-box;
}

.testimonial-card blockquote {
  font-style: italic;
}
.testimonial-card blockquote p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.82;
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Carousel nav buttons */
.carousel-btn {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.carousel-btn:hover {
  background: var(--teal-hover);
  transform: scale(1.06);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

/* Dot indicators */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(204, 184, 223, 0.25);
  border: 1.5px solid rgba(204, 184, 223, 0.45);
  cursor: pointer;
  transition:
    background 0.22s,
    transform 0.15s;
  padding: 0;
}
.carousel-dot.active {
  background: var(--lavender);
  border-color: var(--lavender);
  transform: scale(1.25);
}
.carousel-dot:hover:not(.active) {
  background: rgba(204, 184, 223, 0.45);
}

/* ============================================================
   FORM DRAWER
   ============================================================ */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.form-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(680px, 92vw);
  background: var(--purple-dark);
  border-left: 1px solid rgba(200, 175, 230, 0.14);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s 0.38s;
}
.form-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition:
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(200, 175, 230, 0.14);
  flex-shrink: 0;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.drawer-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(204, 184, 223, 0.1);
  border: 1px solid rgba(204, 184, 223, 0.2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s;
}
.drawer-close:hover {
  background: rgba(204, 184, 223, 0.2);
  color: var(--text);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  background: #fff;
}

#drawerFrame {
  display: block;
  width: 100%;
  border: none;
}

/* Prevent page scroll while drawer is open */
body.drawer-open {
  overflow: hidden;
}

/* Disabled pill button */
.pill-btn--disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* ============================================================
   CONTACT AREA (bottom of Testimonials section)
   ============================================================ */
.contact-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 72px;
  padding-top: 52px;
  border-top: 1px solid rgba(200, 175, 230, 0.14);
}

.footer-logo {
  width: clamp(200px, 12vw, 400px);
  height: auto;
  mix-blend-mode: multiply;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -8px;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-faint);
}

/* ============================================================
   RESPONSIVE — TABLET  (≤ 960px)
   ============================================================ */
@media (max-width: 960px) {
  :root {
    --pad-section: 72px;
    --pad-x: 48px;
  }

  .about-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-aside {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .classes-grid,
  .tutoring-grid,
  .evaluations-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .tutoring-action,
  .evaluations-action {
    justify-content: flex-start;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --pad-section: 56px;
    --pad-x: 24px;
  }

  html {
    font-size: 18px;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(200, 175, 230, 0.14);
    padding: 8px 0 16px;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    padding: 12px var(--pad-x);
    font-size: 0.95rem;
  }
  .nav-links a::after {
    display: none;
  }

  /* Hero stacks vertically */
  .hero-content {
    flex-direction: column;
    gap: 28px;
    margin-bottom: 40px;
  }

  /* Profile photo: clear float, center above text */
  .profile-photo {
    float: none;
    display: block;
    margin: 0 auto 24px;
  }

  .welcome-bubble {
    width: 110vw;
    height: auto;
    min-height: 110vw;
    padding: 52px 48px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Carousel: hide nav buttons on mobile, swipe/dots only */
  .carousel-btn {
    display: none;
  }

  .carousel-wrapper {
    gap: 0;
  }
}
