/* TutorPlace public site. Hand-written, no build step, no third-party CSS.
   Tokens follow the newer GP7 web apps (gp7-play / gp7-library design-tokens.css):
   system fonts, 4/8-pt grid, 12px cards, 44px hit targets, GP7 blue as the action colour.
   The warm gradient is TutorPlace's own brand colour and is used for the hero only. */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  --radius-card: 12px;
  --radius-control: 8px;
  --hit-target: 44px;

  --color-bg: #f2f4f7;
  --color-surface: #ffffff;
  --color-separator: #e2e5ea;
  --color-label: #14171c;
  --color-secondary-label: #515864;
  --color-accent: #337ab7;
  --color-accent-strong: #285f8f;
  --color-accent-soft: #e6f1fa;
  --color-attention: #e8590c;
  --brand-from: #d53369;
  --brand-to: #daae51;
  --brand-ink: #7a1d3d;

  --header-h: 60px;
  --page-max: 1080px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--color-label);
  background: var(--color-bg);
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 750;
}

h3 {
  font-size: 1.125rem;
  font-weight: 650;
}

p {
  margin: 0;
}

a {
  color: var(--color-accent-strong);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-attention);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.skip {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 50;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-control);
}

.skip:focus {
  top: var(--space-2);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-separator);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--hit-target);
  font-size: 1.3125rem;
  font-weight: 800;
  color: var(--color-label);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 28px;
  height: 28px;
}

.site-nav {
  display: none;
  gap: var(--space-1);
  margin-left: var(--space-4);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit-target);
  padding: 0 var(--space-3);
  color: var(--color-secondary-label);
  text-decoration: none;
  font-size: 1rem;
  border-radius: var(--radius-control);
}

.site-nav a:hover {
  color: var(--color-label);
  background: var(--color-bg);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--hit-target);
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--color-accent-strong);
}

.btn-quiet {
  background: var(--color-surface);
  color: var(--color-accent-strong);
  border-color: var(--color-separator);
}

.btn-quiet:hover {
  background: var(--color-accent-soft);
}

.btn-large {
  min-height: 52px;
  padding: 0 var(--space-6);
  font-size: 1.125rem;
}

.btn-compact {
  padding: 0 var(--space-4);
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(100deg, var(--brand-from) 0%, var(--brand-to) 100%);
  color: #fff;
  padding: var(--space-7) 0 var(--space-8);
}

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

.hero p.lede {
  margin-top: var(--space-4);
  font-size: 1.25rem;
  max-width: 34em;
}

.hero-art {
  display: none;
}

.doors {
  margin-top: calc(-1 * var(--space-7));
  display: grid;
  gap: var(--space-4);
}

.door {
  background: var(--color-surface);
  border: 1px solid var(--color-separator);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.door .who {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

.door p {
  color: var(--color-secondary-label);
}

.door .actions {
  margin-top: auto;
  padding-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---------- Sections ---------- */

.section {
  padding: var(--space-8) 0 0;
}

.section:last-of-type {
  padding-bottom: var(--space-8);
}

.section > .wrap > h2 + p {
  margin-top: var(--space-3);
  color: var(--color-secondary-label);
  max-width: 44em;
}

.cards {
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-4);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-separator);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}

.card h2 {
  font-size: 1.125rem;
  font-weight: 650;
}

.card p {
  margin-top: var(--space-2);
  color: var(--color-secondary-label);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-3);
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-weight: 750;
}

.feature-list {
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-4) var(--space-6);
}

.feature-list li {
  padding-left: var(--space-5);
  position: relative;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(100deg, var(--brand-from), var(--brand-to));
}

.feature-list strong {
  display: block;
}

.feature-list span {
  color: var(--color-secondary-label);
}

.price {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: var(--space-2);
}

.fineprint {
  margin-top: var(--space-4);
  font-size: 0.9375rem;
  color: var(--color-secondary-label);
  max-width: 52em;
}

/* ---------- Video: one reserved 16:9 box; the player loads only after a click ---------- */

.video {
  position: relative;
  margin-top: var(--space-5);
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 860px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #1c1f24;
}

.video iframe,
.video .video-start {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video .video-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
  font: inherit;
  font-weight: 650;
  color: #fff;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(100deg, rgba(213, 51, 105, 0.92), rgba(218, 174, 81, 0.92));
}

.video .video-start svg {
  width: 64px;
  height: 64px;
}

.video .video-start small {
  font-weight: 400;
  opacity: 0.92;
}

/* ---------- Guides: a secondary list, collapsed until asked for ---------- */

.guides {
  margin-top: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-separator);
  border-radius: var(--radius-card);
}

.guides details + details {
  border-top: 1px solid var(--color-separator);
}

.guides summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-2) var(--space-5);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.guides summary::-webkit-details-marker {
  display: none;
}

.guides summary::before {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-left: 7px solid var(--color-accent);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: transform 120ms ease-out;
}

.guides details[open] > summary::before {
  transform: rotate(90deg);
}

.guides summary .tag {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-secondary-label);
  white-space: nowrap;
}

.guides .guide-body {
  padding: 0 var(--space-5) var(--space-5);
}

.guides .guide-body .video {
  margin-top: 0;
}

.guides .guide-body p {
  margin-bottom: var(--space-3);
  color: var(--color-secondary-label);
}

/* ---------- Plain pages (help, terms) ---------- */

.page {
  padding: var(--space-7) 0 var(--space-8);
}

.page h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.page .lede {
  margin-top: var(--space-3);
  color: var(--color-secondary-label);
  max-width: 40em;
}

.legal {
  margin-top: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-separator);
  border-radius: var(--radius-card);
  /* The legal text brings its own 30px margin (kept unchanged); the card adds none. */
  padding: 0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  /* Only the spacing around the unchanged legal text is narrowed on a phone, so lines are not 25 characters long. */
  .legal > div {
    margin: var(--space-4) !important;
  }
}

.legal ul,
.legal ol {
  padding-left: var(--space-5);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-separator);
  background: var(--color-surface);
  padding: var(--space-5) 0;
  font-size: 0.9375rem;
  color: var(--color-secondary-label);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  margin-left: auto;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit-target);
}

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
  .doors {
    grid-template-columns: 1fr 1fr;
  }

  .cards.three {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-list {
    grid-template-columns: 1fr 1fr;
  }

  .wrap {
    padding: 0 var(--space-5);
  }
}

@media (min-width: 960px) {
  .site-nav {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero-art {
    display: block;
    justify-self: end;
    width: 100%;
    max-width: 420px;
    height: auto;
  }

  .feature-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* On a phone the header keeps only what a visitor came for: join or sign in. */
@media (max-width: 420px) {
  .brand {
    font-size: 1.125rem;
  }

  .header-actions .btn {
    padding: 0 var(--space-3);
    font-size: 0.9375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .guides summary::before {
    transition: none;
  }
}
