/* =========================================================
   AWBY Tutoring — Layout
   Header, containers, section rhythm, and grid patterns.
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 600px) {
  .container {
    padding-inline: var(--space-6);
  }
}

section {
  padding-block: var(--space-9);
}

@media (min-width: 900px) {
  section {
    padding-block: 112px;
  }
}

.section--alt {
  background: var(--color-bg-alt);
}

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

.section--tint-purple {
  background: var(--color-purple-100);
}

.section--gradient {
  background: var(--gradient-brand);
  color: var(--color-white);
}

.section--gradient h2,
.section--gradient p {
  color: var(--color-white);
}

.section--gradient .hero__sub {
  color: rgba(255, 255, 255, 0.85);
}

.section--gradient .btn-primary {
  background: var(--color-white);
  color: var(--color-primary-strong);
}

.section--gradient .btn-primary:hover {
  filter: none;
  background: var(--color-offwhite);
}

.section-head {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-7);
}

.section-eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.section-head p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin-bottom: 0;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--header-height);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary-strong);
  text-decoration: none;
}

.site-logo img,
.site-logo svg {
  height: 56px;
  width: auto;
}

.primary-nav {
  display: none;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 4px;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
}

.primary-nav a[aria-current="page"] {
  background: var(--gradient-brand);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-primary-strong);
}

@media (min-width: 1080px) {
  .primary-nav {
    display: block;
  }
  .nav-toggle {
    display: none;
  }
}

/* Mobile menu overlay */
.mobile-menu {
  /* NOTE: .site-header uses backdrop-filter, which makes it the containing
     block for this fixed-position child — so "bottom: 0" / "inset" would
     resolve against the header's own small box, not the viewport. Using
     top + height:100vh-based sizing instead keeps this correct regardless
     of which ancestor ends up as the containing block. */
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  height: calc(100vh - var(--header-height));
  background: var(--color-white);
  z-index: 49;
  padding: var(--space-7) var(--space-5);
  overflow-y: auto;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-primary-strong);
  text-decoration: none;
  font-weight: 600;
}

@media (min-width: 1080px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-8) var(--space-9);
  background: linear-gradient(180deg, var(--color-sky-100) 0%, var(--color-white) 55%);
}

.hero__inner {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-8);
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-sky-100);
  color: var(--color-primary);
  font-weight: 700;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
}

.hero h1 {
  margin-bottom: var(--space-4);
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-5);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.hero__meta li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero__meta svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.hero__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

/* Soft ambient glow behind the hero art — a blurred gradient aura for
   depth, inspired by the neon-glow treatment common on modern SaaS hero
   banners, toned down to the brand's navy/purple/sky palette. */
.hero__art::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 0;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(139, 92, 246, 0.45) 0%,
    rgba(169, 211, 236, 0.38) 42%,
    transparent 70%
  );
  filter: blur(50px);
  pointer-events: none;
}

/* Decorative background shapes behind the hero photo */
.hero__decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.hero__decor--hex {
  top: -6%;
  right: 6%;
  width: 64px;
  color: var(--color-purple-500);
  opacity: 0.5;
}

.hero__decor--ring {
  bottom: -8%;
  left: -4%;
  width: 90px;
  color: var(--color-sky-400);
  opacity: 0.7;
}

.hero__decor--dots {
  top: 12%;
  left: -6%;
  width: 90px;
  color: var(--color-navy-700);
  opacity: 0.18;
}

.hero__photo-wrap {
  position: relative;
  z-index: 1;
  width: min(420px, 90%);
}

.hero__photo {
  width: 100%;
  aspect-ratio: 4 / 4.1;
  object-fit: cover;
  border-radius: 42% 58% 54% 46% / 48% 42% 58% 52%;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--color-white);
}

/* Logo-in-hero variant: the mark shown as large as the column allows,
   inside an intentional white "plaque" card (the logo file itself has an
   opaque white background, so this turns that into a deliberate frame
   instead of an accidental hard-edged rectangle). */
.hero__photo-wrap--logo {
  width: min(600px, 96%);
}

.hero__logo-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-7);
}

