/* KHAEON for iPad and iPhone — product page.
   Loads after ../khaeon.css (the Max for Live page): same ink, chrome, amber, Mona Sans + Azeret Mono, grain,
   letterbox and wordmark. Everything here is the iOS layer, prefixed ki-. Margins are written as `.kh .ki-…`
   because the shared v3 reset (.v3 p { margin: 0 }) outranks single-class rules. */

/* ------------------------------------------------------------ shared pieces */
.kh .ki-kicker { display: flex; align-items: center; gap: 14px; font-family: var(--kh-mono); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--kh-acc); }
.kh .ki-kicker::before { content: ""; width: 28px; height: 1px; background: var(--kh-acc); }
.kh .ki-h2 { margin-top: 18px; max-width: 16ch; }
.kh .ki-lede { margin-top: 24px; }
.ki-store {
  display: inline-flex; align-items: center; gap: 12px; padding: 17px 26px 16px; border-radius: 999px; text-decoration: none;
  font-family: var(--kh-mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--kh-chrome);
  background: rgba(6, 6, 7, .55); box-shadow: inset 0 0 0 1px rgba(255, 154, 60, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ki-store:hover { background: rgba(36, 24, 16, .9); }
.ki-store:focus-visible { outline: 2px solid var(--kh-acc); outline-offset: 4px; }
.ki-store::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--kh-acc); }
.ki-corner { display: inline-block; flex: none; width: 1em; height: 1em; color: currentColor; }
.ki-corner rect { fill: rgba(236, 235, 238, .04); stroke: currentColor; }
.ki-corner path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ hero: the CROMO film, then it lands in the iPad's visual stage */
.ki-hero { height: 100vh; height: 100svh; }
.ki-hero.is-scene { height: 240vh; }
.ki-ipad {
  position: absolute; left: 50%; top: calc(50% + 30px); width: min(84vw, calc((100vh - 150px) * 1.3043));
  transform: translate(-50%, -50%); opacity: 0; will-change: transform, opacity; pointer-events: none;
}
.ki-ipad img { width: 100%; height: auto; filter: drop-shadow(0 50px 90px rgba(0, 0, 0, .75)); }
/* the visual stage inside ipad-full-d (3000 x 2300): x 952–2046, y 237–639 */
.ki-ipad-stage { position: absolute; left: 31.733%; top: 10.304%; width: 36.467%; height: 17.478%; }
.kh-hero-copy .kh-formats { margin-top: 30px; }
.ki-hero .kh-hero-cta { margin-top: 40px; }

/* ------------------------------------------------------------ statement + facts */
.ki-statement { padding: clamp(100px, 13vw, 190px) 0 clamp(70px, 8vw, 120px); }
.ki-big { font-weight: 500; font-stretch: 112%; font-size: clamp(28px, 3.7vw, 58px); line-height: 1.1; letter-spacing: -.012em; max-width: 22ch; text-wrap: balance; }
.ki-big em { font-style: normal; color: rgba(236, 235, 238, .5); }
.kh .ki-facts { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: clamp(60px, 8vw, 110px); border-top: 1px solid var(--kh-faint); }
.ki-facts div { padding: 26px 18px 0 0; }
.ki-facts dt { font-weight: 800; font-stretch: 125%; font-size: clamp(38px, 5vw, 80px); line-height: 1; font-variant-numeric: tabular-nums; }
.kh .ki-facts dd { margin-top: 14px; font-family: var(--kh-mono); font-size: 12px; line-height: 1.6; letter-spacing: .16em; text-transform: uppercase; color: var(--kh-dim); }

