/* ============================================
   Riptap — Stylesheet
   Light theme: soft blue-grey surfaces, navy text, neon cyan accents.
   Design: docs/design/2026-10-23-website-final-D7.png (TASK-070).
   ============================================ */

:root {
  --bg: #F4F8FA;
  --card: #FFFFFF;
  --stroke: #E3EBF0;
  --header-bg: #E4ECF1;
  --header-stroke: #D5E0E7;
  --phone-frame: #1E2638;
  --footer-bg: #1C2338;
  --cyan: #00F2E6;
  --cyan-dark: #00CFC4;
  --cyan-soft: rgba(0, 242, 230, 0.22);
  --on-cyan: #04211F;
  --gold: #8F6200;              /* darkened from the mockup's #C98A00 for 4.5:1 on the cream strip */
  --link: #00756F;              /* cyan family, 4.5:1+ on white for links in body text */
  --text: #2A3550;
  --text-2: #5E6A82;
  --focus: #0A0E1A;
  --radius-card: 24px;
  --shadow-card: 0 6px 24px rgba(10, 14, 26, 0.05);
  --shadow-phone: 0 30px 70px rgba(10, 14, 26, 0.28);
  --transition: 0.2s ease;
  /* System fonts only: the site makes no third-party font requests. */
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 68px;
}

/* --- Reset & base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

h1, h2, h3 {
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--card);
  color: var(--text);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-card);
}

.skip-link:focus {
  top: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  color: var(--on-cyan);
  font-weight: 800;
  border-radius: 999px;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--cyan-dark);
}

.btn--nav {
  padding: 10px 20px;
  font-size: 14px;
  min-height: 44px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-stroke);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 22px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-2);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 0;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-stroke);
  box-shadow: 0 12px 24px rgba(10, 14, 26, 0.08);
}

.mobile-menu ul {
  padding-top: 8px;
  padding-bottom: 16px;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 700;
}

/* --- Shared type and surfaces --- */
.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
}

