@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

:root {
  --paper: #f5f3ee;
  --surface: #fffdf8;
  --ink: #17211d;
  --muted: #66716b;
  --line: rgba(23, 33, 29, 0.14);
  --shadow: 0 20px 60px rgba(23, 33, 29, 0.1);
  --brand: #2050e8;
  --brand-soft: #e8edff;
  --accent: #2050e8;
  --accent-soft: #e8edff;
  --accent-ink: #16339b;
  --display: 'Fraunces', Georgia, serif;
  --body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.95), transparent 30rem),
    var(--paper);
  font-family: var(--body);
  line-height: 1.6;
}

body.theme-cko {
  --accent: #2050e8;
  --accent-soft: #e8edff;
  --accent-ink: #16339b;
}

body.theme-daily {
  --accent: #16724d;
  --accent-soft: #e1f2e8;
  --accent-ink: #0b4b32;
}

body.theme-sonic {
  --accent: #bf5a00;
  --accent-soft: #fff0df;
  --accent-ink: #713300;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 243, 238, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--accent);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.site-nav a,
.header-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.header-link:hover {
  color: var(--ink);
}

.header-link {
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
}

.header-link:hover {
  color: white;
  background: var(--ink);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--display);
  letter-spacing: -0.04em;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: var(--ink);
}

.button-primary:hover {
  background: var(--accent-ink);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.55);
}

.button-secondary:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.button-accent {
  color: white;
  background: var(--accent-ink);
}

.button-accent:hover {
  background: var(--ink);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.hero-meta span::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: '';
}

.home-hero {
  padding: 96px 0 86px;
}

.home-hero-grid,
.app-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
}

.home-hero-art {
  position: relative;
  min-height: 470px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.home-hero-art::before,
.home-hero-art::after {
  position: absolute;
  border-radius: 50%;
  content: '';
}

.home-hero-art::before {
  width: 320px;
  height: 320px;
  right: -100px;
  bottom: -100px;
  background: var(--accent);
  opacity: 0.9;
}

.home-hero-art::after {
  width: 180px;
  height: 180px;
  top: -80px;
  left: -50px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-art-label {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.constellation {
  position: relative;
  z-index: 1;
  display: grid;
  height: 370px;
  place-items: center;
}

.constellation::before {
  position: absolute;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: '';
}

.constellation-core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 130px;
  height: 130px;
  place-items: center;
  border: 8px solid var(--accent);
  border-radius: 38px;
  color: white;
  background: #2a352f;
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.07);
  font-family: var(--display);
  font-size: 50px;
}

.orbit-card {
  position: absolute;
  display: grid;
  width: 132px;
  min-height: 104px;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  text-align: center;
}

.orbit-card img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
}

.orbit-card span {
  font-size: 12px;
  font-weight: 700;
}

.orbit-card--top {
  top: 22px;
}

.orbit-card--left {
  left: 0;
}

.orbit-card--right {
  right: 0;
}

.section {
  padding: 100px 0;
  scroll-margin-top: 96px;
}

