/* The homepage, to the approved Figma (3:2 desktop, 3:3 mobile).
   Bands in order: dark hero and tour, white features, dark Messages, white
   Automations, dark pricing, white questions, lime closing. Pieces that
   glide in on scroll rest in place here; homepage.js only moves them while
   they arrive, and never with reduced motion. */

/* 02 · Hero: NICE BOOTH. / HOW'S BUSINESS? */
.home-hero { padding-block: 64px; }
.home-hero .container { display: flex; flex-direction: column; gap: 32px; }
/* 172px across the 1312px column, scaling with the column below that. */
.hero-title {
  font-size: clamp(56px, calc((100vw - 2 * var(--gutter)) * 0.1311), 172px);
  line-height: 1.0233; letter-spacing: -0.006em; text-wrap: initial;
}
.hero-line { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-line.is-lime { color: var(--lime); }
.hero-arrow { flex: none; width: 0.558em; height: 0.558em; color: var(--lime); }
.hero-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 32px 64px; }
.hero-lede { flex: 1 1 520px; max-width: 650px; font-size: 22px; line-height: 34px; color: var(--white); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-actions .button.primary { min-width: 288px; }

/* 03 · Tour: the chapter tiles and the player straight after the hero, with
   no heading (the hero's bottom padding is the gap). The player is tour.css. */
.home-tour { padding-bottom: 80px; }

/* 04 · The booking is just the beginning: one feature to a row, the
   words on one side and the CRM screen in a soft panel on the other, with
   the sides alternating (the live site's rows, in the bold system). */
.home-features { padding-block: 96px; overflow-x: clip; }
.split-intro { display: grid; grid-template-columns: minmax(0, 760fr) minmax(0, 488fr); gap: 64px; align-items: start; }
.split-intro h2 { font-size: clamp(44px, 5.56vw, 80px); line-height: 1.1; }
.split-intro p { font-size: 22px; line-height: 34px; }
.feature-rows { margin-top: 96px; }
.feature-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 88px; align-items: center; }
.feature-row + .feature-row { margin-top: 120px; }
.feature-row.is-flipped { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.feature-row.is-flipped .feature-row-copy { order: 2; }
.feature-row-copy h3 {
  font-family: var(--display); font-weight: 400; font-size: clamp(36px, 3.4vw, 48px); line-height: 1.15;
  letter-spacing: 0; text-transform: uppercase; color: var(--ink);
}
.feature-row-copy p { max-width: 380px; margin-top: 16px; font-size: 18px; line-height: 29px; }
.feature-row-copy .text-link { margin-top: 20px; font-size: 15px; }
/* The screen keeps its own size and runs off the panel's right and bottom
   edges; tall crops sit centred and run off the bottom only. */
.feature-row-media {
  position: relative; display: flex; height: 520px; overflow: hidden; padding: 56px 0 0 56px;
  background: var(--surface); border-radius: var(--radius-stage);
}
.feature-row-media img {
  flex: none; align-self: flex-start; max-width: none; height: auto; background: var(--white);
  border: 1px solid var(--line-light); border-right: 0; border-bottom: 0; border-radius: var(--radius-control) 0 0 0;
}
.feature-row-quote, .feature-row-crew-portal { justify-content: center; padding-left: 0; }
/* Never wider than the panel, so a narrower screen shows them whole across
   rather than cut on both sides. */
.feature-row-quote img, .feature-row-crew-portal img { border: 1px solid var(--line-light); border-radius: var(--radius-control); }
.feature-row-quote img { width: min(681px, 100% - 64px); }
.feature-row-crew-portal img { width: min(712px, 100% - 64px); }
/* Proposals: a whole desktop page, shown entire like a laptop screen. */
.feature-row-media.feature-row-proposal { align-items: center; justify-content: center; height: auto; padding: 36px; }
.feature-row-proposal img { width: 100%; align-self: center; border: 1px solid var(--line-light); border-radius: var(--radius-control); }

/* 05 · One client, one conversation: the desktop with the phone over it */
.home-messages { padding-block: 96px; overflow-x: clip; }
.messages-layout { display: grid; grid-template-columns: minmax(0, 744fr) minmax(0, 488fr); gap: 80px; align-items: center; }
.messages-layout .device-pair { order: -1; }
.messages-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.messages-copy h2 { font-size: clamp(42px, 4.45vw, 64px); line-height: 1.125; }
.messages-copy > p { max-width: 440px; }
.messages-copy .button { min-width: 248px; }
.device-pair { margin: 0; }
/* Everything inside scales with the stage (cqw = 1% of its width), so the
   overlap holds at any size. Positions are the Figma's 744px frame: the
   desktop 640 wide, 26 down; the phone 224 wide at 520 across, 66 down. */
.device-stage { position: relative; container-type: inline-size; aspect-ratio: 100 / 77; overflow: clip; }
.device-desktop {
  position: absolute; left: 0; top: 3.5cqw; width: 86.02cqw; overflow: hidden;
  background: var(--white); border: 1px solid var(--line-light); border-radius: 8px;
  transition: transform 200ms var(--ease);
}
.browser-bar {
  display: flex; align-items: center; gap: 2cqw; height: 3.76cqw; padding-inline: 1.6cqw;
  background: var(--surface); color: var(--quiet); font-size: max(9px, 1.35cqw); line-height: 1; white-space: nowrap;
}
.browser-dots { display: inline-flex; gap: 0.75cqw; }
.browser-dots i { width: 0.95cqw; height: 0.95cqw; min-width: 5px; min-height: 5px; border-radius: 50%; background: var(--quiet); opacity: 0.55; }
.device-desktop img { width: 100%; height: auto; }
.device-phone { position: absolute; left: 69.89cqw; top: 8.87cqw; width: 30.11cqw; will-change: transform; }
.phone-body {
  padding: 1.08cqw; background: var(--ink); border: 1px solid var(--line-dark); border-radius: 4.3cqw;
  transition: transform 200ms var(--ease);
}
.phone-screen { overflow: hidden; border-radius: 3.23cqw; background: var(--white); }
.phone-status {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  height: 3.2cqw; padding: 0.3cqw 2.4cqw 0 2.9cqw; font-size: 1.2cqw; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.phone-island { position: absolute; left: 50%; top: 0.85cqw; width: 26%; height: 1.65cqw; margin-left: -13%; border-radius: 1cqw; background: var(--ink); }
.phone-icons { display: inline-flex; align-items: center; gap: 0.5cqw; }
.phone-icons svg { width: 1.6cqw; height: auto; }
.phone-icons svg + svg { width: 2.2cqw; }
.phone-screen img { width: 100%; height: auto; }
.phone-home { position: relative; height: 1.9cqw; background: var(--white); }
.phone-home::after { content: ""; position: absolute; left: 50%; top: 0.75cqw; width: 36%; height: 0.42cqw; margin-left: -18%; border-radius: 1cqw; background: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .device-pair:hover .device-desktop, .device-pair:hover .phone-body { transform: translateY(-4px); }
}

/* 06 · The follow-up runs: the sample workflow. Beside the copy, a step can
   slide sideways into the gap (mouse, trackpad or arrow keys) and the
   connectors bend to follow; see homepage.js. */
.home-automations { padding-block: 96px; overflow-x: clip; }
.automations-layout { display: grid; grid-template-columns: minmax(0, 660fr) minmax(0, 524fr); gap: 128px; align-items: center; }
.automations-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.automations-copy h2 { font-size: clamp(42px, 4.45vw, 64px); line-height: 1.156; }
.automations-copy > p { max-width: 540px; }
.workflow { margin: 0; }
.workflow-steps { position: relative; display: grid; gap: 12px; }
.workflow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.workflow-lines path { fill: none; stroke: var(--outline-light); stroke-width: 1.5; }
/* At rest the steps sit in the Figma's plain column; the connectors appear
   once a step has been moved out of it. */
.workflow-lines { opacity: 0; transition: opacity 200ms var(--ease); }
.workflow-steps.is-arranged .workflow-lines { opacity: 1; }
.workflow-step {
  position: relative; z-index: 1; display: grid; gap: 8px; padding: 20px 24px; background: var(--surface);
  transition: box-shadow 160ms var(--ease);
}
.workflow-step > span { font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--quiet); }
.workflow-step strong { font-size: 21px; line-height: 28px; font-weight: 700; letter-spacing: -0.6px; color: var(--ink); }
.workflow-step:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.workflow-step.is-raised { z-index: 2; }
.workflow-step.is-moving { box-shadow: 0 2px 4px rgb(16 17 15 / 0.08), 0 20px 36px -18px rgb(16 17 15 / 0.45); }
@media (hover: hover) and (pointer: fine) {
  .is-movable .workflow-step { cursor: grab; user-select: none; }
  .is-movable .workflow-step:hover { box-shadow: inset 0 0 0 1px var(--outline-light); }
  .is-movable .workflow-step.is-moving { cursor: grabbing; }
}

/* 07 · Every module. Every plan. */
.home-pricing { padding-block: 80px; }
.pricing-intro h2 { font-size: clamp(44px, 5.56vw, 80px); line-height: 1.1; }
.pricing-intro p { max-width: 630px; margin-top: 24px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
/* White cards on the dark band, with the Figma's lime action. */
.plan-card {
  --fg: var(--ink); --fg-2: var(--quiet); --rule: var(--line-light); --focus: var(--ink);
  --btn: var(--lime); --btn-text: var(--ink); --btn-hover: var(--lime-hover);
  display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--white); color: var(--ink);
}
.plan-name { font-family: var(--text); font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--quiet); }
.plan-price { font-family: var(--display); font-size: 40px; line-height: 50px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-billing { padding-bottom: 16px; border-bottom: 1px solid var(--line-light); font-size: 13px; line-height: 20px; }
.plan-capacity { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--ink); }
.plan-allowances { flex: 1; min-height: 144px; margin: 0; padding: 0; list-style: none; }
.plan-allowances li { font-size: 13px; line-height: 24px; color: var(--quiet); }
.plan-card .button { width: 100%; min-width: 0; }
.plan-notes { margin-top: 32px; display: grid; justify-items: start; gap: 8px; }
.plan-notes .arrow-link { margin-top: 0; color: var(--white); }

