/* =============================================================================================
   Home page (both modes): hero over the night of the icon, feature sections with the real app, then speed,
   iPhone, intelligence, privacy, themes, details, editions, pricing, FAQ, final call.
   ============================================================================================= */

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; padding-top: calc(var(--nav-h) + clamp(52px, 8vw, 104px)); }
.hero-copy { display: grid; justify-items: center; gap: 22px; text-align: center; }
.hero-copy .display { max-width: 12ch; }
.hero-copy .lead { margin-top: 2px; max-width: 36em; }
.hero-copy .cta-row { margin-top: 12px; }
.hero-copy .fine { margin-top: -4px; }
.hero-stage {
  position: relative; max-width: 1240px; margin-top: clamp(48px, 7vw, 84px);
  padding-bottom: clamp(90px, 12vw, 170px);
}
.stage-mac { position: relative; width: min(100%, 1120px); margin: 0 auto; }
.stage-mac::before {
  content: ""; position: absolute; inset: 8% 6% -4%; z-index: -1; border-radius: 40px;
  background: radial-gradient(closest-side, rgba(138, 147, 255, .38), transparent);
  filter: blur(30px);
}
.stage-phone {
  position: absolute; right: max(var(--gutter), calc(50% - 600px)); bottom: clamp(40px, 6vw, 110px);
  width: clamp(120px, 21vw, 270px); animation: float 7s ease-in-out infinite;
}
/* The launch film: the night of its own background, framed like a screen, its light spilling under it. */
.hero-film { position: relative; width: min(100%, 1180px); margin: 0 auto; }
.hero-film::before {
  content: ""; position: absolute; inset: 10% 4% -6%; z-index: -1; border-radius: 48px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(138, 147, 255, .42), transparent); filter: blur(34px);
}
.hero-film-video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: clamp(12px, 2vw, 24px); background: #0b0c2a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 50px 120px -50px rgba(5, 6, 26, .95);
}
.film-ctrl { position: absolute; right: clamp(10px, 1.8vw, 22px); bottom: clamp(10px, 1.8vw, 22px); display: flex; gap: 8px; }
.film-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 40px; height: 40px;
  padding: 0 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(11, 12, 42, .58); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.film-btn:hover { background: rgba(74, 79, 184, .7); border-color: rgba(255, 255, 255, .32); }
.film-btn:active { transform: scale(.96); }
.film-btn .i { width: 18px; height: 18px; }
.film-sound { padding-right: 14px; }
.hero-film:not(.is-paused) .i-play, .hero-film.is-paused .i-pause { display: none; }
.film-sound[aria-pressed="true"] .i-sound-off, .film-sound:not([aria-pressed="true"]) .i-sound-on { display: none; }
/* Paused (« reduce motion », « save data », or the visitor's choice): the play button comes forward. */
.hero-film.is-paused [data-film-play] { background: rgba(74, 79, 184, .82); border-color: rgba(255, 255, 255, .34); }
@media (max-width: 520px) {
  .film-btn { height: 34px; min-width: 34px; padding: 0 9px; font-size: 13px; }
  .film-btn .i { width: 16px; height: 16px; }
}

/* ---------- Strip ---------- */
.strip { position: relative; padding: 26px 0; border-block: 1px solid var(--line); background: rgba(13, 15, 39, .6); }
.strip-in { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; }
.strip li { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 550; color: var(--text-2); }
.strip .i { width: 20px; height: 20px; color: var(--accent-text); }