/* ------------------------------------------------------------ lens: every panel opens up close */
.ki-lens { padding: clamp(90px, 11vw, 160px) 0 clamp(60px, 8vw, 120px); border-top: 1px solid var(--kh-faint); }
.ki-lens-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(30px, 6vw, 110px); align-items: end; }
.ki-key { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; padding: 28px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(26, 26, 31, .7), rgba(13, 13, 16, .9)); box-shadow: inset 0 0 0 1px var(--kh-faint); }
.ki-key-icon { position: relative; width: 104px; height: 104px; color: var(--kh-chrome); }
.ki-key-icon .ki-corner { width: 100%; height: 100%; }
.ki-key-icon .ki-arrow { transition: transform .9s var(--kh-ease); transform-origin: 50% 50%; }
.ki-key.is-live .ki-arrow { animation: ki-breathe 3.2s var(--kh-ease) infinite; }
@keyframes ki-breathe { 0%, 100% { transform: scale(.86); } 45%, 60% { transform: scale(1.06); } }
.ki-key-icon::after { content: ""; position: absolute; inset: -9px; border-radius: 30px; box-shadow: 0 0 0 1px rgba(255, 154, 60, .5); opacity: 0; animation: ki-ping 3.2s var(--kh-ease) infinite; }
@keyframes ki-ping { 0%, 40% { opacity: 0; transform: scale(.9); } 55% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.12); } }
.ki-key p { color: var(--kh-dim); font-size: 16px; line-height: 1.55; }
.ki-key b { display: block; margin-bottom: 6px; color: #fff; font-weight: 650; font-size: 18px; }

.ki-lens-body { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(30px, 4vw, 70px); margin-top: clamp(50px, 6vw, 90px); align-items: start; }
.ki-lens-stage { position: sticky; top: calc(var(--v3-header) + 3vh); }
.ki-lens-frame { position: relative; aspect-ratio: 3000 / 2300; max-width: calc((100vh - var(--v3-header) - 3vh - 70px) * 1.3043); margin: 0 auto; }
.ki-lens-frame img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(.985); transition: opacity .55s var(--kh-ease), transform .9s var(--kh-ease); }
.ki-lens-frame img.is-on { opacity: 1; transform: none; }
.ki-lens-frame img:first-child { opacity: 1; transform: none; }
.ki-lens-cap { max-width: calc((100vh - var(--v3-header) - 3vh - 70px) * 1.3043); margin-left: auto; margin-right: auto; display: flex; justify-content: space-between; gap: 20px; margin-top: 14px; padding: 0 3%; font-family: var(--kh-mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: rgba(236, 235, 238, .55); }
.ki-lens-cap b { font-weight: 500; color: var(--kh-chrome); }
.ki-steps { counter-reset: ki; }
.ki-step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 0; }
.ki-step:first-child { min-height: 44vh; justify-content: flex-start; padding-top: 6vh; }
.ki-step:last-child { min-height: 70vh; }
.ki-step-in { padding: 26px 0 6px; border-top: 1px solid var(--kh-faint); transition: opacity .5s var(--kh-ease), border-color .5s var(--kh-ease); opacity: .38; }
.ki-step.is-on .ki-step-in { opacity: 1; border-color: var(--kh-acc); }
.ki-step-n { display: flex; align-items: center; gap: 12px; font-family: var(--kh-mono); font-size: 12px; letter-spacing: .22em; color: var(--kh-acc); }
.ki-step-n .ki-corner { width: 18px; height: 18px; color: var(--kh-chrome); }
.kh .ki-step h3 { margin-top: 14px; font-weight: 700; font-stretch: 125%; text-transform: uppercase; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.05; letter-spacing: .005em; }
.kh .ki-step p { margin-top: 14px; color: var(--kh-dim); font-size: 16px; line-height: 1.6; max-width: 40ch; }
.ki-step figure { display: none; }
.ki-models { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.ki-models li { padding: 6px 10px 5px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--kh-faint); font-family: var(--kh-mono); font-size: 11px; letter-spacing: .12em; color: var(--kh-chrome); }

