/* Journey On Labs. Colors, radii, fonts and shadows are the apps' design tokens: the neutrals every app shares, and each
   app's own accent (app.config.mjs) on its parts; tints are color-mix() of tokens. Dark is the default, as in the apps;
   light follows prefers-color-scheme. Text contrast at least 4.5:1 in both themes. */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/IBMPlexSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/IBMPlexSans-Medium.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/IBMPlexSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/IBMPlexMono-Medium.woff2') format('woff2'); }

:root {
  --bg: #141413;
  --panel: #1c1c1b;
  --panel2: #232321;
  --fg: #e8e6e1;
  --muted: #9b9890;
  --line: #35332e;
  --line2: #2a2926;
  --canvas: #1a1a19;
  --shadow: 0 6px 24px rgba(0, 0, 0, .5);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 6px;
  --ease-out: cubic-bezier(.33, 1, .68, 1);
  --t: .24s;
  /* each app's accent (dark): Sketch CFD amber, Sketch FEA blue, Sketch Heat orange, Sketch Fields green; the second
     accent is the one for text */
  --cfd: #f0b323; --cfd2: #ffc94a;
  --fea: #3987e5; --fea2: #6aa6ee;
  --heat: #d95926; --heat2: #f08a5c;
  --fields: #199e70; --fields2: #4fcb98;
  --accent: var(--fg);
  --accent2: var(--fg);
  --on-accent: #141413;
  --glow: .16;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f2ee;
    --panel: #ffffff;
    --panel2: #f7f6f2;
    --fg: #1f1e1b;
    --muted: #6f6c66;
    --line: #dad7cf;
    --line2: #ebe9e3;
    --canvas: #e9e7e1;
    --shadow: 0 6px 24px rgba(30, 28, 20, .12);
    --shadow-sm: 0 2px 8px rgba(30, 28, 20, .10);
    --cfd: #d19500; --cfd2: #a87700;
    --fea: #2671cc; --fea2: #1f63b8;
    --heat: #eb6834; --heat2: #cc5521;
    --fields: #1baf7a; --fields2: #13875c;
    --on-accent: #1f1e1b;
    --glow: .10;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.6; overflow-wrap: break-word; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 600; letter-spacing: -0.015em; }
p, ul { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--fea2); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.app-cfd { --accent: var(--cfd); --accent2: var(--cfd2); }
.app-fea { --accent: var(--fea); --accent2: var(--fea2); }
.app-heat { --accent: var(--heat); --accent2: var(--heat2); }
.app-fields { --accent: var(--fields); --accent2: var(--fields2); }

.skip { position: absolute; left: 16px; top: -60px; background: var(--panel); color: var(--fg); padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius); z-index: 10; }
.skip:focus { top: 12px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.eyebrow { font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* header */
header.site { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line2); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; text-decoration: none; padding: 10px 0; }
.dots { display: inline-grid; grid-template-columns: 7px 7px; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
nav.site ul { list-style: none; display: flex; gap: 4px; padding: 0; }
nav.site a { display: inline-block; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; font-size: 15px; color: var(--muted); }
nav.site a:hover { color: var(--fg); background: var(--panel); }
nav.site a.hot { color: var(--fg); font-weight: 500; }
@media (max-width: 560px) { nav.site li:not(:last-child) { display: none; } }

/* hero */
.hero { position: relative; padding: 56px 0 48px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto -10%; height: 120%; pointer-events: none;
  background:
    radial-gradient(40% 50% at 12% 20%, color-mix(in srgb, var(--cfd) calc(var(--glow) * 100%), transparent), transparent 70%),
    radial-gradient(35% 45% at 88% 15%, color-mix(in srgb, var(--fea) calc(var(--glow) * 100%), transparent), transparent 70%),
    radial-gradient(35% 45% at 80% 85%, color-mix(in srgb, var(--fields) calc(var(--glow) * 100%), transparent), transparent 70%),
    radial-gradient(35% 40% at 25% 90%, color-mix(in srgb, var(--heat) calc(var(--glow) * 100%), transparent), transparent 70%); }
.hero .wrap { position: relative; display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1fr 1.08fr; gap: 48px; } }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); margin-top: 12px; text-wrap: balance; }
.hero .lead { margin-top: 18px; font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 36em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #141413; box-shadow: var(--shadow); aspect-ratio: 3 / 2; }
.tile::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.3; color: #e8e6e1;
  padding: 6px 9px; border-radius: 8px; background: rgba(20, 20, 19, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); width: max-content; max-width: calc(100% - 16px); }
