/* Vita's site. Few words, colour only in the orb, and the app's own type (ios Design/Typeface.swift,
   DS.swift): headings in Barlow Semi Condensed Bold, sentence case; taglines, names, titles, labels and
   buttons in capitals, letter-spaced; numbers in Barlow Semi Condensed with figures all one width;
   sentences that explain in Barlow as written. Everything else is graphite, white and hairlines, so
   the one living thing on the page is the coach. */
:root {
  --ground: #17171B;
  --tile: #1D1D22;
  --card: #27272D;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-2: rgba(255, 255, 255, 0.14);
  --text: #ECECEF;
  --secondary: #A1A1AA;
  --tertiary: #8A8A93;
  --quiet: #6A6A73;
  --max: 1120px;
  --gutter: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 18px/1.5 "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
/* Headings: the app's display face. */
/* Headlines match the wordmark: Barlow Semi Condensed Bold, capitals, opened up. */
h1, h2 { font-family: "Barlow Semi Condensed", "Barlow", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.045em; }
h1 { font-size: clamp(48px, 7.2vw, 100px); line-height: 1; }
h2 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1.04; text-align: center; }
/* Titles: capitals, letter-spaced, as the app sets names and titles. */
h3 { font-size: 15px; font-weight: 600; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.08em; }
/* A tagline labels a heading: capitals, medium, wide, grey. */
.tagline { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.22em; color: var(--tertiary); }
/* Numbers: the condensed face, figures all one width. */
.num, .day-read b, .moments time { font-family: "Barlow Semi Condensed", "Barlow", sans-serif; font-variant-numeric: tabular-nums; }
p { color: var(--secondary); text-wrap: pretty; }
a { color: inherit; }
::selection { background: rgba(255, 255, 255, 0.22); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--text); color: var(--ground); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { left: 8px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
canvas.orb { display: block; }

/* The one button: a white pill, as in the app. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap; text-decoration: none;
  font: 600 14px "Barlow", sans-serif; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ground); background: var(--text);
  transition: transform .18s var(--ease), background .2s;
}
.btn:hover { background: #fff; transform: translateY(-1px); }
.btn:active { transform: scale(0.985); }
.btn.small { height: 38px; padding: 0 16px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(var(--gutter), calc((100vw - var(--max)) / 2)); border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.stuck { background: rgba(23, 23, 27, 0.8); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: var(--hair); }
.logo img { display: block; height: 28px; width: auto; }

/* The one orb: a canvas fixed over the page, and the places it can settle into. */
#companion { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 15; pointer-events: none; }
.orb-slot { flex: none; aspect-ratio: 1; }

/* 1. One scene. The track is the tall stretch of page; the scene is pinned in it for the whole
   scroll. In the scene: the canvas (the phone), the hero's words over it, and the film's captions. */
.scene-track { height: 520vh; }
.scene { position: sticky; top: 0; height: 100svh; overflow: hidden; }
#film { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
/* The hero's words: they lift away as the scroll begins (--out, 0 to 1, from js/app.js). */
.hero {
  position: absolute; inset: 0 0 auto 0; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 76px var(--gutter) 0;
  opacity: calc(1 - var(--out, 0)); transform: translateY(calc(var(--out, 0) * -90px));
}
.scene.filming .hero { visibility: hidden; }
#orb-hero { width: min(150px, 34vw); margin-bottom: -4px; }
.hero .tagline { margin-top: 14px; }
.lede { font-size: clamp(17px, 1.5vw, 20px); max-width: 28em; margin: 14px 0 20px; }
.hero-join { width: min(460px, 100%); }
/* The store button: "coming soon" until there's a listing to link to; then Apple's own badge goes here. */
.store {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; height: 50px; padding: 0 20px; margin-top: 14px;
  border-radius: 13px; background: #000; border: 1px solid var(--hair-2); text-decoration: none; line-height: 1.1; transition: border-color .2s;
}
.store:hover { border-color: rgba(255, 255, 255, 0.4); }
.store small { font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; color: var(--secondary); }
.store b { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

/* The film's captions: the left of the scene, once the camera has gone in. */
.film-side { position: absolute; z-index: 1; left: max(var(--gutter), calc((100vw - var(--max)) / 2)); top: 50%; width: min(36vw, 420px); transform: translateY(-50%); opacity: 0; visibility: hidden; transition: opacity .5s var(--ease); }
.scene.filming .film-side { opacity: 1; visibility: visible; }
#orb-film { width: 132px; margin: 0 0 6px -22px; }
.captions { position: relative; height: 230px; }
.caption { position: absolute; inset: 0; opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.caption.on { opacity: 1; transform: none; }
.caption h2 { text-align: left; font-size: clamp(34px, 3.9vw, 54px); }
.caption p { font-size: 20px; margin-top: 16px; max-width: 18em; }

.tag { font-weight: 600; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }

/* The signup form */
.join-field { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hair-2); transition: border-color .2s, background .2s; }
.join-field:focus-within { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.07); }
.join input[type="email"] { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border: 0; background: none; outline: none; color: var(--text); font: 500 17px "Barlow", sans-serif; }
.join input::placeholder { color: var(--quiet); }
.join-note { font-size: 13.5px; color: var(--quiet); margin-top: 10px; text-align: center; }
.join-note:empty { display: none; }
.join.bad .join-field { border-color: var(--text); animation: nudge .35s; }
.join.bad .join-note { color: var(--text); }
@keyframes nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.joined { padding: 22px; border-radius: 24px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hair-2); text-align: center; }
.joined-title { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); }
.joined-sub { font-size: 15.5px; margin: 4px 0 16px; }
.share { display: flex; gap: 6px; }
.share-link { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--hair-2); background: rgba(0, 0, 0, 0.25); color: var(--text); font: 500 15px "Barlow", sans-serif; }
.share .btn { height: 46px; font-size: 15px; padding: 0 18px; }
.joined-count { font-size: 14px; color: var(--secondary); margin-top: 12px; }