/* ---------- Feature sections (text and the real app, alternating) ---------- */
.feat { position: relative; padding-block: clamp(80px, 11vw, 150px); }
.feat + .feat { padding-top: clamp(20px, 4vw, 60px); }
.feat-in { display: grid; gap: clamp(36px, 5vw, 72px); align-items: center; }
.feat-copy { display: grid; gap: 18px; align-content: start; }
.feat-copy .title { max-width: 14ch; }
.points { list-style: none; display: grid; gap: 18px; margin-top: 10px; }
.points li { position: relative; padding-left: 22px; }
.points li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 2px;
  background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 12px rgba(255, 201, 74, .5);
}
.points h3 { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.points p { margin-top: 3px; font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.feat-media { position: relative; min-width: 0; }
.feat-media .glow {
  position: absolute; inset: 10% 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(74, 79, 184, .45), transparent); filter: blur(10px);
}
.feat-media .phone { position: absolute; right: -2%; bottom: -10%; width: 26%; }
.feat.has-phone .feat-media { padding-bottom: 6%; }

@media (min-width: 1000px) {
  .feat-in { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); }
  .feat.is-flip .feat-media { order: -1; }
  .feat.is-flip .feat-in { grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); }
  /* The window reaches past the column, toward the page's edge. */
  .feat-media .shot-mac { width: 118%; max-width: none; }
  .feat.is-flip .feat-media .shot-mac { margin-left: -18%; }
  .feat.is-flip .feat-media .phone { right: auto; left: -8%; }
}

