/* ==========================================================================
   tutorHQ — landing page styles
   Palette: white page background, deep royal blue → sky blue gradient hero,
   blue as the single accent colour everywhere else.
   ========================================================================== */

:root {
  --blue-deep: #0a2472;
  --blue-mid: #1451c4;
  --blue-bright: #2f7ff0;
  --blue-sky: #6fb3ff;
  --accent: #1451c4;
  --accent-dark: #0a2472;
  --ink: #10182b;
  --ink-soft: #4a5468;
  --line: #e6e9f2;
  --paper: #ffffff;
  --paper-tint: #f6f8fc;

  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;

  --shadow-card: 0 10px 30px -12px rgba(16, 24, 43, 0.15);
  --shadow-btn: 0 8px 20px -6px rgba(20, 81, 196, 0.45);

  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ NAV ============ */

.nav {
  padding: 20px 24px 8px;
}

.nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  font-size: 1.5rem;
  line-height: 1;
}

.wordmark__tutor {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}

.wordmark__hq {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(20, 81, 196, 0.5);
}

.btn--light {
  background: #ffffff;
  color: var(--accent-dark);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.35);
}

.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.4);
}

.btn--block {
  width: 100%;
}

/* ============ HERO ============ */

.hero {
  padding: 12px 16px 0;
}

.hero__panel,
.cta-band__panel {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background: #0d1b4c;
}

.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 90% at 50% -5%, rgba(160, 205, 255, 0.95) 0%, rgba(94, 158, 245, 0.4) 32%, transparent 65%),
    radial-gradient(130% 130% at 8% 105%, rgba(2, 8, 32, 0.5) 0%, transparent 55%),
    radial-gradient(130% 130% at 100% 105%, rgba(2, 8, 32, 0.5) 0%, transparent 55%),
    linear-gradient(180deg, #1f5be0 0%, #123a9e 45%, #081c58 85%, #051339 100%);
}

.hero__glow--small {
  background:
    radial-gradient(90% 160% at 90% 10%, var(--blue-sky) 0%, transparent 55%),
    linear-gradient(120deg, var(--blue-deep) 0%, var(--blue-mid) 60%, var(--blue-bright) 100%);
}

/* Subtle film-grain noise overlay, generated inline as SVG (no external assets) */
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 64px 48px 68px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__kicker {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 14px;
  font-size: 1.02rem;
}

.hero__headline {
  font-family: var(--font-sans);
  font-weight: 800;
  color: #fff;
  font-size: clamp(2.2rem, 5.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.hero__subtext {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  font-weight: 400;
  max-width: 540px;
  margin: 0 0 28px;
}

/* ============ SECTIONS ============ */

.section {
  padding: 96px 0;
}

.section__heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}

.section__heading h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 14px;
  color: var(--ink);
}

.section__heading p {
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 0;
}

/* ============ CARDS ============ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--paper-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -14px rgba(16, 24, 43, 0.22);
}

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-bright));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: var(--ink);
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.learn__teaser {
  text-align: center;
  margin: 48px auto 0;
  max-width: 560px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ============ FEATURE SECTIONS (software / community teasers) ============ */

.feature {
  background: var(--paper-tint);
  border-radius: var(--radius-lg);
  max-width: 1160px;
  margin: 24px auto;
  padding: 72px 56px;
}

.feature__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 0;
}

.feature--flip .feature__grid {
  direction: rtl;
}

.feature--flip .feature__grid > * {
  direction: ltr;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.feature__copy h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  margin: 0 0 18px;
  color: var(--ink);
}

.feature__copy p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 28px;
}

.feature__visual {
  display: flex;
  justify-content: center;
}

.mock-box {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--blue-deep), var(--blue-mid) 60%, var(--blue-bright));
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.mock-box::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

.mock-box__bar {
  width: 40%;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
}

.mock-box__lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.mock-box__lines span {
  display: block;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.25);
}

.mock-box__lines span:nth-child(1) {
  width: 90%;
}
.mock-box__lines span:nth-child(2) {
  width: 70%;
}
.mock-box__lines span:nth-child(3) {
  width: 80%;
}

.mock-box__pill {
  margin-top: auto;
  width: 45%;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

.mock-box--community .mock-box__avatars {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.mock-box--community .mock-box__avatars span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.mock-box--community .mock-box__lines span {
  height: 10px;
}

/* ============ FINAL CTA BAND ============ */

.cta-band {
  padding: 24px 16px 96px;
}

.cta-band__content {
  position: relative;
  z-index: 2;
  padding: 72px 40px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.cta-band__content h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 16px;
}

.cta-band__content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  margin: 0 0 32px;
}

/* ============ FOOTER ============ */

.footer {
  padding: 56px 24px 40px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.wordmark--footer {
  font-size: 1.3rem;
}

.footer__tagline {
  color: var(--ink-soft);
  margin: 4px 0 0;
}

.footer__meta {
  color: #9aa3b8;
  font-size: 0.9rem;
  margin: 12px 0 0;
}

/* ============ MODAL ============ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 18, 40, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -20px rgba(10, 18, 40, 0.45);
  padding: 8px;
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--paper-tint);
  color: var(--ink-soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.modal__close:hover {
  background: var(--line);
}

.modal__body {
  padding: 48px 56px 56px;
}

.modal__wordmark {
  font-size: 1.4rem;
  margin-bottom: 28px;
}

.modal__intro h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.9rem;
  margin: 0 0 10px;
  color: var(--ink);
}

.modal__intro p {
  color: var(--ink-soft);
  margin: 0 0 32px;
  font-size: 1.02rem;
}

.lead-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 81, 196, 0.12);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='%234a5468' d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.phone-field {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phone-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 81, 196, 0.12);
}

.phone-field__prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: var(--paper-tint);
  color: var(--ink-soft);
  font-weight: 600;
  border-right: 1.5px solid var(--line);
  white-space: nowrap;
}

.phone-field input {
  border: none;
  border-radius: 0;
  flex: 1;
}

.phone-field input:focus {
  box-shadow: none;
}

.lead-form__success {
  text-align: center;
  padding: 40px 0;
}

.lead-form__success h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.9rem;
  margin: 0 0 12px;
  color: var(--ink);
}

.lead-form__success p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .feature--flip .feature__grid {
    direction: ltr;
  }

  .feature--flip .feature__visual {
    order: -1;
  }

  .feature {
    padding: 48px 32px;
  }
}

@media (max-width: 640px) {
  .nav {
    padding: 16px 16px 4px;
  }

  .wordmark {
    font-size: 1.3rem;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .hero__content {
    padding: 64px 24px 72px;
  }

  .section {
    padding: 64px 0;
  }

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

  .feature {
    padding: 40px 22px;
    border-radius: var(--radius-md);
    margin: 16px auto;
  }

  .lead-form__row {
    grid-template-columns: 1fr;
  }

  .modal__body {
    padding: 36px 24px 40px;
  }

  .cta-band__content {
    padding: 56px 24px;
  }
}
