/* Global Atelier landing page. Tokens mirror the Figma variables. */
:root {
  --bg-page: #fbf9f5;
  --bg-surface: #fff;
  --bg-inverse: #2f4858;
  --bg-accent-soft: #fff5e6;
  --text-primary: #1f1d23;
  --text-secondary: #5b6b7a;
  --text-inverse: #fff;
  --border: #d4d8da;
  --accent: #14a3af;
  --shadow-subtle: 0 2px 8px rgba(33, 28, 41, 0.08);

  --font-sans: "Montserrat", system-ui, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;

  --gutter: 48px;
  --section-y: 72px;
  --col-gap: 96px;
  --max-width: 1440px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, blockquote, figure, ol { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }

[id] { scroll-margin-top: 64px; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 42px;
}
.h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 34px;
}
.label {
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.body-l { font-size: 16px; line-height: 24px; }
.body-m { font-size: 14px; line-height: 20px; }
.nav-link {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.56px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-inverse);
}
.nav-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  border: 0;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn--primary,
.btn--light { height: 40px; }
.btn--primary { background: var(--bg-inverse); color: var(--text-inverse); }
.btn--primary:hover { background: #243845; }
.btn--light { background: var(--bg-page); color: var(--bg-inverse); }
.btn--light:hover { background: #fff; }
.btn--ghost { border-radius: 4px; color: var(--bg-inverse); }
.btn--ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn:focus-visible,
.nav-link:focus-visible,
summary:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}
.split { display: flex; gap: var(--col-gap); }
.split > * { flex: 1 1 0; min-width: 0; }
.split--top { align-items: flex-start; }
.split--center { align-items: center; }
.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.section-head { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 32px;
  background: var(--bg-inverse);
  filter: drop-shadow(0 2px 4px rgba(33, 28, 41, 0.08));
}
.topbar__nav { display: flex; align-items: center; gap: 40px; }
.topbar__toggle { display: none; }

/* ---------- Hero ---------- */
.hero .container { display: flex; flex-direction: column; gap: 22px; padding-top: calc(var(--section-y) + 50px); padding-bottom: 50px; }
.hero__body { display: flex; flex-direction: column; gap: 28px; }
/* The body steps down so its first line starts where the headline ends. */
.hero__row {
  display: grid;
  /* Same 5/7 columns as the Problem and Founder rows, so the right column lines up. */
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: var(--col-gap);
  /* Space below the headline, since it can run over the right column at tablet widths. */
  row-gap: 16px;
}
/* The headline keeps its design width; it can run past the left column because the body sits on the row below. */
.hero__row .h1 { grid-column: 1 / -1; grid-row: 1; max-width: 624px; }
.hero__row .hero__body {
  grid-column: 2;
  grid-row: 2;
}

/* Collage: transparent illustration over a cream/white split backdrop. On phones it is shown
   at 2x width and centre-cropped so the scenes stay legible. */
.collage {
  --scale: 1;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg-page) 55%, var(--bg-surface) 55%);
}
.collage img {
  display: block;
  width: min(calc(100% * var(--scale)), 2048px);
  max-width: none;
  height: auto;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* ---------- Problem ---------- */
.problem { background: var(--bg-surface); }
.problem__left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.problem__right { padding-top: 36px; }
.pull-quote {
  font-family: var(--font-serif);
  font-size: 24px;
  font-style: italic;
  font-weight: 700;
  line-height: 34px;
  color: var(--text-secondary);
}

/* ---------- Advantage ---------- */
.advantage .container { display: flex; flex-direction: column; gap: 28px; }
.advantage .h2 { color: var(--text-primary); }
.cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-subtle);
}
.card__num {
  padding-bottom: 4px;
  font-family: var(--font-serif);
  font-size: 48px;
  font-style: italic;
  font-weight: 700;
  line-height: normal;
  color: var(--accent);
}

/* ---------- Founding membership ---------- */
.membership { background: var(--bg-inverse); color: var(--text-inverse); }
.membership .eyebrow { color: rgba(255, 255, 255, 0.75); }
.membership .body-l { color: rgba(255, 255, 255, 0.85); }
.actions--apply { padding-top: 6px; }
/* With the video hidden the text stands alone, so keep it to a readable width. */
.membership .stack { max-width: 720px; }
.video {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 352px;
  overflow: hidden;
  background: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}
.video iframe,
.video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--text-inverse);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
}
.video__play:hover:not(:disabled) { transform: scale(1.06); }
.video__play:disabled { cursor: default; }