/* ---------- Cards (speed, intelligence) ---------- */
.cards { display: grid; gap: 16px; }
.tile { display: grid; align-content: start; gap: 10px; padding: 26px; }
.tile h3 { margin-top: 6px; font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.tile p { font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.tile-ic {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; flex: none;
  color: var(--gold-2); background: linear-gradient(145deg, rgba(74, 79, 184, .9), rgba(43, 47, 122, .9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 10px 24px -12px rgba(74, 79, 184, .9);
}
.tile-ic .i { width: 22px; height: 22px; }
.spot {
  position: absolute; left: 0; top: 0; width: 360px; height: 360px; margin: -180px 0 0 -180px; pointer-events: none;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(138, 147, 255, .16), transparent); opacity: 0; transition: opacity .3s;
}
.tile.is-lit .spot { opacity: 1; }
@media (min-width: 700px) { .cards-4, .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- iPhone ---------- */
.iphone { overflow: clip; }
.iphone-in { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
.iphone-copy { display: grid; gap: 18px; align-content: start; }
.icon-list { list-style: none; display: grid; gap: 18px; margin-top: 10px; }
.icon-list li { display: flex; gap: 16px; align-items: flex-start; }
.icon-list h3 { font-size: 16.5px; font-weight: 650; }
.icon-list p { margin-top: 3px; font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.phones { position: relative; display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: center; gap: 0; padding: 20px 0; }
.phones .phone { width: 100%; }
.phones .p1 { transform: translateX(14%) rotate(-6deg) scale(.92); z-index: 0; }
.phones .p2 { z-index: 1; }
.phones .p3 { transform: translateX(-14%) rotate(6deg) scale(.92); z-index: 0; }
@media (min-width: 1000px) { .iphone-in { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }

/* ---------- Privacy ---------- */
.privacy-in { display: grid; gap: clamp(36px, 5vw, 72px); align-items: center; }
.privacy-copy { display: grid; gap: 18px; align-content: start; }
.privacy-list { list-style: none; display: grid; gap: 12px; }
.privacy-list li { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; }
.privacy-list h3 { font-size: 16.5px; font-weight: 650; }
.privacy-list p { margin-top: 3px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
@media (min-width: 1000px) { .privacy-in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }

/* ---------- Themes and icons ---------- */
.theme-grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.theme-card { margin: 0; }
.theme-card figcaption { display: inline-flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.theme-card .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
@media (min-width: 760px) { .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.icons-row { display: grid; justify-items: center; gap: 22px; margin-top: clamp(48px, 7vw, 88px); }
.icons-title { font-size: 15px; font-weight: 600; color: var(--text-2); }
.icons-row ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 2.4vw, 30px); }
.icons-row li { display: grid; justify-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.icons-row img { width: clamp(58px, 7vw, 88px); height: auto; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .5)); transition: transform .35s var(--spring); }
.icons-row li:hover img { transform: translateY(-4px) rotate(-3deg); }

/* ---------- And also ---------- */
.more-grid { list-style: none; display: grid; gap: 2px; border-radius: var(--r); overflow: hidden; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.more-grid li { padding: 22px 24px; background: var(--bg-2); }
.more-grid h3 { font-size: 15.5px; font-weight: 650; }
.more-grid p { margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
@media (min-width: 640px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Pricing ---------- */
.pricing-in { display: grid; gap: clamp(36px, 5vw, 72px); align-items: center; }
.pricing-copy { display: grid; gap: 18px; align-content: start; }
.pricing-copy .fine { max-width: 44em; }
.price-card .amount { font-family: var(--serif); font-weight: 600; letter-spacing: -.03em; }
@media (min-width: 1000px) { .pricing-in { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); } .price-card { margin: 0; } }

/* ---------- Facts and FAQ ---------- */
.faq-in { display: grid; gap: clamp(36px, 5vw, 72px); align-items: start; }
.faq-in .title { margin: 14px 0 26px; }
.facts { padding: 26px 26px 18px; }
.facts h2 { margin-bottom: 14px; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.facts dl { display: grid; gap: 0; margin: 0; }
.facts dl > div { padding: 12px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 12.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.facts dd { margin: 3px 0 0; font-size: 15px; line-height: 1.5; color: var(--text); }
@media (min-width: 1000px) {
  .faq-in { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
  .facts { position: sticky; top: calc(var(--nav-h) + 24px); }
}

/* ---------- Final call ---------- */
.final { padding-bottom: clamp(150px, 18vw, 240px); }
.final-icon { width: 132px; height: 132px; filter: drop-shadow(0 26px 44px rgba(74, 79, 184, .6)); animation: float 7s ease-in-out infinite; }
.final .star { position: absolute; }

/* ---------- Japanese and Chinese: no forced narrow titles ---------- */
:lang(ja) :is(.feat-copy .title, .hero-copy .display), :lang(zh) :is(.feat-copy .title, .hero-copy .display) { max-width: none; }
:lang(ja) :is(.points p, .icon-list p, .tile p, .more-grid p), :lang(zh) :is(.points p, .icon-list p, .tile p, .more-grid p) { word-break: auto-phrase; }

@media (max-width: 999px) {
  .feat-copy, .iphone-copy, .privacy-copy, .pricing-copy { justify-items: center; text-align: center; }
  .feat-copy .points, .icon-list { width: 100%; max-width: 560px; text-align: left; justify-self: center; }
  .feat-copy .title { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-phone, .final-icon, .spark { animation: none; }
}

/* ---------- Devices: one tab per device (partials/devices.html, site.js « tabs ») ---------- */
.devices { overflow: clip; }
.dev-tabs { display: none; }
.js .dev-tabs {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: clamp(28px, 4vw, 44px) auto 0;
}
.dev-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 13px; border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap;
  background: rgba(255, 255, 255, .035); border: 0; box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background .2s, color .2s, box-shadow .2s;
}
.dev-tab .i { width: 19px; height: 19px; color: var(--accent-text); }
.dev-tab:hover { color: #fff; background: rgba(138, 147, 255, .1); }
.dev-tab[aria-selected="true"] {
  color: #fff; background: linear-gradient(145deg, rgba(74, 79, 184, .95), rgba(43, 47, 122, .95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 26px -12px rgba(74, 79, 184, .95);
}
.dev-tab[aria-selected="true"] .i { color: var(--gold); }
.dev-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 699px) {
  /* One scrolling row on a phone, the selected tab kept in view by site.js. */
  .js .dev-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
    margin-inline: -16px; padding: 4px 16px; scroll-padding-inline: 16px; }
  .js .dev-tabs::-webkit-scrollbar { display: none; }
}
.dev-panels { margin-top: clamp(30px, 4.5vw, 56px); }
.dev-panel { display: grid; gap: clamp(30px, 4vw, 60px); align-items: center; }
.dev-panel + .dev-panel { margin-top: clamp(70px, 9vw, 120px); }
.js .dev-panel + .dev-panel { margin-top: 0; }
.dev-panel[hidden] { display: none; }
.dev-panel.is-entering { animation: dev-in .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes dev-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dev-copy { display: grid; gap: 14px; align-content: start; }
.dev-name { display: flex; align-items: center; gap: 10px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700; letter-spacing: -.02em; }
.dev-name .i { width: 28px; height: 28px; color: var(--gold); }
.dev-lead { font-size: clamp(1.02rem, .95rem + .3vw, 1.16rem); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.dev-copy .points h4 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.dev-copy .points p { margin-top: 3px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.dev-media { position: relative; min-width: 0; display: flex; justify-content: center; align-items: center; gap: 4%; }
.dev-media .glow {
  position: absolute; inset: 6% 4%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(74, 79, 184, .45), transparent); filter: blur(10px);
}
.dev-foot { text-align: center; margin: clamp(40px, 5vw, 64px) auto 0; max-width: 46em; }
@media (min-width: 1000px) {
  .dev-panel { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
}

/* Generic frames (no device drawn: a dark rounded border around the real screen). */
.frame { position: relative; min-width: 0; }
.frame-phone, .frame-tablet, .frame-fold, .frame-watch {
  background: linear-gradient(145deg, #3a3d5c, #14152b 40%, #2a2c45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 0, 0, .6);
}
.frame-phone { width: 40%; max-width: 300px; border-radius: clamp(26px, 3.6vw, 48px); padding: clamp(5px, .6vw, 8px); }
.frame-phone .shot img { border-radius: clamp(21px, 3.1vw, 41px); }
.dev-n2 .frame-phone:first-of-type { transform: rotate(-4deg) translateY(-3%); }
.dev-n2 .frame-phone:last-of-type { transform: rotate(4deg) translateY(5%); }
.frame-tablet { width: 100%; border-radius: clamp(18px, 2.4vw, 32px); padding: clamp(6px, .9vw, 13px); }
.frame-tablet .shot img { border-radius: clamp(11px, 1.5vw, 20px); }
.frame-fold { width: 92%; border-radius: clamp(18px, 2.4vw, 32px); padding: clamp(6px, .9vw, 13px); }
.frame-fold .shot img { border-radius: clamp(11px, 1.5vw, 20px); }
/* The unfolded iPhone Duo: a faint line where it folds. */
.frame-fold::after {
  content: ""; position: absolute; top: 3%; bottom: 3%; left: 50%; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .14) 15%, rgba(255, 255, 255, .14) 85%, transparent);
}
.frame-watch { width: 34%; max-width: 230px; border-radius: 30% / 26%; padding: clamp(7px, 1vw, 12px); }
.frame-watch .shot img { border-radius: 26% / 22%; }
.dev-n2 .frame-watch:last-of-type { transform: translateY(10%); }
.frame-vision { width: 100%; }
.frame-vision .shot img { border-radius: clamp(14px, 2vw, 26px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(196, 200, 255, .14); }
.frame-mac { width: 100%; }
@media (min-width: 1000px) {
  .dev-mac .frame-mac { width: 112%; max-width: none; margin-left: -8%; }
  .dev-vision .frame-vision { width: 108%; max-width: none; margin-left: -6%; }
}
/* With the script, the panels share one place: the tallest sets the height, so the page doesn't jump between tabs. */
.js .dev-panels { display: grid; }
.js .dev-panel { grid-area: 1 / 1; }
.js .dev-panel[hidden] { display: grid; visibility: hidden; }
.dev-mac .shot-mac img { border-radius: clamp(8px, 1.1vw, 14px); }
/* Three watches: the middle one a little higher. */
.dev-n3 .frame-watch { width: 32%; max-width: 250px; }
.dev-n3 .frame-watch:nth-of-type(2) { transform: translateY(-8%); }
