/* ==========================================================================
   Family Office Education — landing page
   Design tokens taken directly from the Figma file's variables.
   ========================================================================== */

/* ---------- Fonts ---------------------------------------------------------
   Involve — SIL Open Font License 1.1 (see assets/fonts/Involve-OFL.md).
   The design uses only the oblique cuts, so they are registered as the
   normal style at weights 600 / 700. That keeps the CSS elsewhere simple.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Involve";
  src: url("/assets/fonts/Involve-SemiBoldOblique.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Involve";
  src: url("/assets/fonts/Involve-BoldOblique.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Display font -------------------------------------------------
   Postertoaster by Seva Abramov (2019), released free for personal and
   commercial use. See assets/fonts/Postertoaster-LICENSE.md for provenance.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Postertoaster";
  src: url("/assets/fonts/Postertoaster.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour tokens — exact values from Figma */
  --black:  #171717;
  --beige:  #FFFCEC;
  --orange: #FF6A34;
  --yellow: #FAEEA8;

  --yellow-glass: #faeea821;
  --orange-glass: #ff6a343b;
  --beige-glass:  #fffcec3b;
  --black-glass:  #17171733;

  --font-body:    "Involve", "Trebuchet MS", system-ui, sans-serif;
  --font-display: "Postertoaster", "Involve", "Trebuchet MS", system-ui, sans-serif;

  --wrap:    1256px;
  --gutter:  clamp(1rem, 4vw, 5.75rem);
  --torn-h:  clamp(34px, 4.5vw, 70px);

  --radius:  14px;
}

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

html {
  scroll-behavior: smooth;
  /* the fixed header would otherwise cover anchor targets */
  scroll-padding-top: clamp(70px, 9vw, 120px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--beige);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.4;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--orange); color: var(--beige);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* ---------- Layout primitives -------------------------------------------- */
/* content is exactly 1256px wide on desktop, matching the Figma frames,
   with the gutter only biting once the viewport is narrower than that */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(3rem, 7vw, 7rem);
}
/* a torn divider always sits flush with the bottom of its section */
.section:has(> .torn) { padding-bottom: 0; }

.section--black { background: var(--black); color: var(--beige); }
.section--beige { background: var(--beige); color: var(--black); }

/* ---------- Torn paper dividers ------------------------------------------
   Each divider is the *next* section's colour, so the jagged top edge reads
   as one section tearing away to reveal the one beneath.
   -------------------------------------------------------------------------- */
.torn {
  height: var(--torn-h);
  margin-top: clamp(2rem, 5vw, 5rem);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% 100%;
}
.torn--black { background-image: url("/assets/svg/torn-a-black.svg"); }
.torn--beige { background-image: url("/assets/svg/torn-a-beige.svg"); }
.torn--b.torn--black { background-image: url("/assets/svg/torn-b-black.svg"); }
.torn--b.torn--beige { background-image: url("/assets/svg/torn-b-beige.svg"); }
.torn--c.torn--black { background-image: url("/assets/svg/torn-c-black.svg"); }
.torn--c.torn--beige { background-image: url("/assets/svg/torn-c-beige.svg"); }

/* ---------- Typography ---------------------------------------------------- */
/* Postertoaster's caps are a separate, differently-drawn set — the design uses
   the lowercase forms throughout, so headings are lowercased wholesale. The
   HTML keeps normal sentence case for screen readers. */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .88;          /* Figma: 88 / 100 */
  letter-spacing: 0;
  text-transform: lowercase;
  font-size: clamp(2rem, 7vw, 6.25rem);   /* Figma H2: 100px */
}
.display--cream  { color: var(--beige); }
.display--yellow { color: var(--yellow); }
.display--orange { color: var(--orange); }
.display--black  { color: var(--black); }
.display em { font-style: normal; color: var(--orange); }

.lead { font-size: clamp(.95rem, 1.35vw, 1.4rem); line-height: 1.35; }
.body-just { text-align: justify; line-height: 1.45; }
.body-center { line-height: 1.5; }