.section-soft {
  background: rgba(255, 253, 248, 0.7);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.section-heading p {
  max-width: 430px;
  margin-bottom: 5px;
  color: var(--muted);
}

.app-card-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-card {
  position: relative;
  display: flex;
  min-height: 440px;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(23, 33, 29, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.app-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.app-card::after {
  position: absolute;
  width: 150px;
  height: 150px;
  right: -55px;
  bottom: -60px;
  border-radius: 50%;
  background: var(--card-accent);
  opacity: 0.15;
  content: '';
}

.app-card--cko {
  --card-accent: #2050e8;
}

.app-card--daily {
  --card-accent: #28a36b;
}

.app-card--sonic {
  --card-accent: #f28b32;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 32px;
}

.card-index {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.card-icon {
  width: 78px;
  height: 78px;
  margin-bottom: 22px;
  border-radius: 22px;
}

.app-card h3 {
  max-width: 240px;
  font-family: var(--display);
  font-size: 30px;
}

.app-card p {
  color: var(--muted);
}

.arrow-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.arrow-link:hover {
  color: var(--accent-ink);
}

.studio-note {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--ink);
  color: white;
}

.studio-note h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.studio-note p {
  max-width: 460px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.app-hero {
  padding: 86px 0 74px;
}

.app-hero-copy h1 {
  max-width: 690px;
}

.app-hero-copy .lead {
  max-width: 600px;
}

.app-hero-media {
  position: relative;
  min-height: 430px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--accent-soft);
  box-shadow: var(--shadow);
}

.app-hero-media::before {
  position: absolute;
  width: 230px;
  height: 230px;
  right: -90px;
  bottom: -90px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.22;
  content: '';
}

.app-hero-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 386px;
  object-fit: cover;
  border: 8px solid rgba(255, 253, 248, 0.92);
  border-radius: 22px;
  box-shadow: 0 20px 40px rgba(23, 33, 29, 0.16);
}

.media-caption {
  position: absolute;
  z-index: 2;
  right: 34px;
  bottom: 34px;
  left: 34px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  color: white;
  background: rgba(23, 33, 29, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.visual-card {
  position: relative;
  z-index: 1;
  display: flex;
  height: 386px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 8px solid rgba(255, 253, 248, 0.92);
  border-radius: 22px;
  color: white;
  background:
    linear-gradient(145deg, rgba(32, 80, 232, 0.95), rgba(22, 51, 155, 0.92)),
    var(--accent);
  box-shadow: 0 20px 40px rgba(23, 33, 29, 0.16);
}

.visual-topline,
.visual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-document {
  display: grid;
  gap: 12px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
}

.visual-document span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.visual-document strong {
  max-width: 370px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 3.2rem);
  line-height: 1;
}

.visual-document small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.visual-footer {
  justify-content: flex-start;
  gap: 8px;
  letter-spacing: 0.05em;
  text-transform: none;
}

.visual-footer::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #93ffba;
  content: '';
}

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

.feature-card {
  min-height: 238px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.feature-card:nth-child(3n + 2) {
  transform: translateY(18px);
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.feature-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 26px;
  place-items: center;
  border-radius: 13px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-size: 18px;
  font-weight: 700;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.process-step {
  padding: 22px 0;
  border-top: 2px solid var(--accent);
}

.process-number {
  display: block;
  margin-bottom: 40px;
  color: var(--accent-ink);
  font-family: var(--display);
  font-size: 28px;
}

.process-step p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.notice {
  margin-top: 24px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: var(--accent-soft);
  font-size: 13px;
}

.download-panel {
  position: relative;
  overflow: hidden;
  padding: 62px;
  border-radius: 30px;
  color: white;
  background: var(--ink);
}

.download-panel::after {
  position: absolute;
  width: 280px;
  height: 280px;
  right: -100px;
  bottom: -150px;
  border: 28px solid var(--accent);
  border-radius: 50%;
  content: '';
}

.download-panel h2 {
  max-width: 680px;
  margin-bottom: 12px;
}

.download-panel p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.72);
}

.download-panel .button-row {
  position: relative;
  z-index: 1;
}

.google-play-badge {
  width: 176px;
  height: auto;
}

.site-footer {
  padding: 52px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 36px;
  margin-bottom: 44px;
}

.footer-title {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  width: fit-content;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .home-hero-grid,
  .app-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-art {
    min-height: 390px;
  }

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

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1160px);
  }

  .header-inner {
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .site-nav a {
    font-size: 12px;
  }

  .header-link {
    padding: 8px 11px;
    font-size: 12px;
  }

  .home-hero,
  .app-hero {
    padding: 64px 0 52px;
  }

  h1 {
    font-size: clamp(2.9rem, 15vw, 4.4rem);
  }

  .home-hero-art {
    min-height: 330px;
    padding: 18px;
    border-radius: 24px;
  }

  .constellation {
    height: 260px;
  }

  .constellation-core {
    width: 96px;
    height: 96px;
    border-width: 6px;
    border-radius: 28px;
    font-size: 38px;
  }

  .constellation::before {
    width: 170px;
    height: 170px;
  }

  .orbit-card {
    width: 98px;
    min-height: 82px;
    padding: 8px;
  }

  .orbit-card img {
    width: 34px;
    height: 34px;
    margin-bottom: 4px;
    border-radius: 10px;
  }

  .orbit-card span {
    font-size: 10px;
  }

  .orbit-card--left {
    left: -4px;
  }

  .orbit-card--right {
    right: -4px;
  }

  .section {
    padding: 68px 0;
  }

  .section-heading {
    display: block;
    margin-bottom: 28px;
  }

  .section-heading p {
    margin-top: 14px;
  }

  .app-card-grid,
  .feature-grid,
  .process-grid,
  .footer-grid,
  .studio-note {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 360px;
  }

  .feature-card:nth-child(3n + 2) {
    transform: none;
  }

  .app-hero-media {
    min-height: 330px;
    padding: 14px;
    border-radius: 24px;
  }

  .app-hero-media img,
  .visual-card {
    height: 300px;
  }

  .media-caption {
    right: 24px;
    bottom: 24px;
    left: 24px;
  }

  .download-panel {
    padding: 34px 24px;
    border-radius: 24px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