/* ---------- Founder ---------- */
.founder { background: var(--bg-accent-soft); }
.founder .container { display: flex; flex-direction: column; gap: 28px; }
/* Problem, Founder and FAQ share one two-column grid so their columns line up. */
.problem__row,
.founder__row,
.faq__row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--col-gap);
  align-items: center;
}
/* Problem and FAQ keep their columns top-aligned; the founder block centers on the photo. */
.problem__row,
.faq__row { align-items: start; }
.founder__image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 22%;
  background: var(--border);
  border-radius: 8px;
}

/* ---------- Social proof ---------- */
.proof { background: var(--bg-surface); text-align: center; }
.proof .container { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.proof figure { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.proof__quote { max-width: 880px; }
.proof__cite { color: var(--text-secondary); }

/* ---------- FAQ ---------- */
.faq__item { border-top: 1px solid var(--border); }
.faq__item:last-child { border-bottom: 1px solid var(--border); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary img { flex: none; transition: transform 0.2s; }
.faq__item[open] summary img { transform: rotate(45deg); }
.faq__item p { padding: 0 36px 24px 0; color: var(--text-secondary); }
.link-button {
  padding: 0;
  font: inherit;
  color: var(--bg-inverse);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}
.link-button:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { background: var(--bg-inverse); color: var(--text-inverse); }
.footer .container { display: flex; flex-direction: column; gap: 24px; padding: 34px var(--gutter) 6px; }
.footer__main { display: flex; align-items: last baseline; justify-content: space-between; gap: 40px; }
.footer__brand { display: flex; flex-direction: column; gap: 20px; }
.footer__tagline { display: flex; align-items: center; gap: 12px; }
.footer__tagline img { flex: none; }
.footer__tagline .eyebrow { max-width: 368px; font-size: 11px; line-height: 15px; color: rgba(255, 255, 255, 0.75); }
.footer__links { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.footer__legal { font-size: 12px; line-height: 18px; color: rgba(255, 255, 255, 0.75); }
.footer__legal a { text-decoration: none; }
.footer__legal a:hover { text-decoration: underline; }

/* ---------- Membership pop-up ---------- */
.modal {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  overflow: auto;
  color: var(--text-primary);
  background: var(--bg-page);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(33, 28, 41, 0.24);
}
.modal::backdrop { background: rgba(31, 29, 35, 0.6); }
body:has(.modal[open]) { overflow: hidden; }
.modal__body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 40px; }
.modal__body[hidden] { display: none; }
.modal__intro { color: var(--text-secondary); }
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--text-secondary);
  background: none;
  border: 0;
  cursor: pointer;
}
.modal__close:hover { color: var(--text-primary); }

.join-form { display: flex; flex-direction: column; gap: 16px; width: 100%; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.field__optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-secondary); }
.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: 16px/24px var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.field textarea {
  width: 100%;
  min-height: 132px;
  padding: 10px 14px;
  font: 16px/24px var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #b3261e; }
.field__error,
.join-form__status { font-size: 13px; line-height: 18px; color: #b3261e; }
.field__error:empty,
.join-form__status:empty { display: none; }
.join-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.join-form__submit { align-self: flex-start; margin-top: 8px; }
.join-form__submit:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  :root { --col-gap: 64px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Between the hamburger breakpoint and full desktop, tighten the nav so it clears the logo. */
@media (min-width: 901px) and (max-width: 1100px) {
  .topbar__nav { gap: 24px; }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; --section-y: 56px; }

  /* Mobile nav: hamburger opens a stacked panel under the bar. */
  .topbar { padding: 0 var(--gutter); }
  .topbar__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .topbar__toggle span {
    display: block;
    height: 2px;
    background: var(--text-inverse);
    transition: transform 0.2s, opacity 0.2s;
  }
  .topbar__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topbar__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .topbar__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .topbar__nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 24px var(--gutter) 32px;
    background: var(--bg-inverse);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
  .topbar__nav.is-open { display: flex; }

  /* Every two-column row stacks. */
  .split { flex-direction: column; align-items: stretch; gap: 32px; }
  .hero__row { grid-template-columns: 1fr; row-gap: 32px; }
  .hero__row .hero__body { grid-column: 1; }
  .split > *,
    .problem__right { padding-top: 0; }

  .collage { --scale: 2; }

  .h1 { font-size: 28px; line-height: 36px; }
    .proof__quote { font-size: 26px; line-height: 34px; }

  .video { height: auto; aspect-ratio: 16 / 9; }
  .problem__row,
  .founder__row,
  .faq__row { grid-template-columns: 1fr; gap: 32px; }
  .founder__image { max-width: 480px; }

  .footer .container { padding-bottom: 24px; }
  .footer__main { flex-direction: column; align-items: flex-start; }
  .footer__links { flex-direction: column; gap: 16px; }

  .modal__body { padding: 40px 24px 28px; }
  .join-form__submit { align-self: stretch; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