.tile figcaption b { font-weight: 600; color: var(--accent2); }
@media (prefers-color-scheme: light) { .tile figcaption b { color: #e8e6e1; } }
.tile figcaption i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.motion { margin-top: 12px; font: inherit; font-size: 14px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; min-height: 40px; cursor: pointer; }
.motion:hover { color: var(--fg); border-color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel2); color: var(--fg); font: inherit; font-weight: 500; text-decoration: none; text-align: center; cursor: pointer; transition: border-color var(--t) var(--ease-out), background var(--t) var(--ease-out), transform var(--t) var(--ease-out); }
.btn:hover { border-color: var(--accent, var(--muted)); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--fg)); }
.btn.sale-btn { --accent: var(--fg); background: var(--fg); border-color: var(--fg); color: var(--bg); font-weight: 600; }
@media (prefers-color-scheme: light) { .app-fea .btn.primary { background: var(--fea2); border-color: var(--fea2); color: #ffffff; } }

/* Black Friday 2026: the band, the deal links and the badges carry data-sale; labs.js hides them after the sale, and they
   come out of the page after 30 Nov 2026 */
.sale { padding: 8px 0 56px; }
.sale-card { position: relative; border-radius: 18px; padding: 28px 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
@media (min-width: 720px) { .sale-card { padding: 36px 40px; } }
.sale-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--cfd) 0 25%, var(--fea) 25% 50%, var(--heat) 50% 75%, var(--fields) 75% 100%); }
.sale-head { display: grid; gap: 10px; }
@media (min-width: 900px) { .sale-head { grid-template-columns: 1fr auto; align-items: end; gap: 24px; } }
.sale h2 { font-size: clamp(26px, 3.4vw, 38px); text-wrap: balance; }
.countdown { font-size: 15px; font-weight: 500; color: var(--fg); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); justify-self: start; }
.codes { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 760px) { .codes { grid-template-columns: 1fr 1fr; } }
.ticket { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px dashed var(--muted); border-radius: 12px; background: var(--panel2); }
.ticket .code { font-family: var(--mono); font-weight: 500; font-size: clamp(16px, 2vw, 19px); letter-spacing: .03em; color: var(--fg); }
.ticket .what { font-size: 15px; color: var(--muted); flex: 1; }
.copy { font: inherit; font-size: 14px; font-weight: 500; min-height: 40px; min-width: 72px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; }
.copy:hover { border-color: var(--muted); }
.copy.done { border-color: var(--fields); }
.sale .fine { margin-top: 16px; font-size: 14px; color: var(--muted); max-width: 64em; }
.deals { list-style: none; padding: 0; margin-top: 22px; display: grid; gap: 10px; }
@media (min-width: 760px) { .deals { grid-template-columns: 1fr 1fr; } }
.deals li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line2); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); flex-wrap: wrap; }
.deals .who { display: flex; align-items: center; gap: 10px; flex: 1 1 160px; font-weight: 600; }
.deals .who img { width: 36px; height: 36px; border-radius: 22.4%; }
.deals .btn { min-height: 44px; padding: 8px 12px; font-size: 14px; flex: 1 1 120px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--panel); }

/* phones: the code boxes stack the code over its description with the button beside them; the clip labels keep only the
   app's name; the countdown is a rounded box when it wraps */
@media (max-width: 559px) {
  .ticket { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
  .ticket .code { grid-column: 1; grid-row: 1; overflow-wrap: anywhere; }
  .ticket .what { grid-column: 1; grid-row: 2; }
  .ticket .copy { grid-column: 2; grid-row: 1 / span 2; }
  .tile figcaption { font-size: 12px; padding: 4px 8px; left: 6px; bottom: 6px; }
  .tile figcaption .ex { display: none; }
  .countdown { border-radius: 12px; }
}

/* apps */
.apps-head { padding: 8px 0 8px; }
.apps-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin-top: 8px; }
.apps-head p { margin-top: 10px; color: var(--muted); max-width: 44em; }
.feature { display: grid; gap: 28px; align-items: center; padding: 44px 0; border-bottom: 1px solid var(--line2); }
.feature:last-of-type { border-bottom: 0; }
@media (min-width: 900px) { .feature { grid-template-columns: 1.1fr 1fr; gap: 56px; } .feature.flip .media { order: 2; } }
.media { margin: 0; }
.frame { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #141413; box-shadow: var(--shadow); aspect-ratio: 3 / 2; }
.frame::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--accent); }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.media figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.title { display: flex; align-items: center; gap: 14px; }
.title img { width: 60px; height: 60px; border-radius: 22.4%; box-shadow: var(--shadow-sm); }
.title h3 { font-size: clamp(26px, 3vw, 32px); }
.title .sub { margin-top: 4px; color: var(--accent2); font-weight: 500; }
@media (prefers-color-scheme: light) { .title .sub { color: var(--fg); } }
.copytext .desc { margin-top: 18px; color: var(--muted); font-size: 17px; }
.feats { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 8px; }
@media (min-width: 560px) { .feats { grid-template-columns: 1fr 1fr; } }
.feats li { position: relative; padding-left: 22px; }
.feats li::before { content: ''; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.feats small { color: var(--muted); font-size: 13px; }
.verified { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; color: var(--muted); }
.verified strong { color: var(--fg); font-weight: 600; }
.free { margin-top: 12px; font-size: 15px; color: var(--muted); }
.copytext .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; font-weight: 500; text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.badge:hover { border-color: var(--accent); }

/* footer */
footer.site { border-top: 1px solid var(--line2); padding: 32px 0 44px; color: var(--muted); font-size: 14px; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 14px; }
footer.site .links a { color: var(--fg); padding: 10px 0; display: inline-block; }
footer.site p + p { margin-top: 8px; }

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

/* the hero's flow field (labs.js): behind the text, with a scrim for legibility; on narrow screens the flow shows below
   the text */
.hero { isolation: isolate; }
.hero::before { z-index: -2; }
.hero-sim { position: absolute; inset: 0; z-index: -1; }
.hero-sim canvas { display: block; width: 100%; height: 100%; }
.hero-sim::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 34%, color-mix(in srgb, var(--bg) 35%, transparent) 56%, transparent 72%); }
@media (max-width: 899px) {
  .hero { padding-bottom: 300px; }
  .hero-sim::after { background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 55%, transparent 78%); }
}
.hero .wrap { display: block; }
.hero-text { max-width: 600px; }
@media (min-width: 900px) { .hero { padding: 88px 0 96px; min-height: 620px; } }
.hero-note { margin-top: 22px; font-size: 13px; color: var(--muted); max-width: 30em; }