/* 09 · Run the show */
.home-closing { padding-block: 80px; }
.home-closing .container { display: flex; flex-direction: column; gap: 32px; }
.closing-title {
  font-size: clamp(72px, calc((100vw - 2 * var(--gutter)) * 0.122), 160px);
  line-height: 1.1; letter-spacing: -0.004em; text-wrap: initial;
}
.home-closing .closing-foot { margin-top: 0; }
.home-closing .closing-foot .button { min-width: 224px; }

/* Stacks below space their children with gap; no paragraph margins on top. */
.page-home main p + p { margin-top: 0; }

/* Pieces that glide in from the side are clipped by their band, so the page
   never scrolls sideways while they arrive. */
[data-glide] { will-change: transform; }

/* Four plans across only where "$119.99 / mo" fits its card. */
@media (max-width: 1180px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  /* Narrower cards show the screens a little smaller, so each still shows
     enough of itself to read as the product. */
  .messages-layout { gap: 56px; }
  .automations-layout { gap: 64px; }
}
@media (max-width: 900px) {
  /* One column from here down: headings take the room the second column left. */
  .split-intro h2, .pricing-intro h2 { font-size: clamp(56px, 9vw, 80px); }
  .messages-copy h2, .automations-copy h2 { font-size: clamp(44px, 7vw, 64px); }
  .split-intro { grid-template-columns: 1fr; gap: 24px; }
  .split-intro p { max-width: 640px; }
  .messages-layout, .automations-layout { grid-template-columns: 1fr; gap: 40px; }
  .messages-layout .device-pair { order: 0; }
  .feature-rows { margin-top: 64px; }
  .feature-row, .feature-row.is-flipped { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.is-flipped .feature-row-copy { order: 0; }
  .feature-row + .feature-row { margin-top: 88px; }
  .feature-row-media { height: 460px; }
}
@media (max-width: 760px) {
  .home-hero { padding-block: 48px 64px; }
  .hero-foot { gap: 32px; }
  .hero-lede { flex-basis: 100%; font-size: 18px; line-height: 29px; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; gap: 12px; }
  .hero-actions .button, .hero-actions .button.primary { min-width: 0; width: 100%; }
  .home-tour { padding-bottom: 48px; }
  .home-features { padding-block: 64px; }
  .split-intro h2 { font-size: clamp(44px, 14.4vw, 56px); line-height: 1.143; }
  .split-intro p { font-size: 18px; line-height: 29px; }
  .feature-rows { margin-top: 48px; }
  .feature-row + .feature-row { margin-top: 72px; }
  .feature-row-copy h3 { font-size: 32px; line-height: 40px; }
  .feature-row-copy p { margin-top: 12px; font-size: 16px; line-height: 26px; }
  .feature-row-media { height: 400px; padding: 28px 0 0 24px; }
  .feature-row-media.feature-row-quote, .feature-row-media.feature-row-crew-portal { height: auto; padding: 24px 20px 0; }
  .feature-row-quote img, .feature-row-crew-portal img { width: 100%; }
  .feature-row-media.feature-row-proposal { padding: 20px; }
  .home-messages, .home-automations { padding-block: 64px; }
  .messages-copy h2 { font-size: clamp(36px, 10.8vw, 42px); line-height: 1.19; }
  .messages-copy .button { width: 100%; }
  /* The phone's Figma frame: the desktop the full width, the phone over its
     right side 48 of 342 down. The real phone screen is taller than the
     Figma's drawing, so it is a little narrower (42% not 46%) to end where
     the Figma's phone ends. */
  .device-stage { aspect-ratio: 100 / 110; }
  .device-desktop { top: 3.5cqw; width: 100cqw; border-radius: 6px; }
  .browser-bar { height: 5.85cqw; font-size: max(8px, 2.05cqw); padding-inline: 3.5cqw; gap: 3cqw; }
  .browser-dots i { width: 1.4cqw; height: 1.4cqw; }
  .device-phone { left: 57.8cqw; top: 14.04cqw; width: 42.2cqw; }
  .phone-body { padding: 1.63cqw; border-radius: 9.36cqw; }
  .phone-screen { border-radius: 7.6cqw; }
  .phone-status { height: 5cqw; padding: 0.4cqw 3.6cqw 0 4.4cqw; font-size: 1.85cqw; }
  .phone-island { top: 1.3cqw; height: 2.45cqw; border-radius: 1.5cqw; }
  .phone-icons svg { width: 2.4cqw; }
  .phone-icons svg + svg { width: 3.3cqw; }
  .phone-home { height: 3cqw; }
  .phone-home::after { top: 1.2cqw; height: 0.6cqw; }
  .automations-copy h2 { font-size: clamp(40px, 13.3vw, 52px); line-height: 1.154; }
  .workflow-step strong { font-size: 19px; line-height: 26px; }
  .home-pricing { padding-block: 64px; }
  .pricing-intro h2 { font-size: clamp(44px, 14.4vw, 56px); line-height: 1.143; }
  .plan-grid { grid-template-columns: 1fr; }
  .home-closing { padding-block: 64px; }
  .home-closing .closing-foot .button { width: 100%; }
  .home-closing .closing-foot p { font-size: 20px; line-height: 30px; }
  /* The Figma's phone sizes for section copy. */
  .messages-copy > p, .automations-copy > p,
  .pricing-intro p { font-size: 17px; line-height: 28px; }
}
/* Below 600px the Figma's phone headline: NICE BOOTH. at 74px, then HOW'S /
   BUSINESS? at 86px, both sized to the 342px column. */
@media (max-width: 600px) {
  .hero-title { font-size: min(calc((100vw - 2 * var(--gutter)) * 0.2164), 84px); line-height: 1.135; letter-spacing: -0.5px; }
  .hero-line.is-lime { display: block; font-size: 1.1622em; line-height: 1.093; }
  .hero-arrow { display: none; }
  /* RUN / THE SHOW., as the Figma's phone frame breaks it. */
  .closing-title { font-size: min(calc((100vw - 2 * var(--gutter)) * 0.2573), 104px); line-height: 1.09; letter-spacing: -0.0068em; }
}
.closing-break { display: none; }
@media (max-width: 600px) { .closing-break { display: inline; } }
@media (prefers-reduced-motion: reduce) {
  .device-desktop, .phone-body, .workflow-step { transition: none; }
  [data-glide], .device-phone { transform: none !important; will-change: auto; }
}