.num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.8vw, 2.8rem);
  line-height: 1;
  display: block;
}

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  font-size: clamp(.72rem, 1.1vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: .85em 1.6em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background-color .15s ease;
}
.btn--primary { background: var(--orange); color: var(--beige); }
.btn--light   { background: var(--beige);  color: var(--black); }
.btn--block   { display: flex; width: 100%; border-radius: var(--radius); }
.btn:hover    { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active   { transform: translateY(0); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--black);
}
.header-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(.4rem, .9vw, .9rem) var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(.4rem, 1.4vw, 1.6rem);
}
.header-logo img { width: clamp(24px, 2.6vw, 40px); height: auto; }

.header-nav {
  display: flex;
  gap: clamp(.3rem, 1vw, 1.1rem);
  margin-left: clamp(.4rem, 2.5vw, 3rem);
}
.header-nav a {
  border: 1.5px solid var(--beige);
  border-radius: 999px;
  color: var(--beige);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(.5rem, .85vw, .95rem);
  padding: .5em 1.1em;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.header-nav a:hover { background: var(--beige); color: var(--black); }

.header-cta {
  margin-left: auto;
  white-space: nowrap;
  font-size: clamp(.5rem, .85vw, .95rem);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(48px, 6vw, 86px);
  background: linear-gradient(178deg, var(--beige) 0%, #FFF9E0 42%, #FFF3D2 100%);
  overflow: hidden;
}
.hero-art {
  position: relative;
  max-width: 1440px;
  margin-inline: auto;
  aspect-ratio: 1440 / 800;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-word {
  position: absolute;
  top: 6%;
  width: 54%;
  height: auto;
  pointer-events: none;
}
.hero-word--family { left: -3%; }
.hero-word--office { right: -3%; }

.hero-photo {
  position: relative;
  z-index: 2;
  width: min(52%, 720px);
  height: auto;
  object-fit: contain;
  object-position: bottom;
}

/* ==========================================================================
   INTRO
   ========================================================================== */
/* Stacked by default. The side-by-side arrangement is a wide-screen-only
   refinement — see the min-width:1200px block near the end of this file.
   It must never apply where the heading could grow into the paragraph. */
.intro-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(1.5rem, 3.5vw, 3.5rem);
}
.intro .btn--block { margin-top: clamp(.5rem, 2vw, 2rem); }

/* ==========================================================================
   WHY STRATEGY
   ========================================================================== */
.why { padding-top: clamp(2.5rem, 6vw, 6rem); }
.why-title { max-width: 900px; margin-bottom: clamp(2rem, 5vw, 5rem); }

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: center;
}

/* --- rotated photo card with an orange block behind it --- */
.photo-card { position: relative; }
.photo-card__img {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}
.photo-card--sky { max-width: 440px; }
.photo-card--sky .photo-card__img {
  width: 84%;
  margin-left: 16%;
  transform: rotate(-4deg);
}
.photo-card__block {
  position: absolute;
  z-index: 1;
  inset: 6% 2% 2% 0;
  background: var(--orange);
  transform: rotate(3deg);
}
.photo-card__clip {
  position: absolute;
  z-index: 3;
  width: 21%;
  height: auto;
  top: 0;
  left: 10%;
  transform: rotate(6deg);
}
.photo-card__badge {
  position: absolute;
  z-index: 4;
  width: 23%;
  height: auto;
  right: 0;
  bottom: 8%;
}

/* ==========================================================================
   PARENT BENEFITS
   ========================================================================== */
.benefits-title {
  text-align: right;
  margin-bottom: clamp(2rem, 5vw, 5rem);
}
.benefits-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3.5vw, 3.5rem);
}
.benefits-list .num {
  display: inline-block;   /* so the rule below starts at the digits, not the column edge */
  color: var(--beige);
  margin-bottom: clamp(1rem, 2.5vw, 2.5rem);
  position: relative;
}
/* the short rule between the numbers */
.benefits-list li:not(:last-child) .num::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + clamp(1rem, 3vw, 3.5rem));
  width: clamp(1.5rem, 4.5vw, 5rem);
  height: 2px;
  background: var(--beige);
}
.benefits-list p { line-height: 1.45; }