/* ------------------------------------------------------------ iPhone: six pages */
.ki-phone { position: relative; padding: clamp(90px, 11vw, 160px) 0 0; border-top: 1px solid var(--kh-faint); background: linear-gradient(180deg, var(--kh-ink), var(--kh-panel) 60%, var(--kh-ink)); }
.ki-phone-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(30px, 6vw, 110px); align-items: end; }
.ki-rail { margin-top: clamp(40px, 5vw, 70px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: clamp(70px, 8vw, 120px); }
.ki-rail::-webkit-scrollbar { display: none; }
.ki-track { display: flex; width: max-content; gap: clamp(28px, 3.4vw, 64px); padding: 0 var(--v3-gutter); }
.ki-pg { flex: 0 0 auto; width: clamp(220px, 21vw, 320px); scroll-snap-align: center; }
.ki-pg img { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .7)); }
.ki-pg figcaption { margin-top: 26px; padding: 0 6%; }
.ki-pg figcaption b { display: flex; align-items: baseline; gap: 12px; font-weight: 700; font-stretch: 125%; font-size: 20px; letter-spacing: .06em; color: #fff; }
.ki-pg figcaption b span { font-family: var(--kh-mono); font-weight: 400; font-stretch: 100%; font-size: 11px; letter-spacing: .2em; color: var(--kh-acc); }
.kh .ki-pg figcaption p { margin-top: 10px; color: var(--kh-dim); font-size: 15px; line-height: 1.55; }
.ki-pg-end { flex: 0 0 auto; width: clamp(260px, 24vw, 360px); align-self: center; padding: 0 0 80px; }
.ki-pg-end p { color: var(--kh-dim); font-size: 16px; line-height: 1.6; }
.ki-pg-end b { display: block; margin-bottom: 10px; color: #fff; font-weight: 650; font-size: 19px; }
/* desktop with motion: the section pins and the track pans with the scroll (see khaeon-ios.js) */
.ki-phone.is-pan { height: 300vh; padding-top: 0; }
.ki-phone.is-pan .ki-phone-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: var(--v3-header); }
.ki-phone.is-pan .ki-phone-head .kh-h2 { font-size: clamp(28px, 3.2vw, 50px); }
.ki-phone.is-pan .ki-phone-head .kh-lede { font-size: 17px; }
.ki-phone.is-pan .ki-rail { overflow: visible; padding-bottom: 0; margin-top: clamp(26px, 4vh, 50px); }
.ki-phone.is-pan .ki-track { will-change: transform; }
.ki-phone.is-pan .ki-pg { width: calc(min(56vh, 600px) * .49); display: grid; grid-template-columns: 1fr; }
.ki-phone.is-pan .ki-pg figcaption { margin-top: 18px; }

/* Duo: the unfolded screen, shown as a screen (no drawn device) */
.ki-duo { padding: clamp(80px, 10vw, 150px) 0 clamp(90px, 11vw, 160px); }
.ki-duo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); margin-top: clamp(40px, 5vw, 70px); }
.ki-screen { position: relative; border-radius: clamp(14px, 1.6vw, 24px); overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(236, 235, 238, .12), 0 40px 100px rgba(0, 0, 0, .7); }
.ki-screen img { width: 100%; height: auto; }
.kh .ki-duo .ki-cap { margin-top: 16px; padding: 0 2px; font-family: var(--kh-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(236, 235, 238, .55); }

/* ------------------------------------------------------------ SYNAPSE */
.ki-syn { padding: clamp(90px, 11vw, 160px) 0; border-top: 1px solid var(--kh-faint); }
.ki-syn-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(30px, 6vw, 110px); align-items: start; }
.ki-tokens { margin-top: 0; }
.ki-tokens > div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--kh-faint); align-items: baseline; }
.ki-tokens dt { font-family: var(--kh-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--kh-acc); }
.ki-tokens dd { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 700; font-stretch: 125%; text-transform: uppercase; font-size: clamp(17px, 1.5vw, 22px); letter-spacing: .02em; color: var(--kh-chrome); }
.ki-tokens dd.ki-plain { display: block; font-weight: 420; font-stretch: 100%; text-transform: none; font-size: 16px; line-height: 1.55; letter-spacing: 0; color: var(--kh-dim); }
.ki-tokens dd.ki-plain b { color: #fff; font-weight: 650; }
.kh .ki-wide { margin: clamp(70px, 8vw, 120px) auto 0; width: min(92vw, 1500px); }
.ki-wide img { width: 100%; height: auto; filter: drop-shadow(0 40px 80px rgba(0, 0, 0, .7)); }
.ki-wide figcaption { margin: 18px auto 0; max-width: 1180px; padding: 0 3%; font-family: var(--kh-mono); font-size: 12px; line-height: 1.7; letter-spacing: .16em; text-transform: uppercase; color: rgba(236, 235, 238, .55); }

/* ------------------------------------------------------------ sound design: Genesis, Browse, Wavetables, Options */
.ki-make { padding: clamp(90px, 11vw, 160px) 0; border-top: 1px solid var(--kh-faint); }
.ki-make-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(60px, 6vw, 100px) clamp(30px, 4vw, 70px); margin-top: clamp(50px, 6vw, 90px); }
.ki-make figure img { width: 100%; height: auto; filter: drop-shadow(0 30px 70px rgba(0, 0, 0, .65)); }
.ki-make figcaption { margin-top: clamp(20px, 2.4vw, 32px); padding: 0 4%; max-width: 60ch; color: var(--kh-dim); font-size: 16px; line-height: 1.6; }
.ki-make figcaption b { display: block; margin: 0 0 6px; color: var(--kh-chrome); font-weight: 650; font-size: 19px; }
.ki-make figcaption em { font-style: normal; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; color: var(--kh-acc); margin-right: .4em; }

