@font-face {
  font-family: 'Jakarta';
  src: url('assets/fonts/PlusJakartaSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Jakarta';
  src: url('assets/fonts/PlusJakartaSans_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Jakarta';
  src: url('assets/fonts/PlusJakartaSans_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

/* Day sections are paper; night sections are ink. Shift colors match the app. */
:root {
  --paper: #f5f7fb;
  --surface: #ffffff;
  --ink: #0f1b3d;
  --ink-2: #16264f;
  --text: #121a2e;
  --muted: #55607a;
  --line: #dde3ee;
  --ocean: #1d4ed8;
  --day: #f59e0b;
  --night: #4f46e5;
  --off: #a7b1c2;
  --leave: #10b981;
  --on-day: #3b2300;
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1430;
    --surface: #111d40;
    --text: #e8edf8;
    --muted: #a3afc9;
    --line: #22325e;
    --ocean: #7aa2ff;
    --off: #63708c;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 800;
}
h3 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
a {
  color: var(--ocean);
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--day);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap {
  width: min(var(--wrap), 100% - 40px);
  margin-inline: auto;
}
.narrow {
  width: min(720px, 100% - 40px);
}
.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 34em;
}
section {
  padding-block: clamp(64px, 9vw, 112px);
}
section > .wrap > h2 + .lead {
  margin-top: 14px;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 14px;
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  border-radius: 9px;
}
.top nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.top nav a:hover {
  color: var(--text);
}
.top-cta {
  background: var(--ocean);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
}
@media (prefers-color-scheme: dark) {
  .top-cta {
    color: #0b1430;
  }
}
@media (max-width: 760px) {
  .top nav {
    display: none;
  }
  .top-cta {
    margin-left: auto;
  }
}

/* ---------- hero ---------- */
.hero {
  padding-bottom: 0;
  overflow: hidden;
}
.hero-in {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}
.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.hero .lead {
  margin-top: 30px;
}
.play {
  display: inline-block;
  margin-top: 28px;
  margin-left: -10px; /* the official badge has built-in padding */
}
.play img {
  width: 220px;
}
.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0;
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.facts li {
  display: flex;
  align-items: center;
  gap: 7px;
}
.facts li::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--leave);
}
.hero-art {
  position: relative;
  justify-self: center;
  padding-bottom: 28px;
}
.hero-char {
  position: absolute;
  left: -120px;
  bottom: 0;
  height: 62%;
  width: auto;
  filter: drop-shadow(0 18px 18px rgb(15 27 61 / 0.25));
}
@media (max-width: 900px) {
  .hero-in {
    grid-template-columns: 1fr;
  }
  .hero-char {
    left: -90px;
    height: 55%;
  }
}
@media (max-width: 600px) {
  .hero-char {
    display: none;
  }
}

/* phone frame used everywhere */
.phone {
  margin: 0;
  width: 280px;
  padding: 9px;
  border-radius: 38px;
  background: linear-gradient(150deg, #39414f, #0a0c12 55%);
  box-shadow:
    0 30px 60px -20px rgb(15 27 61 / 0.45),
    inset 0 0 0 1.5px rgb(255 255 255 / 0.12);
}
.phone img {
  border-radius: 30px;
  width: 100%;
}
.phone-hero {
  width: 300px;
  transform: rotate(3deg);
}

/* ---------- rotation ribbon (the signature element) ---------- */
.ribbon {
  margin-top: 56px;
  padding: 28px 0 30px;
  background: var(--ink);
  color: #fff;
}
.days {
  list-style: none;
  margin: 0;
  padding: 0 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: safe center;
}
.days::-webkit-scrollbar {
  display: none;
}
.day {
  flex: 0 0 auto;
  width: 46px;
  display: grid;
  justify-items: center;
  gap: 5px;
  animation: drop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1.2) both;
  animation-delay: calc(var(--i) * 28ms);
}
.day .wd,
.day .dn {
  font-size: 0.75rem;
  color: rgb(255 255 255 / 0.55);
  min-height: 1.2em;
}
.day .dn {
  color: rgb(255 255 255 / 0.85);
  font-weight: 600;
}
.day .code {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
}
.d-D .code {
  background: var(--day);
  color: var(--on-day);
}
.d-N .code {
  background: var(--night);
  color: #fff;
}
.d-O .code {
  background: #26345f;
  color: #8f9bbd;
}
.is-today .code {
  box-shadow:
    0 0 0 3px var(--ink),
    0 0 0 6px #fff;
}
.is-today .wd {
  color: #fff;
  font-weight: 800;
}
.ribbon-key {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: rgb(255 255 255 / 0.75);
  font-size: 0.9rem;
}
.k {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.75rem;
  margin-left: 8px;
}
.k:first-child {
  margin-left: 0;
}
.k-D {
  background: var(--day);
  color: var(--on-day);
}
.k-N {
  background: var(--night);
  color: #fff;
}
.k-O {
  background: #26345f;
  color: #8f9bbd;
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.9);
  }
}