.hero__logo-large {
  width: 100%;
  height: auto;
  display: block;
}

.floating-badge {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-strong);
  white-space: nowrap;
}

.floating-badge__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.floating-badge__icon svg {
  width: 16px;
  height: 16px;
}

.floating-badge--1 {
  top: -4%;
  left: -10%;
}

.floating-badge--2 {
  top: 42%;
  right: -14%;
}

.floating-badge--3 {
  bottom: -6%;
  left: -8%;
}

@media (max-width: 599px) {
  .floating-badge {
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
    gap: var(--space-2);
  }
  .floating-badge--1 { left: -2%; }
  .floating-badge--2 { right: -2%; }
  .floating-badge--3 { left: 2%; }
}

/* ---- Photo collage (Why AWBY section) ---- */
.photo-collage {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-4);
  align-items: end;
}

.photo-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 5px solid var(--color-white);
}

.photo-collage__main-wrap {
  position: relative;
}

.photo-collage__main {
  aspect-ratio: 4 / 5;
}

/* Bold caption overlaid directly on the photo — an editorial-style label,
   not a caption sitting below it. */
.photo-collage__caption {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(22, 48, 92, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  max-width: calc(100% - var(--space-6));
}

.photo-collage__caption svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.photo-collage__secondary {
  aspect-ratio: 4 / 5;
  margin-top: var(--space-7);
}

.photo-collage__main-wrap,
.photo-collage__secondary {
  transition: transform var(--duration-fast) var(--ease-standard);
}

@media (hover: hover) {
  .photo-collage__main-wrap:hover,
  .photo-collage__secondary:hover {
    transform: translateY(-6px) scale(1.015);
  }

  .photo-collage__main-wrap:hover img {
    box-shadow: var(--glow-purple);
  }

  .photo-collage__secondary:hover {
    box-shadow: var(--glow-purple);
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-collage__main-wrap,
  .photo-collage__secondary {
    transition: none;
  }
}

/* ---- Trust strip (compact social-proof band under the hero) ---- */
.trust-strip-section {
  padding-block: var(--space-6) !important;
  background: var(--color-white);
  border-block: 1px solid var(--color-border);
}

.trust-strip {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}

@media (min-width: 800px) {
  .trust-strip {
    flex-direction: row;
    text-align: left;
  }
}

.trust-strip__quote {
  margin: 0;
  font-style: italic;
  color: var(--color-primary-strong);
  font-weight: 500;
  flex: 1 1 auto;
}

.trust-strip__divider {
  display: none;
}

@media (min-width: 800px) {
  .trust-strip__divider {
    display: block;
    width: 1px;
    align-self: stretch;
    background: var(--color-border);
  }
}

.trust-strip__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  justify-content: center;
  flex-shrink: 0;
}

.trust-strip__facts li {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

/* ---- Grids ---- */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--subjects {
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .grid--subjects {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .grid--subjects {
    grid-template-columns: repeat(4, 1fr);
  }
}

.benefits-row {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .benefits-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .benefits-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid--steps {
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .grid--steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .grid--steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid--testimonials {
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .grid--testimonials {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Generic reusable grids (tutors, services, pricing factors, etc.) */
.grid--2 {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid--3 {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1000px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.why-awby {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 900px) {
  .why-awby {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

/* ---- Booking layout ---- */
.book-layout {
  display: grid;
  gap: var(--space-7);
}

@media (min-width: 1000px) {
  .book-layout {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.book-page-hero {
  padding-block: var(--space-7) var(--space-6);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-navy-900);
  color: var(--color-sky-100);
  padding-block: var(--space-8) var(--space-6);
}

.site-footer a {
  color: var(--color-white);
}

.footer-logo-card {
  display: inline-flex;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}

.footer-logo-card img {
  height: 48px;
  width: auto;
  display: block;
}

.footer-top {
  display: grid;
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}

@media (min-width: 700px) {
  .footer-top {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-nav a {
  text-decoration: none;
  opacity: 0.9;
}

.footer-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
}

.footer-meta li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  opacity: 0.9;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-5);
  font-size: var(--text-sm);
  opacity: 0.75;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
}