/* Bands */
.band { max-width: var(--max); margin: 0 auto; padding: 110px var(--gutter); }
.band > h2 { margin-bottom: 56px; }

/* 2. It does the work */
.acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.act { background: var(--tile); border: 1px solid var(--hair); border-radius: 28px; padding: 18px 18px 26px; }
.act h3 { margin: 22px 8px 8px; }
.act p { margin: 0 8px; font-size: 16.5px; }
/* The receipt Vita leaves when it does something, as the app shows it. */
.receipt { position: relative; display: grid; gap: 3px; padding: 16px 16px 16px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--hair); min-height: 104px; align-content: center; }
.receipt::before { content: ""; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 2px; border-radius: 1px; background: var(--quiet); }
.receipt .tag { color: var(--tertiary); }
.receipt b { font-weight: 600; font-size: 17px; line-height: 1.25; }
.receipt small { font-size: 14px; color: var(--tertiary); }
.receipt i { position: absolute; right: 14px; top: 14px; font-style: normal; font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); }

/* 3. A day with Vita */
.day-head { text-align: center; margin-bottom: 40px; }
.day-head .tagline { margin-top: 16px; }
.day-stage { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; background: var(--tile); border: 1px solid var(--hair); border-radius: 36px; padding: 28px 44px 28px 12px; }
.day-orb { display: flex; flex-direction: column; align-items: center; }
#orb-day { width: min(420px, 100%); }
.day-read { display: flex; align-items: baseline; gap: 12px; margin-top: -30px; }
.day-read b { font-size: 52px; font-weight: 600; line-height: 1; }
.day-read span { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tertiary); }
.moments { list-style: none; margin: 0; padding: 0; }
.moments li { display: grid; grid-template-columns: 84px 1fr; gap: 4px 18px; padding: 15px 0 15px 18px; border-left: 2px solid var(--hair); opacity: 0.36; cursor: pointer; transition: opacity .5s, border-color .5s; }
.moments li:hover { opacity: 0.7; }
.moments li.on { opacity: 1; border-left-color: var(--text); }
.moments time { grid-row: 1 / 3; font-size: 17px; font-weight: 600; color: var(--tertiary); }
.moments p { color: var(--text); font-size: 17.5px; line-height: 1.35; }

/* 4. Connects */
.connects { padding-block: 40px 110px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 0; }
.chips li { padding: 12px 20px; border-radius: 999px; border: 1px solid var(--hair-2); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }

/* 5. See where you stand */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tile { position: relative; background: var(--tile); border: 1px solid var(--hair); border-radius: 36px; height: 560px; overflow: hidden; padding: 40px 40px 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tile-copy p { margin-top: 6px; font-size: 18px; }
.tile-copy h3 { font-size: 17px; letter-spacing: 0.07em; }
.tile.wide { grid-column: 1 / -1; flex-direction: row; text-align: left; justify-content: space-between; padding: 0 9% 0 8%; height: 520px; }
.tile.wide .tile-copy h3 { font-size: 20px; letter-spacing: 0.06em; }
.tile.wide .tile-copy p { font-size: 20px; }
/* A phone waiting for its screen. The real screenshot goes inside as an <img>. */
.phone { position: relative; flex: none; width: 290px; height: 600px; margin-top: 36px; border-radius: 46px; background: #0d0d10; border: 1px solid var(--hair-2); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45); padding: 9px; }
.tile.wide .phone { margin-top: 60px; align-self: flex-start; }
.phone::before { content: ""; position: absolute; inset: 9px; border-radius: 38px; background: repeating-linear-gradient(180deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 58px), var(--ground); }
.phone::after { content: attr(data-screen) " screen"; position: absolute; left: 0; right: 0; top: 150px; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--quiet); }
.phone img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 38px; display: block; }

/* 6. The close */
.closing { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px var(--gutter) 140px; }
#orb-close { width: min(280px, 60vw); }
.closing h2 { font-size: clamp(42px, 6vw, 84px); margin-bottom: 30px; }
.closing .store { margin-top: 16px; }
.closing-join { width: min(460px, 100%); }

.foot { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 110px; border-top: 1px solid var(--hair); display: grid; gap: 10px; }
.foot img { height: 22px; width: auto; opacity: 0.9; }
.foot p { font-size: 13.5px; color: var(--quiet); }

/* On phones, the button follows you down the page. */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(23, 23, 27, 0), rgba(23, 23, 27, 0.95) 36%); transform: translateY(110%); transition: transform .4s var(--ease); display: none; }
.dock .btn { width: 100%; }
.dock.up { transform: none; }

/* Things rise into place as they come into view (only with the script running). */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }
.acts .act:nth-child(2), .tiles .tile:nth-child(3) { transition-delay: .08s; }
.acts .act:nth-child(3) { transition-delay: .16s; }
.acts .act:nth-child(4), .tiles .tile:nth-child(5) { transition-delay: .24s; }

@media (max-width: 980px) {
  .acts { grid-template-columns: 1fr 1fr; }
  .day-stage { grid-template-columns: 1fr; padding: 12px 22px 22px; gap: 26px; }
  #orb-day { width: min(320px, 80%); }
}
@media (max-width: 760px) {
  .hero { padding-top: 92px; }
  .film-side { left: var(--gutter); right: var(--gutter); top: 84px; width: auto; transform: none; display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 14px; }
  #orb-film { width: 72px; margin: 0 0 0 -10px; }
  .captions { height: 104px; }
  .caption h2 { font-size: 25px; }
  .caption p { font-size: 15.5px; margin-top: 6px; }
  body { font-size: 17px; }
  :root { --gutter: 18px; }
  .band { padding: 76px var(--gutter); }
  .band > h2 { margin-bottom: 36px; }
  .tiles { grid-template-columns: 1fr; }
  .tile, .tile.wide { height: 500px; flex-direction: column; text-align: center; padding: 34px 24px 0; justify-content: flex-start; }
  .tile.wide .phone { margin-top: 30px; align-self: center; }
  .phone { margin-top: 30px; }
  .moments li { grid-template-columns: 70px 1fr; padding-left: 14px; }
  .dock { display: block; }
  .connects { padding-block: 20px 76px; }
}
@media (max-width: 520px) {
  .acts { grid-template-columns: 1fr; }
  .join-field { flex-direction: column; border-radius: 28px; padding: 8px; }
  .join input[type="email"] { text-align: center; }
  .share { flex-direction: column; }
  
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .moments li, .caption { transition: none; }
  .js .rise { opacity: 1; transform: none; }
}