/* ------------------------------------------------------------ visuals: the parent's reels, plus the visual modes */
.ki-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.ki-modes span { padding: 9px 16px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--kh-faint); font-family: var(--kh-mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--kh-chrome); }
.ki-modes span:first-child { box-shadow: inset 0 0 0 1px rgba(255, 154, 60, .6); }

/* ------------------------------------------------------------ closing */
.ki-cta-row { display: flex; gap: 22px 28px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.ki-cta-links { display: flex; gap: 14px 26px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.kh .ki-cta-links { margin-top: 34px; }

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 900px) {
  .ki-ipad { display: none; }
  .ki-lens-head, .ki-phone-head, .ki-duo-grid, .ki-syn-grid { grid-template-columns: 1fr; }
  .ki-duo-grid { row-gap: 36px; }
  .kh .ki-facts { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .ki-facts div:last-child { grid-column: span 2; }
  .ki-lens-body { display: block; }
  .ki-lens-stage { display: none; }
  .ki-step, .ki-step:first-child, .ki-step:last-child { min-height: 0; padding: 0; margin-top: 54px; }
  .ki-step-in { opacity: 1; }
  .ki-step figure { display: block; margin: 0 -2% 22px; }
  .ki-step figure img { width: 100%; height: auto; }
  .ki-key { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .ki-key-icon { width: 76px; height: 76px; }
  .ki-pg { width: 62vw; }
  .ki-pg-end { width: 70vw; }
  .ki-tokens > div { grid-template-columns: 1fr; gap: 10px; }
  .ki-make-grid { grid-template-columns: 1fr; }
  .kh .ki-wide { width: 100%; padding: 0 var(--v3-gutter); }
  .ki-wide figcaption { padding: 0; }
  .ki-store { padding: 15px 20px 14px; font-size: 11px; letter-spacing: .16em; }
  .kh-hero-copy .kh-formats { display: none; }
}
@media (max-width: 520px) {
  .ki-big { font-size: 26px; }
  .ki-facts dt { font-size: 40px; }
  .kh .ki-pg figcaption p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ki-key-icon::after, .ki-key.is-live .ki-arrow { animation: none; }
  .ki-lens-frame img { transition: opacity .2s linear; transform: none; }
}

/* ------------------------------------------------------------ privacy, support, notices: the same dark world, plain reading */
.ki-doc main { padding: calc(var(--v3-header) + clamp(48px, 10vh, 120px)) 0 clamp(100px, 16vh, 180px); }
.ki-doc main .v3-shell { max-width: 1180px; }
.kh .ki-doc-title { margin-top: 20px; font-weight: 700; font-stretch: 125%; text-transform: uppercase; font-size: clamp(32px, 4.6vw, 64px); line-height: 1; letter-spacing: -.012em; max-width: 20ch; text-wrap: balance; }
.kh .ki-doc-meta { margin-top: 20px; font-family: var(--kh-mono); font-size: 12px; letter-spacing: .14em; color: var(--kh-dim); }
.kh .ki-summary { margin-top: clamp(32px, 6vh, 56px); padding: clamp(24px, 3vw, 36px); border-radius: 10px; max-width: 64ch;
  background: linear-gradient(180deg, rgba(26, 26, 31, .72), rgba(13, 13, 16, .9)); box-shadow: inset 0 0 0 1px var(--kh-faint), inset 3px 0 0 var(--kh-acc);
  color: var(--kh-chrome); font-size: clamp(17px, 1.45vw, 21px); line-height: 1.5; }
.ki-summary a, .ki-legal .b a { color: #fff; text-decoration-color: var(--kh-acc); text-underline-offset: 3px; }
.kh .ki-legal { margin-top: clamp(48px, 8vh, 88px); }
.ki-legal section { display: grid; grid-template-columns: minmax(200px, .7fr) 1.6fr; gap: clamp(16px, 4vw, 64px); padding: 30px 0 34px; border-top: 1px solid var(--kh-faint); }
.kh .ki-legal h2 { font-weight: 700; font-stretch: 112%; font-size: 19px; line-height: 1.25; letter-spacing: .01em; color: #fff; }
.ki-legal .b { color: var(--kh-dim); font-size: 16px; line-height: 1.65; max-width: 66ch; }
.kh .ki-legal .b p + p, .kh .ki-legal .b p + ul, .kh .ki-legal .b ul + p, .kh .ki-legal .b p + ol, .kh .ki-legal .b ol + p { margin-top: 14px; }
.ki-legal .b strong { color: var(--kh-chrome); font-weight: 650; }
.ki-legal ul li, .ki-legal ol li { position: relative; padding-left: 24px; }
.ki-legal ul li + li, .ki-legal ol li + li { margin-top: 10px; }
.ki-legal ul li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 1px; background: var(--kh-acc); }
.ki-legal ol { counter-reset: s; }
.ki-legal ol li { counter-increment: s; padding-left: 36px; }
.ki-legal ol li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: .25em; font-family: var(--kh-mono); font-size: 11px; color: var(--kh-acc); }
.ki-legal code, .ki-notices { font-family: var(--kh-mono); font-size: .88em; }
.ki-legal .ki-corner { width: 1.1em; height: 1.1em; vertical-align: -.2em; color: var(--kh-chrome); }
.kh .ki-notices { margin-top: clamp(40px, 7vh, 72px); padding: clamp(20px, 3vw, 36px); border-radius: 10px; background: var(--kh-panel); box-shadow: inset 0 0 0 1px var(--kh-faint);
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; color: var(--kh-dim); overflow-x: auto; }
.kh .ki-page-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(48px, 8vh, 80px); }
.ki-btn-line { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(236, 235, 238, .22); text-decoration: none; color: var(--kh-chrome);
  font-family: var(--kh-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; transition: box-shadow .3s var(--kh-ease), color .3s var(--kh-ease); }
.ki-btn-line:hover, .ki-btn-line:focus-visible { box-shadow: inset 0 0 0 1px var(--kh-acc); color: #fff; }
@media (max-width: 760px) { .ki-legal section { grid-template-columns: 1fr; gap: 12px; } }