/* ---------- who ---------- */
.people {
  list-style: none;
  padding: 0;
  margin: 44px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.people li {
  display: grid;
  grid-template-rows: 240px auto auto;
  gap: 10px;
}
.people img {
  height: 240px;
  width: auto;
  justify-self: start;
  filter: drop-shadow(0 14px 14px rgb(15 27 61 / 0.18));
}
.people p,
.also {
  color: var(--muted);
}
.also {
  margin-top: 36px;
  max-width: 40em;
}
@media (max-width: 760px) {
  .people {
    grid-template-columns: 1fr;
  }
}

/* ---------- features ---------- */
.features {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.feat {
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: clamp(32px, 7vw, 96px);
  margin-top: 64px;
}
.feat:nth-of-type(even) {
  grid-template-columns: 1fr 300px;
}
.feat:nth-of-type(even) figure {
  order: 2;
}
.feat h3 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}
.feat p {
  margin-top: 14px;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 30em;
}
@media (max-width: 760px) {
  .feat,
  .feat:nth-of-type(even) {
    grid-template-columns: 1fr;
  }
  .feat:nth-of-type(even) figure {
    order: 0;
  }
  .feat .phone {
    width: 240px;
  }
}
.extras {
  list-style: none;
  padding: 0;
  margin: 88px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 40px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
  color: var(--muted);
}
.extras strong {
  color: var(--text);
}

/* ---------- night sections ---------- */
.night {
  background: var(--ink);
  color: #fff;
}
.night .lead {
  color: rgb(255 255 255 / 0.72);
}
.rots {
  list-style: none;
  padding: 0;
  margin: 44px 0 0;
}
.rot {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  align-items: center;
  gap: 12px 32px;
  padding: 18px 0;
  border-top: 1px solid rgb(255 255 255 / 0.1);
}
.rot h3 {
  font-size: 1.1rem;
}
.rot p {
  color: rgb(255 255 255 / 0.6);
  font-size: 0.92rem;
  margin-top: 2px;
}
.rot-cycle {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.t {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
}
.t-D {
  background: var(--day);
  color: var(--on-day);
}
.t-N {
  background: var(--night);
  color: #fff;
}
.t-O {
  background: #26345f;
  color: #8f9bbd;
}
.custom {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  color: rgb(255 255 255 / 0.85);
  font-weight: 600;
}
@media (max-width: 760px) {
  .rot {
    grid-template-columns: 1fr;
  }
}

/* ---------- themes ---------- */
.fan {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}
.fan .phone {
  width: 250px;
}
.fan .phone:nth-child(1) {
  transform: rotate(-7deg) translate(40px, 24px);
}
.fan .phone:nth-child(2) {
  position: relative;
  z-index: 1;
}
.fan .phone:nth-child(3) {
  transform: rotate(7deg) translate(-40px, 24px);
}
@media (max-width: 760px) {
  .fan .phone {
    width: 150px;
    padding: 6px;
    border-radius: 24px;
  }
  .fan .phone img {
    border-radius: 19px;
  }
  .fan .phone:nth-child(1) {
    transform: rotate(-7deg) translate(26px, 14px);
  }
  .fan .phone:nth-child(3) {
    transform: rotate(7deg) translate(-26px, 14px);
  }
}

/* ---------- privacy & faq ---------- */
.privacy {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.privacy p {
  margin-top: 16px;
  font-size: 1.1rem;
  color: var(--muted);
}
.privacy p:last-child a {
  font-weight: 600;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq h2 {
  margin-bottom: 20px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin-top: 10px;
  color: var(--muted);
}

/* ---------- final CTA & footer ---------- */
.cta {
  text-align: center;
}
.cta .lead {
  margin: 14px auto 0;
}
.cta .play {
  margin-left: 0;
}
.foot {
  padding: 36px 0 44px;
  font-size: 0.92rem;
  color: var(--muted);
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.foot-brand img {
  border-radius: 7px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.legal {
  flex-basis: 100%;
  font-size: 0.82rem;
}

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