/* ==========================================================================
   HOW WE WORK
   ========================================================================== */
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.how-visual { position: relative; display: grid; gap: clamp(.75rem, 2vw, 1.5rem); }
.how-photo {
  width: 78%;
  height: auto;
  transform: rotate(-5deg);
  box-shadow: 0 10px 40px #0003;
}
/* sits under the photo by default; only overlaps it on wide screens, where
   there is demonstrably room inside this column */
.how-title { text-align: left; }

.feature-list { display: grid; gap: clamp(1.25rem, 3vw, 2.75rem); }
.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .4rem clamp(.75rem, 1.5vw, 1.5rem);
}
.feature-list li::before {
  content: "";
  grid-row: 1 / 3;
  width: clamp(12px, 1.2vw, 18px);
  height: clamp(12px, 1.2vw, 18px);
  margin-top: .45em;
  background: var(--orange);
  -webkit-mask: url("/assets/svg/sparkle.svg") center / contain no-repeat;
          mask: url("/assets/svg/sparkle.svg") center / contain no-repeat;
}
.feature-list h3 {
  font-weight: 700;
  font-size: clamp(1rem, 1.75vw, 1.85rem);
  line-height: 1.1;
}
.feature-list p { line-height: 1.45; }

/* ==========================================================================
   ECOSYSTEM
   ========================================================================== */
.ecosystem-head {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  margin-bottom: clamp(2rem, 5vw, 4.5rem);
}
.ecosystem-badge { width: clamp(48px, 7vw, 110px); height: auto; flex: none; }
.ecosystem-head .display { text-align: right; margin-left: auto; }

/* A 6-column grid. Each card spans two columns and the rows are offset,
   which is what gives the section its stepped, woven look in the design. */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(clamp(115px, 13vw, 185px), auto);
  gap: 0;
}
.eco-cell--r1a   { grid-area: 1 / 2 / 2 / 4; }
.eco-cell--r1b   { grid-area: 1 / 5 / 2 / 7; }
.eco-cell--r2a   { grid-area: 2 / 1 / 3 / 3; }
.eco-cell--r2gap { grid-area: 2 / 3 / 3 / 4; }
.eco-cell--r2b   { grid-area: 2 / 4 / 3 / 6; }
.eco-cell--r3a   { grid-area: 3 / 2 / 4 / 4; }
.eco-cell--r3b   { grid-area: 3 / 5 / 4 / 7; }

.eco-mark {
  font-weight: 700;
  color: var(--orange);
  font-size: clamp(.8rem, 1.35vw, 1.45rem);
  line-height: 1.15;
  align-self: center;
  padding-inline: clamp(.4rem, 1vw, 1rem);
}
.eco-mark--r1 { grid-area: 1 / 1 / 2 / 2; }
.eco-mark--r2 { grid-area: 2 / 6 / 3 / 7; text-align: right; }
.eco-mark--r3 { grid-area: 3 / 1 / 4 / 2; }

.eco-cell {
  padding: clamp(.9rem, 1.8vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: .55em;
}
.eco-cell h3 {
  font-weight: 700;
  font-size: clamp(.95rem, 1.6vw, 1.7rem);
  line-height: 1.1;
}
.eco-cell p { line-height: 1.4; }
.eco-cell--outline {
  border: 2px solid var(--orange);
  color: var(--black);
}
.eco-cell--outline h3 { color: var(--orange); }
.eco-cell--fill {
  background: var(--orange);
  color: var(--beige);
}
/* the two outlined cells that touch share a single border */
.eco-cell--r2b { border-left-width: 0; }

/* ==========================================================================
   CLUB
   ========================================================================== */
.club-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
}
.club-title { max-width: 16ch; }
.club-badge { width: clamp(70px, 11vw, 150px); height: auto; flex: none; }

.club-lede {
  max-width: 62ch;
  margin: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(2.5rem, 6vw, 6rem) auto;
}
.club-sub { margin-bottom: clamp(1.5rem, 4vw, 3.5rem); }

