/* Carriage — the comparison ("Typing on glass, reinvented") and the culture section.
   Phone first (375 pt), then wider. Uses the page's tokens from site.css. */

/* ---------- Typing on glass, reinvented ---------- */
.band--compare { background: #e7e1f3; display: block; }
.band--compare .lede { color: var(--ink); max-width: 40ch; }
.versus { display: grid; gap: 28px; margin-top: 40px; }
.versus__side { margin: 0; display: grid; gap: 14px; align-content: start; }
.versus__label { font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.versus__side--carriage .versus__label { color: #3b2a8f; }
.versus__frame {
  position: relative; aspect-ratio: 1206 / 760; border-radius: 22px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 22px 44px rgba(40, 24, 80, .16);
}
.versus__frame img { width: 100%; height: 100%; object-fit: cover; }

/* A typical theme keyboard: a wallpaper behind flat, see-through keys. */
.theme-kb {
  position: absolute; inset: 0; display: grid; grid-template-rows: repeat(4, 1fr); gap: 6%;
  padding: 6% 2.4% 5%;
  background:
    radial-gradient(40% 55% at 70% 30%, rgba(255, 236, 170, .9), transparent 70%),
    linear-gradient(165deg, #ffb199 0%, #ff7f9c 38%, #b98cf0 72%, #7aa7ff 100%);
  font: 500 clamp(9px, 2.6vw, 15px)/1 -apple-system, system-ui, sans-serif; color: #1d1a1f;
}
.theme-kb__row { display: flex; gap: 1.4%; justify-content: center; }
.theme-kb__row--in { padding-inline: 5%; }
.theme-kb i {
  font-style: normal; flex: 1 1 0; display: grid; place-items: center; border-radius: 6px;
  background: rgba(255, 255, 255, .62); box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.theme-kb .theme-kb__wide { flex: 1.4 1 0; }
.theme-kb .theme-kb__space { flex: 5 1 0; }

.versus__waves { display: flex; gap: 10px; }
.versus__waves svg { flex: 1 1 0; height: 34px; }
.versus__waves path { fill: none; stroke: #f2643a; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.versus__waves--same path { stroke: rgba(29, 26, 31, .42); }
.versus__note { font-size: 16.5px; color: var(--muted); }
.versus__side--carriage .versus__note { color: var(--ink); font-weight: 650; }

.versus-table { width: 100%; margin-top: 44px; border-collapse: collapse; font-size: 16px; }
.versus-table thead { display: none; }
.versus-table tr { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 16px 0; border-top: 1.5px solid rgba(29, 26, 31, .14); }
.versus-table th[scope="row"] { text-align: left; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.versus-table td { color: var(--muted); }
.versus-table td:first-of-type::before { content: "A keyboard theme: "; color: rgba(29, 26, 31, .55); }
.versus-table td:last-child { color: var(--ink); font-weight: 650; }
.versus-table td:last-child::before { content: "Carriage: "; color: #3b2a8f; }

@media (min-width: 760px) {
  .versus { grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
  .versus-table thead { display: table-header-group; }
  .versus-table tr { display: table-row; padding: 0; border: 0; }
  .versus-table th, .versus-table td { padding: 16px 18px 16px 0; border-top: 1.5px solid rgba(29, 26, 31, .14); text-align: left; vertical-align: top; }
  .versus-table thead th { border-top: 0; font-size: 15px; font-weight: 750; color: var(--muted); padding-bottom: 12px; }
  .versus-table thead th:last-child { color: #3b2a8f; }
  .versus-table td::before { content: none !important; }
  .versus-table th[scope="row"] { width: 18%; }
  .versus-table td { width: 41%; }
}

/* ---------- Made for people who love keyboards ---------- */
.band--culture { display: block; background: #23473f; color: #f6f0e8; }
.band--culture .lede { color: rgba(246, 240, 232, .9); max-width: 40ch; }
.culture__head { margin-bottom: clamp(40px, 7vw, 96px); }

.rituals { display: grid; gap: clamp(64px, 10vw, 140px); }
.ritual { display: grid; gap: 34px; align-items: center; }
.ritual__media { position: relative; }
.ritual__art { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: 0 30px 60px rgba(0, 0, 0, .28); }
.ritual__media--tall .ritual__art { aspect-ratio: 4 / 5; }
.ritual__media--film .ritual__art { aspect-ratio: 736 / 832; background: #efe4cf; }
/* Apple's own product images (Apple Design Resources) with the app's real screens: shown straight-on,
   unaltered, no added shadow, tilt or motion, never smaller than 200 px tall (Apple's marketing rules). */
.ritual__device { position: absolute; z-index: 1; height: auto; right: -3%; bottom: -12%; }
.ritual--flip .ritual__device { right: auto; left: -3%; }
.ritual__device--iphone { width: 34%; }
.ritual__device--ipad { width: 46%; bottom: -14%; }
.ritual__device--duo-closed { width: 44%; }
.ritual__device--duo-open { width: 82%; bottom: -34%; }
.ritual__copy { max-width: 42ch; padding-top: 6%; }
.ritual__copy h3 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1; letter-spacing: -.035em; font-weight: 800; font-variation-settings: "opsz" 72; }
.ritual__copy p { margin-top: 14px; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; color: rgba(246, 240, 232, .86); }
.ritual__copy .ritual__app { color: #f6f0e8; }
.ritual__app b { color: #ffd9a8; font-weight: 750; }
.ritual .pause--on-media { position: absolute; right: 14px; bottom: 14px; }

/* The keycap set: the real keyboard in all nineteen finishes, as a slowly drifting wall. */
.ritual__media--wall { aspect-ratio: 4 / 3.4; }
.wall {
  position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius);
  background: #1b3a33;
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent);
}
.wall__track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; align-items: start; will-change: transform; }
.wall img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.wall img:nth-child(3n + 1) { transform: translateY(-14%); }
.wall img:nth-child(3n + 2) { transform: translateY(8%); }

/* The stories behind the keys */
.stories { margin-top: clamp(96px, 12vw, 160px); }
.stories__head h2, .stories__head h3 { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.stories__head p { margin-top: 10px; max-width: 46ch; font-size: 17px; color: rgba(246, 240, 232, .82); }
.stories__shelf {
  list-style: none; margin: 30px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 18px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 330px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.stories__shelf::-webkit-scrollbar { display: none; }
.stories__shelf:focus-visible { outline-offset: -3px; }
.story-card { scroll-snap-align: start; background: #f6efe2; color: var(--ink); border-radius: 22px; overflow: hidden; padding-bottom: 20px; }
.story-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.story-card__credit { margin: 16px 20px 0; font-size: 13.5px; font-weight: 650; color: #9a5a2c; }
.story-card h4 { margin: 6px 20px 0; font-size: 21px; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.story-card p:last-child { margin: 8px 20px 0; font-size: 16px; line-height: 1.45; color: var(--muted); }

/* First Build */
.culture__film { margin: clamp(80px, 10vw, 140px) 0 0; display: grid; gap: 16px; }
.culture__film-line { font-weight: 800; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.025em; }
.culture__film video { width: 100%; height: auto; aspect-ratio: 1704 / 1200; object-fit: cover; border-radius: var(--radius); background: #1b3a33; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
.culture__film .pause { justify-self: start; }
.band--culture .pause { color: #f6f0e8; }

@media (min-width: 900px) {
  .ritual { grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 96px); }
  .ritual--flip { grid-template-columns: 5fr 7fr; }
  .ritual--flip .ritual__media { order: 2; }
  .ritual--wide { grid-template-columns: 8fr 4fr; }
  .ritual--film { grid-template-columns: 5fr 6fr; }
  .ritual--film .ritual__media { max-width: 440px; justify-self: end; width: 100%; }
  .ritual__device { right: -5%; bottom: -10%; }
  .ritual--flip .ritual__device { right: auto; left: -5%; }
  .ritual__device--iphone { width: 30%; }
  .ritual__device--ipad { width: 40%; }
  .ritual__device--duo-closed { width: 36%; }
  .ritual__device--duo-open { width: 62%; bottom: -22%; }
  .ritual__copy { padding-top: 0; }
  .ritual__media--tall .ritual__art { aspect-ratio: 4 / 3; object-position: 50% 58%; }
  .wall__track { grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px; }
  .wall img:nth-child(n) { transform: none; }
  .wall img:nth-child(4n + 1), .wall img:nth-child(4n + 3) { transform: translateY(-12%); }
  .stories__shelf { grid-auto-columns: 330px; }
}
@media (max-width: 899px) {
  /* On a phone the words come first, and the phone frame hangs into the gap below its art. */
  .ritual__copy { order: -1; padding-top: 0; }
  .ritual__media { margin-bottom: 16%; }
  .ritual__device { right: 2%; }
  .ritual--flip .ritual__device { right: auto; left: 2%; }
  .ritual__media:has(.ritual__device--duo-open) { margin-bottom: 30%; }
  .ritual__media--film { max-width: 420px; margin-bottom: 0; }
  .ritual__media--wall { margin-bottom: 18%; }
}

/* The culture page opens on this band, under the nav */
.band--page { padding-top: clamp(130px, 18vh, 190px); }