/* the sale's time bar, in the style of a result's color legend (Thursday to the end of Monday) */
.legend { margin-top: 20px; }
.legend .bar { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--fea), var(--fields), var(--cfd), var(--heat)); }
.legend .now { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--fg); box-shadow: 0 0 0 2px var(--panel); }
.legend .ticks { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.legend .ticks span { text-align: center; border-left: 1px solid var(--line); }
.legend .ticks span:first-child { border-left: 0; }

/* each app's section: a faint backdrop of its physics (make-patterns.mjs), under the recording's side */
.feature { position: relative; isolation: isolate; }
.feature::before { content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: -12vw; right: -12vw; pointer-events: none;
  background: var(--pattern) center / cover no-repeat; opacity: var(--pat-op, .16);
  -webkit-mask-image: radial-gradient(55% 75% at 32% 50%, #000 0%, transparent 72%); mask-image: radial-gradient(55% 75% at 32% 50%, #000 0%, transparent 72%); }
.feature.flip::before { -webkit-mask-image: radial-gradient(55% 75% at 68% 50%, #000 0%, transparent 72%); mask-image: radial-gradient(55% 75% at 68% 50%, #000 0%, transparent 72%); }
@media (max-width: 899px) { .feature::before, .feature.flip::before { -webkit-mask-image: radial-gradient(80% 45% at 50% 28%, #000 0%, transparent 75%); mask-image: radial-gradient(80% 45% at 50% 28%, #000 0%, transparent 75%); } }
.feature.app-cfd { --pattern: url('pattern-cfd.svg'); --pat-op: .22; }
.feature.app-fea { --pattern: url('pattern-fea.svg'); --pat-op: .16; }
.feature.app-heat { --pattern: url('pattern-heat.svg'); --pat-op: .24; }
.feature.app-fields { --pattern: url('pattern-fields.svg'); --pat-op: .26; }
@media (prefers-color-scheme: light) { .feature::before { filter: saturate(1.1); } .feature.app-cfd, .feature.app-heat, .feature.app-fields { --pat-op: .30; } .feature.app-fea { --pat-op: .18; } }
#apps { overflow: hidden; overflow: clip; } /* the backdrops reach past the column, never past the page */
.hero-sim { -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 82%, transparent 100%); }
/* the backdrops across the whole section, faint behind the text, fading out at the section's top and bottom */
.feature::before, .feature.flip::before { left: -10vw; right: -10vw;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%); }
@media (max-width: 899px) { .feature::before, .feature.flip::before { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%); } }
.feature.app-cfd { --pat-op: .2; }
.feature.app-fea { --pat-op: .12; }
.feature.app-heat { --pat-op: .22; }
.feature.app-fields { --pat-op: .24; }
@media (prefers-color-scheme: light) { .feature.app-cfd, .feature.app-heat, .feature.app-fields { --pat-op: .26; } .feature.app-fea { --pat-op: .14; } }
.feature .copytext { position: relative; }

.feature.app-fea { --pat-op: .2; }
@media (prefers-color-scheme: light) { .feature.app-fea { --pat-op: .2; } }