.club-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  gap: clamp(.5rem, 1vw, 1rem);
}
.club-card {
  border-radius: var(--radius);
  padding: clamp(.85rem, 1.5vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  min-height: clamp(140px, 15vw, 200px);
}
.club-card .num { font-size: clamp(.8rem, 1.1vw, 1.05rem); font-family: var(--font-body); font-weight: 600; }
.club-card p { line-height: 1.35; }
.club-card--orange { background: var(--orange); color: var(--beige); }
.club-card--glass {
  background: linear-gradient(150deg, #ffffff1f, #ffffff08);
  border: 1px solid #ffffff14;
  color: var(--beige);
}
/* the staggered vertical rhythm from the design */
.club-cards li:nth-child(2) { margin-top: clamp(1.5rem, 4vw, 4rem); }
.club-cards li:nth-child(3) { margin-top: clamp(.5rem, 1.5vw, 1.5rem); }
.club-cards li:nth-child(4) { margin-top: clamp(2rem, 5.5vw, 5.5rem); }
.club-cards li:nth-child(5) { margin-top: 0; }

/* ==========================================================================
   WHAT THE CHILD GETS
   ========================================================================== */
.gets-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
  margin-bottom: clamp(2rem, 5vw, 5rem);
}
.photo-card--hug { width: clamp(110px, 17vw, 220px); flex: none; }
.photo-card--hug .photo-card__img { transform: rotate(3deg); }
.photo-card--hug .photo-card__clip {
  width: 34%;
  top: -8%;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
}

/* the tags hang from an orange wire that weaves behind them */
.tag-wrap {
  position: relative;
  padding-top: clamp(2rem, 5vw, 4.5rem);
}
.tag-wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: -9%;
  right: -6%;
  top: clamp(.4rem, 1.2vw, 1.2rem);
  height: clamp(110px, 13vw, 190px);
  background: url("/assets/svg/wave-line.svg") no-repeat center / 100% 100%;
  pointer-events: none;
}

.tag-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.5rem, 1.2vw, 1.25rem);
  align-items: start;
}
.tag-card {
  border: 2px solid var(--black);
  border-radius: 4px;
  padding: clamp(.85rem, 1.6vw, 1.6rem);
  padding-top: clamp(2rem, 3.5vw, 3.5rem);
  position: relative;
  min-height: clamp(130px, 15vw, 210px);
  background: var(--beige);
}
/* the punched hole at the top of each tag */
.tag-card::before {
  content: "";
  position: absolute;
  top: clamp(.6rem, 1.2vw, 1.2rem);
  left: clamp(.9rem, 1.8vw, 1.8rem);
  width: clamp(10px, 1.1vw, 16px);
  height: clamp(10px, 1.1vw, 16px);
  border: 2px solid var(--black);
  border-radius: 50%;
}
.tag-card .num {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(.8rem, 1.1vw, 1.05rem);
  margin-bottom: clamp(.75rem, 2vw, 2rem);
}
.tag-card p { line-height: 1.35; }
.tag-row li:nth-child(1) { transform: rotate(-5deg);   margin-top: clamp(2rem, 5.5vw, 5.5rem); }
.tag-row li:nth-child(2) { transform: rotate(-2.5deg); margin-top: clamp(1.2rem, 3.4vw, 3.4rem); }
.tag-row li:nth-child(3) { transform: rotate(2deg);    margin-top: clamp(.6rem, 1.7vw, 1.7rem); }
.tag-row li:nth-child(4) { transform: rotate(5deg);    margin-top: 0; }

/* ==========================================================================
   WHAT YOU GET
   ========================================================================== */
.yours-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}
.yours-photo {
  width: clamp(150px, 26vw, 340px);
  height: auto;
  flex: none;
  transform: rotate(3deg);
  box-shadow: 0 10px 40px #0002;
}

