/*
 * start.getjoan.com: the Joan onboarding wizard.
 * One small stylesheet, written for this page with the getjoan.com theme as a
 * reference (colours, spacing, components), not copied from it.
 * Font: Noto Sans only (SPEC D9; Euclid Square waits for the licence answer).
 */

@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/noto-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/noto-sans-semibold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #14142b;          /* headings */
  --text: #626262;         /* body copy */
  --accent: #4205dd;       /* links, primary buttons */
  --hero-bg: #f7f7f7;
  --picker-bg: #f8f8fa;
  --upsell-bg: #2b50c5;
  --line: #e7e7ee;
  --play: #f04848;
  --radius: 12px;
  --container: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: "Noto Sans", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 3.4vw, 48px); }
h2 { font-size: clamp(26px, 2.6vw, 36px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
a { color: var(--accent); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
/* The page is built from products.json: keep it invisible until the wizard has
   rendered it, so it appears in one step and nothing visible shifts (CLS).
   Without JavaScript, noscript.css shows it (the <noscript> message). */
html:not(.is-ready) #main { visibility: hidden; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 2000;
  background: #fff; color: var(--accent); padding: 10px 14px; border-radius: 6px;
}
.skip-link:focus { top: 8px; }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  font: 600 12px/1.2 "Noto Sans", Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--outline { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--white { color: var(--ink); background: #fff; border-color: #fff; }
.btn--white:hover { background: #e9edfb; }
.btn--outline-white { color: #fff; background: transparent; border-color: #fff; }
.btn--outline-white:hover { background: rgba(255, 255, 255, .12); }

/* ---- header and footer (D8: slim) ------------------------------------------ */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; min-height: 64px; }
.brand { display: inline-flex; }
.brand img { width: 92px; height: 34px; }

.site-footer { background: #000; color: #bdbdc7; font-size: 13px; }
.site-footer__inner {
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between;
  padding-top: 28px; padding-bottom: 28px;
}
.site-footer p { margin: 0; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #fff; font-weight: 400; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---- hero ------------------------------------------------------------------- */
.hero { background: var(--hero-bg); padding: 72px 0; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero__text { padding-left: 40px; }
.pretitle { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); margin-bottom: 16px; }
.hero__body p { margin-bottom: .6em; font-size: 17px; }
.hero__cta { margin-top: 24px; }
.hero__gallery {
  display: grid; grid-template-columns: 62fr 38fr; grid-template-rows: 1fr 2.2fr; gap: 6px;
  aspect-ratio: 1.04 / 1;
}
.hero__gallery > :first-child { grid-row: 1 / span 2; }
.hero__gallery img { width: 100%; height: 100%; object-fit: cover; }
.hero__img-wrap { overflow: hidden; background: #fff; }
.hero__img-wrap--2 img { object-fit: contain; }
.hero__gallery > :first-child, .hero__gallery > :first-child img { border-radius: 6px 0 0 6px; }

/* ---- media with a play button ------------------------------------------- */
.media { position: relative; display: block; width: 100%; overflow: hidden; }
.media--video { padding: 0; border: 0; background: none; cursor: pointer; }
.media--video img { transition: transform .3s ease; }
.media--video:hover img { transform: scale(1.02); }
.play {
  position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: var(--play);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.play::after {
  content: ""; position: absolute; top: 50%; left: 50%; margin: -11px 0 0 -7px;
  border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff;
}
.media--video:hover .play, .media--video:focus-visible .play { background: #d92f2f; }

/* ---- device picker ---------------------------------------------------------- */
.picker { background: var(--picker-bg); padding: 80px 0; }
.picker__title { text-align: center; margin-bottom: 56px; font-size: clamp(28px, 3.4vw, 48px); font-weight: 700; }
.picker__tiles {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1160px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; justify-items: center;
}
.picker__tiles li { width: 100%; }
.picker__tiles li:last-child:nth-child(3n + 1) { grid-column: 2; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; width: 100%; height: 100%;
  padding: 56px 16px 36px; min-height: 480px; border: 2px solid transparent; border-radius: var(--radius); background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .04); cursor: pointer; font: inherit; color: var(--text);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.tile:hover { box-shadow: 0 8px 24px rgba(20, 20, 43, .1); transform: translateY(-2px); }
.tile[aria-pressed="true"] { border-color: var(--accent); }
.tile__img { display: block; width: 100%; max-width: 300px; aspect-ratio: 1 / 1; margin-bottom: 24px; }
.tile__img img { width: 100%; height: 100%; object-fit: contain; }
.tile__name { font-size: 18px; font-weight: 600; color: #4d4d5a; }

/* ---- steps ---------------------------------------------------------------- */
.steps { padding: 80px 0 40px; }
.steps__title { text-align: center; max-width: 640px; margin: 0 auto 8px; font-size: clamp(28px, 3.4vw, 48px); font-weight: 700; }
/* The heading takes focus after a choice (for screen readers); it is not a control, so no ring. */
.steps__title:focus, .steps__title:focus-visible { outline: none; }
.steps__list { margin-top: 48px; }
.visually-hidden, .steps__device {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.steps__list { list-style: none; margin: 0; padding: 0; }
.step {
  display: grid; grid-template-columns: 5fr 6fr; gap: 64px; align-items: start;
  padding: 72px 0; min-height: 420px;
}
.step__title { font-size: 28px; margin-bottom: 16px; }
.step__body { font-size: 16px; }
.step__media .media, .step__media img { border-radius: 4px; }
.step__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.step--text-only { grid-template-columns: 5fr 6fr; }
.step__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.store-badge { height: 44px; width: auto; }

.step--logos { grid-template-columns: 1fr; }
.step--logos .step__title, .step--logos .step__body { max-width: 600px; }
.logos {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; max-width: 1040px;
}
.logos__link {
  position: relative; display: flex; align-items: center; justify-content: center; height: 104px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; transition: box-shadow .2s ease;
}
.logos__link:hover { box-shadow: 0 6px 18px rgba(20, 20, 43, .1); }
.logos__img { width: 44px; height: 44px; object-fit: contain; }
.logos__ext {
  position: absolute; right: 10px; bottom: 10px; width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314142b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- upsell ----------------------------------------------------------------- */
.upsell { background: var(--upsell-bg); color: #e3e8fa; padding: 96px 0; overflow: hidden; }
.upsell__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.upsell__text { padding-left: 40px; }
.upsell h2 { color: #fff; font-size: clamp(26px, 2.8vw, 38px); max-width: 520px; }
.upsell p { max-width: 460px; }
.upsell__buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.upsell__buttons .btn { min-width: 190px; }
.upsell__art { position: relative; height: 180px; }
.shape { position: absolute; display: block; }
.shape--circle { width: 120px; height: 120px; border-radius: 50%; background: #0ea05a; left: 0; bottom: -10px; }
.shape--diamond { width: 76px; height: 76px; background: #f26a2e; left: 150px; bottom: 98px; transform: rotate(45deg); }
.shape--half { width: 140px; height: 70px; border-radius: 0 0 70px 70px; background: #b9bdf8; left: 128px; bottom: 0; }
.shape--dot { width: 26px; height: 26px; border-radius: 50%; background: #f79bc7; left: 330px; bottom: 70px; }
.shape--ring { width: 170px; height: 170px; border-radius: 50%; border: 1px solid #8ea2e8; left: 300px; bottom: -40px; }

/* ---- video dialog ------------------------------------------------------------ */
.video-dialog { width: min(92vw, 1100px); max-width: none; padding: 0; border: 0; background: #000; overflow: visible; }
.video-dialog::backdrop { background: rgba(10, 10, 20, .82); }
.video-dialog__frame { aspect-ratio: 16 / 9; }
.video-dialog__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-dialog__close {
  position: absolute; top: -44px; right: 0; width: 40px; height: 40px;
  font-size: 32px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer;
}

.load-error { color: #b00020; }

/* ---- mobile ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .hero { padding: 0 0 48px; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__gallery { order: -1; margin: 0 calc(-1 * var(--gutter)); }
  .hero__text, .upsell__text { padding-left: 0; }
  .picker { padding: 56px 0; }
  .picker__tiles { grid-template-columns: 1fr; max-width: 420px; gap: 20px; }
  .picker__tiles li:last-child:nth-child(3n + 1) { grid-column: auto; }
  .steps { padding-top: 56px; }
  .step, .step--text-only { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; min-height: 0; }
  .tile { min-height: 0; padding: 40px 12px 28px; }
  .step__media { order: -1; }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .upsell__inner { grid-template-columns: 1fr; }
  .upsell__art { height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