.kicker {
  display: inline-block;
  background: var(--cyan);
  color: var(--on-cyan);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.card p {
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.45;
}

.phone {
  background: var(--phone-frame);
  border-radius: 42px;
  padding: 9px;
  box-shadow: var(--shadow-phone);
}

.phone img {
  width: 100%;
  border-radius: 34px;
}

/* --- Hero --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 20px;
  align-items: center;
  padding-top: 40px;
  min-height: 640px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(42, 53, 80, 0.06);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 242, 230, 0.25);
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(44px, 5.6vw, 66px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin-top: 22px;
  max-width: 470px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  background: var(--header-bg);
  color: var(--text);
  border: 1px solid var(--header-stroke);
  border-radius: 14px;
  padding: 12px 24px;
  box-shadow: 0 6px 18px rgba(42, 53, 80, 0.10);
  text-align: left;
  transition: box-shadow var(--transition), transform var(--transition);
}

.store-badge:hover {
  box-shadow: 0 10px 24px rgba(42, 53, 80, 0.16);
  transform: translateY(-1px);
}

.store-badge-logo {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-badge small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

.store-badge b {
  display: block;
  font-size: 22px;
  line-height: 1;
}

/* Three fanned phones. Sizes are fractions of the stage width
   (mockup: 574 × 600 stage, 260 px centre phone, 220 px side phones). */
.hero-phones {
  position: relative;
  width: 100%;
  aspect-ratio: 574 / 600;
  container-type: inline-size;
}

.hero-phone {
  position: absolute;
  border-radius: 7.3cqw;
  padding: 1.57cqw;
}

.hero-phone img {
  border-radius: 5.9cqw;
}

.hero-phone--center {
  width: 45.3%;
  left: 27.35%;
  top: 3.3%;
  z-index: 2;
}

.hero-phone--left,
.hero-phone--right {
  width: 38.3%;
  top: 15%;
}

.hero-phone--left {
  left: 5.2%;
  transform: rotate(-8deg);
}

.hero-phone--right {
  right: 3.5%;
  transform: rotate(8deg);
}

/* --- Premium strip --- */
.section-premium {
  margin-top: 30px;
}

.premium-strip {
  text-align: center;
  padding: 22px 30px;
  border-radius: var(--radius-card);
  border: 1px solid #F1E2C2;
  background: linear-gradient(110deg, #FFF6E0 0%, #FFF1E3 50%, #FDF7EC 100%);
}

.premium-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
}

.gold {
  color: var(--gold);
}

.premium-strip p {
  color: var(--text-2);
  font-size: 15px;
  margin-top: 6px;
}

/* --- Section headings --- */
.section-heading {
  text-align: center;
}

.section-heading h2 {
  margin-top: 8px;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* --- Modes --- */
.section-modes {
  margin-top: 70px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 34px;
}

.mode-card {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.phone--small {
  flex: 0 0 80px;
  width: 80px;
  border-radius: 16px;
  padding: 5px;
}

.phone--small img {
  border-radius: 12px;
}

.mode-card h3 {
  font-size: 20px;
  font-weight: 800;
}

.mode-card p {
  font-size: 15px;
}

/* --- Feature tiles --- */
.section-features {
  margin-top: 70px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-tile {
  padding: 20px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--cyan-soft);
}

.feature-tile h3 {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.feature-tile p {
  font-size: 14px;
}

/* --- Seasons band --- */
.section-seasons {
  margin-top: 60px;
}

.seasons-band {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "halloween text christmas";
  gap: 36px;
  align-items: center;
  padding: 28px 56px;
  border-radius: 28px;
  border: 1px solid var(--stroke);
  background: linear-gradient(110deg, #F3E9FF 0%, #FFF1E3 45%, #E6F4FF 100%);
  overflow: hidden;
}

.seasons-text {
  grid-area: text;
  text-align: center;
}

.seasons-text h2 {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.seasons-text .lead {
  margin-top: 10px;
  font-size: 17px;
}

.phone--season {
  width: 140px;
  border-radius: 26px;
  padding: 6px;
}

.phone--season img {
  border-radius: 21px;
}

.seasons-phone--halloween {
  grid-area: halloween;
}

.seasons-phone--christmas {
  grid-area: christmas;
}

/* --- Footer --- */
.site-footer {
  margin-top: 80px;
  padding: 44px 0 40px;
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  text-align: center;
}

.site-footer :focus-visible {
  outline-color: var(--cyan);
}

.footer-links {
  display: flex;
  gap: 30px;
  justify-content: center;
  font-weight: 600;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-social {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 14px;
}

.footer-social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.footer-social a:hover {
  background: rgba(0, 242, 230, 0.18);
}

.footer-social svg {
  width: 19px;
  height: 19px;
  fill: #FFFFFF;
}

.footer-contact {
  margin-top: 22px;
  font-size: 14px;
}

.footer-contact a {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copy {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* --- Legal pages (Privacy, Terms, 404) --- */
.legal-page {
  padding: 64px 0 24px;
}

.legal-page .container {
  max-width: 760px;
}

.legal-page h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-page .legal-updated {
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page li {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 12px;
}

.legal-page ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page ul li::marker {
  color: var(--cyan-dark);
}

.legal-page a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.not-found .container {
  text-align: center;
  padding-top: 56px;
  padding-bottom: 76px;
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .hero h1 {
    font-size: 66px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: 0;
  }

  .hero-phones {
    max-width: 520px;
    margin: 0 auto;
  }

  .mode-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .seasons-band {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "text text"
      "halloween christmas";
    gap: 28px;
    padding: 32px 28px;
    justify-items: center;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    gap: 8px;
  }

  .menu-toggle {
    display: flex;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 20px;
  }

  .hero {
    padding-top: 32px;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 52px);
  }

  .lead {
    font-size: 17px;
  }

  .section-heading h2 {
    font-size: 32px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    flex-direction: row;
    text-align: left;
    gap: 16px;
    padding: 14px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mode-grid {
    gap: 16px;
    margin-top: 26px;
  }

  .section-modes,
  .section-features,
  .section-seasons {
    margin-top: 48px;
  }

  .site-footer {
    margin-top: 56px;
  }

  .premium-strip {
    padding: 20px;
  }

  .seasons-band {
    gap: 20px;
    padding: 28px 20px;
  }

  .seasons-text h2 {
    font-size: 26px;
  }

  .phone--season {
    width: 124px;
  }

  .brand {
    font-size: 20px;
    gap: 10px;
  }

  .legal-page {
    padding-top: 40px;
  }

  .legal-page h1 {
    font-size: 32px;
  }
}

/* --- Mobile App Store bar (index, press) ---
   Shown only on narrow screens; Close (js/main.js) hides it for the page view, nothing is stored. */
.app-bar {
  display: none;
}

@media (max-width: 720px) {
  .app-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px 10px 12px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(10, 14, 26, 0.18);
    animation: app-bar-in 0.35s ease-out both;
  }

  .app-bar[hidden] {
    display: none;
  }

  /* Room under the footer so the bar never covers its last lines. */
  body.has-app-bar {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

.app-bar-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.app-bar-text {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.app-bar-text b {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

.app-bar-text span {
  display: block;
  font-size: 13px;
  color: var(--text-2);
}

.app-bar-get {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
  flex-shrink: 0;
}

.app-bar-close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--text-2);
  cursor: pointer;
}

.app-bar-close:hover {
  color: var(--text);
  background: var(--bg);
}

.app-bar-close svg {
  width: 18px;
  height: 18px;
}

@keyframes app-bar-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* --- Press kit (press.html) --- */
.press-page {
  padding-top: 56px;
  padding-bottom: 8px;
}

.press-title {
  margin-top: 8px;
  font-size: 44px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.press-page .section-heading p.lead {
  max-width: 620px;
  margin: 14px auto 0;
}

.press-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 40px;
}

.press-card {
  padding: 26px;
}

.press-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.press-card p + p {
  margin-top: 12px;
}

.press-card--wide {
  grid-column: 1 / -1;
}

.press-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  font-size: 15px;
}

.press-facts dt {
  font-weight: 800;
}

.press-facts dd {
  color: var(--text-2);
}

.press-icon {
  display: flex;
  align-items: center;
  gap: 18px;
}

.press-icon img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.press-link {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.press-shots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-top: 8px;
}

.press-shots figure {
  text-align: center;
}

.press-shots .phone {
  border-radius: 26px;
  padding: 6px;
}

.press-shots .phone img {
  border-radius: 21px;
}

.press-shots figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-2);
}

.press-shots figcaption a {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-block;
  padding: 10px 4px;
}

.press-page .store-badge {
  margin-top: 18px;
}

/* --- Link-in-bio landing (play.html) --- */
.play-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 48px;
  padding-bottom: 24px;
}

.play-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: var(--shadow-phone);
}

.play-page h1 {
  margin-top: 24px;
  font-size: clamp(40px, 9vw, 60px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.play-page .lead {
  margin-top: 14px;
  max-width: 420px;
}

.store-badge--big {
  margin-top: 28px;
  padding: 16px 34px;
  border-radius: 18px;
  min-height: 72px;
  background: var(--text);
  color: #FFFFFF;
  border-color: var(--text);
}

.store-badge--big small {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

.store-badge--big b {
  font-size: 28px;
}

.store-badge--big .store-badge-logo {
  width: 32px;
  height: 32px;
}

.play-page .store-badge--big:focus-visible {
  outline-color: var(--cyan-dark);
}

.play-facts {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}

.play-phone {
  width: 220px;
  margin-top: 40px;
  border-radius: 34px;
  padding: 8px;
}

.play-phone img {
  border-radius: 27px;
}

.play-more {
  margin-top: 32px;
}

.play-more a {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 960px) {
  .press-shots {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .press-grid {
    grid-template-columns: 1fr;
  }

  .press-card {
    padding: 20px;
  }

  .press-shots {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .press-page {
    padding-top: 40px;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }

  .store-badge:hover {
    transform: none;
  }
}

/* --- Duel landing (duel.html, served at /c/<code>) --- */
.duel-block[hidden] {
  display: none;
}

.duel-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.duel-kicker {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}

.duel-page h1 {
  margin-top: 8px;
}

.duel-page #duel-invalid h1 {
  margin-top: 24px;
}

.duel-score {
  font-variant-numeric: tabular-nums;
}

.duel-to-beat {
  display: block;
  font-size: 0.45em;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.duel-open {
  margin-top: 24px;
  padding: 14px 34px;
  min-height: 56px;
  font-size: 18px;
}

.duel-open:focus-visible {
  outline-color: var(--cyan-dark);
}

.duel-note {
  margin-top: 12px;
  max-width: 360px;
  font-size: 14px;
  color: var(--text-2);
}