.yours-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.75rem, 2vw, 2rem);
  max-width: 900px;
}
.note-card {
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: clamp(.9rem, 1.8vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: clamp(.75rem, 1.8vw, 1.8rem);
  min-height: clamp(110px, 12vw, 165px);
}
.note-card .num {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(.8rem, 1.1vw, 1.05rem);
}
.note-card p { line-height: 1.4; }
.note-card--dark {
  background: var(--black);
  color: var(--beige);
  border-color: var(--black);
  /* the folded corner from the design */
  border-radius: var(--radius) 0 var(--radius) var(--radius);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
}
.yours-grid .note-card--b { margin-top: clamp(1rem, 3vw, 3rem); }
.yours-grid .note-card--d { margin-top: clamp(1rem, 3vw, 3rem); }

/* ==========================================================================
   MARQUEE
   ========================================================================== */
.marquee {
  overflow: hidden;
  padding-block: clamp(1rem, 2.5vw, 2.5rem);
  color: var(--yellow);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  width: max-content;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 3.9rem);
  line-height: 1;
  animation: marquee 26s linear infinite;
}
.marquee-track i { font-style: normal; font-size: .5em; }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
}

/* ==========================================================================
   FORMATS
   ========================================================================== */
.format-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}
.format-card {
  background: linear-gradient(160deg, #ffffff1a, #ffffff05);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.2vw, 2.2rem);
  text-align: center;
  min-height: clamp(150px, 18vw, 250px);
}
.format-card h3 {
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1rem, 1.8vw, 1.9rem);
  margin-bottom: clamp(1rem, 2.5vw, 2.5rem);
}
.format-card p { line-height: 1.4; }
.formats-title { text-align: right; }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(1.5rem, 3.5vw, 3rem);
}
.cta-buttons { display: grid; gap: clamp(.5rem, 1.2vw, 1rem); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-title { margin-bottom: clamp(2rem, 5vw, 4.5rem); }
.faq-list { display: grid; gap: clamp(.5rem, 1.5vw, 1.4rem); }

.faq-list details { border-bottom: 1px solid #17171718; }
.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(.85rem, 2vw, 1.6rem) 0;
  font-weight: 700;
  font-size: clamp(.95rem, 1.5vw, 1.55rem);
  line-height: 1.2;
}
.faq-list summary::-webkit-details-marker { display: none; }

/* the circled + / − toggle */
.faq-list summary::after {
  content: "";
  flex: none;
  width: clamp(28px, 3.4vw, 48px);
  height: clamp(28px, 3.4vw, 48px);
  border: 2px solid var(--orange);
  border-radius: 50%;
  background:
    linear-gradient(var(--orange), var(--orange)) center / 45% 2px no-repeat,
    linear-gradient(var(--orange), var(--orange)) center / 2px 45% no-repeat;
  transition: transform .25s ease;
}
.faq-list details[open] summary::after {
  transform: rotate(135deg);
}
.faq-answer {
  padding: 0 clamp(3rem, 6vw, 6rem) clamp(1rem, 2.5vw, 2rem) 0;
  line-height: 1.5;
  max-width: 70ch;
}

/* ==========================================================================
   CONTACT FORM
   ========================================================================== */
.contact-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: clamp(.5rem, 2vw, 2rem);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}
.contact-sub {
  font-weight: 700;
  font-size: clamp(1rem, 1.8vw, 1.9rem);
}
.contact-scribble { width: clamp(20px, 2.2vw, 34px); height: auto; align-self: center; }

.form {
  background: var(--orange);
  color: var(--beige);
  border-radius: clamp(16px, 2.5vw, 34px);
  padding: clamp(1.25rem, 3.5vw, 3.5rem);
  display: grid;
  gap: clamp(.75rem, 1.6vw, 1.4rem);
}
.hidden-field { position: absolute; left: -9999px; }

.field { display: grid; gap: .5rem; }
.field__label { font-weight: 700; font-size: clamp(.95rem, 1.4vw, 1.45rem); }
.field__input {
  width: 100%;
  background: var(--beige);
  border: 0;
  border-radius: 999px;
  padding: clamp(.6rem, 1.1vw, 1rem) clamp(.9rem, 1.6vw, 1.5rem);
  color: var(--black);
}
.field__input--area {
  border-radius: clamp(12px, 1.6vw, 20px);
  background: transparent;
  border: 2px solid var(--beige);
  color: var(--beige);
  resize: vertical;
  min-height: clamp(90px, 10vw, 130px);
}
.field__input:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }

.form-submit {
  justify-self: center;
  min-width: clamp(180px, 26vw, 340px);
  margin-top: clamp(.5rem, 1.5vw, 1.2rem);
  text-transform: none;
  font-size: clamp(.95rem, 1.4vw, 1.35rem);
}

.consent {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: clamp(.7rem, .95vw, .95rem);
}
.consent input {
  appearance: none;
  width: clamp(16px, 1.6vw, 22px);
  height: clamp(16px, 1.6vw, 22px);
  flex: none;
  border: 2px solid var(--beige);
  border-radius: 3px;
  background: var(--beige);
  cursor: pointer;
}
.consent input:checked {
  background:
    linear-gradient(45deg, transparent 42%, var(--orange) 42% 58%, transparent 58%) center / 70% 70% no-repeat,
    linear-gradient(-45deg, transparent 42%, var(--orange) 42% 58%, transparent 58%) center / 70% 70% no-repeat,
    var(--beige);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { padding-block: clamp(2.5rem, 6vw, 5.5rem); }

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
  margin-bottom: clamp(2.5rem, 6vw, 6rem);
}
.footer-logo { width: clamp(160px, 26vw, 340px); height: auto; }

.footer-social { text-align: right; }
.social-row { display: flex; gap: clamp(.5rem, 1vw, .9rem); justify-content: flex-end; }
.social {
  width: clamp(38px, 4.5vw, 56px);
  height: clamp(38px, 4.5vw, 56px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform .15s ease;
}
.social:hover { transform: translateY(-2px); }
/* the Instagram glyph is a dark mark that needs its own light disc;
   the Telegram file already contains one */
.social--ig { background: var(--beige); }
.social--ig img { width: 55%; height: auto; }
.social--tg img { width: 100%; height: auto; }

.rights {
  margin-top: clamp(.5rem, 1.2vw, 1rem);
  font-size: clamp(.7rem, .95vw, .95rem);
}

.footer-contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}
.footer-contacts dt {
  font-weight: 700;
  font-size: clamp(1.05rem, 1.9vw, 2rem);
  margin-bottom: clamp(1.5rem, 4vw, 3.5rem);
}
.footer-contacts dd { margin: 0; line-height: 1.4; }
/* phone, email and address are all links — give them a visible affordance
   rather than leaving them looking like plain text */
.footer-contacts dd a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: #fffcec66;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.footer-contacts dd a:hover,
.footer-contacts dd a:focus-visible {
  color: var(--orange);
  text-decoration-color: currentColor;
}
/* small map pin on the address, so it reads as "opens a map" */
.addr-link::after {
  content: "";
  display: inline-block;
  width: .85em;
  height: .85em;
  margin-left: .4em;
  vertical-align: -.1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/></svg>") center / contain no-repeat;
}
.hours { display: block; color: var(--orange); font-size: .85em; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: clamp(.7rem, 1vw, 1rem);
}
.footer-bottom a:hover { color: var(--orange); }

/* ==========================================================================
   NARROW DESKTOP / TABLET (821–1100px)
   Still the desktop layout, but the widest card rows would be squeezed to
   unreadable columns, so they reflow. Range-scoped so it cannot fight the
   mobile block below.
   ========================================================================== */
@media (min-width: 821px) and (max-width: 1100px) {
  .club-cards { grid-template-columns: repeat(3, 1fr); gap: clamp(.6rem, 1.4vw, 1rem); }
  .club-cards li { margin-top: 0 !important; }

  .tag-row { grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
  .tag-row li { margin-top: 0 !important; transform: none !important; }
  .tag-wrap::before { display: none; }   /* the wire only reads across one row */
  .tag-wrap { padding-top: 0; }

  .eco-cell { padding: clamp(.7rem, 1.5vw, 1.1rem); }
}

/* ==========================================================================
   RESPONSIVE — the Figma mobile layout kicks in below 820px
   ========================================================================== */
@media (max-width: 820px) {
  .why-grid,
  .how-grid { grid-template-columns: 1fr; }

  .benefits-list { grid-template-columns: 1fr; gap: 1.25rem; }
  .benefits-list li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
  .benefits-list .num { margin-bottom: 0; }
  .benefits-list li:not(:last-child) .num::after { display: none; }

  .benefits-title,
  .ecosystem-head .display,
  .formats-title { text-align: left; }

  .eco-grid,
  .format-cards,
  .yours-grid,
  .footer-contacts { grid-template-columns: 1fr; }

  /* the offset 6-column grid collapses to a simple stack */
  .eco-grid { grid-auto-rows: auto; gap: .75rem; }
  .eco-grid > * { grid-area: auto !important; }
  .eco-mark,
  .eco-cell--r2gap { display: none; }
  .eco-cell--r2b { border-left-width: 2px; }
  .eco-cell { border-radius: 4px; }

  .tag-wrap::before { display: none; }
  .tag-wrap { padding-top: 0; }

  .club-cards,
  .tag-row { grid-template-columns: 1fr; }
  .club-cards li,
  .tag-row li { margin-top: 0 !important; transform: none !important; }

  .why-grid .photo-card--sky { margin-inline: auto; }

  .how-visual { display: grid; gap: 1rem; }
  .how-photo { width: 100%; transform: rotate(-3deg); }
  .how-title { position: static; max-width: none; }

  .club-head,
  .gets-head,
  .yours-head,
  .footer-top { flex-direction: column; align-items: flex-start; }

  .club-lede { margin-inline: 0; }
  .ecosystem-head { flex-direction: column; align-items: flex-start; }
  .ecosystem-head .display { margin-left: 0; }

  .footer-social { text-align: left; }
  .social-row { justify-content: flex-start; }

  .footer-contacts { gap: 1.25rem; }
  .footer-contacts div { display: grid; grid-template-columns: 1fr 1.4fr; align-items: center; gap: 1rem; }
  .footer-contacts dt { margin-bottom: 0; }

  .footer-bottom { flex-wrap: wrap; gap: .5rem 1.5rem; }

  /* the mobile design keeps all four header items, just much smaller */
  .header-inner { gap: .3rem; padding-inline: .6rem; }
  .header-nav { margin-left: .4rem; gap: .25rem; }
  .header-nav a { font-size: .44rem; padding: .5em .8em; border-width: 1px; }
  .header-cta { font-size: .44rem; padding: .6em .9em; }
  .header-logo img { width: 20px; }

  .hero-photo { width: 76%; }
  .hero-art { aspect-ratio: 390 / 430; }
  .hero-word { width: 66%; top: 10%; }

  .yours-photo { width: 65%; align-self: flex-end; }
  .photo-card--hug { width: 45%; }
}

@media (max-width: 480px) {
  .footer-contacts div { grid-template-columns: 1fr; gap: .35rem; }
  .tag-card, .note-card { min-height: 0; }
}

/* ==========================================================================
   WIDE SCREENS ONLY (≥1200px)
   Overlapping and absolutely-positioned pieces live here and nowhere else.
   Each is constrained so it cannot grow into its neighbour at any width.
   ========================================================================== */
@media (min-width: 1200px) {

  /* Heading beside its lead paragraph. The heading is capped at the width the
     paragraph does not occupy, so the two can never collide however the text
     wraps — the failure mode when this was unconstrained. */
  .intro-grid,
  .cta-grid {
    grid-template-columns: 1fr minmax(0, 26rem);
    column-gap: clamp(1.5rem, 3vw, 3rem);
    row-gap: 0;
  }
  .intro-grid h1,
  .cta-grid h2 {
    grid-area: 1 / 1 / 2 / 2;
    max-width: 100%;
  }
  .intro-grid .lead,
  .cta-grid .lead {
    grid-area: 1 / 2 / 2 / 3;
    align-self: end;
  }

  /* "наш формат работы" overlaps the photo, but stays inside its own column */
  .how-visual { display: block; }
  .how-title {
    position: absolute;
    right: 0;
    bottom: 14%;
    max-width: 46%;
    z-index: 2;
  }
}
