/* Ciurma: flat, sober, one accent. Light and dark follow the app's tokens. */

@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./assets/fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("./assets/fonts/Fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --brand: #ffc531;
  --brand-hover: #f4b61a;
  --ink: #1c2340;

  --bg: #f5f2eb;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --text: #1c2340;
  --muted: #5a6078;
  --line: #dde1ea;
  --line-strong: #b9bfcf;
  --device: #1c2340;

  --tint-yellow-bg: #fff1c7;
  --tint-yellow-fg: #7a5200;
  --tint-green-bg: #e3f4ec;
  --tint-green-fg: #0b6b4a;
  --tint-blue-bg: #e6ebff;
  --tint-blue-fg: #2b3fb8;
  --tint-rose-bg: #fde7e3;
  --tint-rose-fg: #b42318;
  --tint-orange-bg: #ffe8d6;
  --tint-orange-fg: #9a4a00;
  --tint-neutral-bg: #eef0f6;
  --tint-neutral-fg: #3a4160;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fredoka", "Inter", system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --content: 1120px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1222;
  --surface: #1a1e33;
  --surface-2: #262b45;
  --text: #f2f3f8;
  --muted: #a3a9c2;
  --line: #30365a;
  --line-strong: #4a5180;
  --device: #30365a;

  --tint-yellow-bg: #3a3218;
  --tint-yellow-fg: #ffc531;
  --tint-green-bg: #163428;
  --tint-green-fg: #4fd1a1;
  --tint-blue-bg: #1e2850;
  --tint-blue-fg: #afc0ff;
  --tint-rose-bg: #3d2025;
  --tint-rose-fg: #ffb4ab;
  --tint-orange-bg: #3a2616;
  --tint-orange-fg: #ffb27a;
  --tint-neutral-bg: #262b45;
  --tint-neutral-fg: #c5cae0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}
p {
  margin: 0;
}

.container {
  width: min(var(--content), calc(100% - 32px));
  margin-inline: auto;
}
.container-narrow {
  width: min(760px, calc(100% - 32px));
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 20;
}
.skip-link:focus {
  top: 12px;
}

/* Icons: the Phosphor SVGs as a mask, painted with the current colour. */
.icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  flex: none;
}
.icon-lg {
  width: 28px;
  height: 28px;
}
.icon-moon {
  --icon: url("./assets/icons/moon.svg");
}
:root[data-theme="dark"] .icon-moon {
  --icon: url("./assets/icons/sun.svg");
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.topnav {
  display: flex;
  gap: var(--space-5);
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}
.topnav a {
  text-decoration: none;
  color: var(--muted);
}
.topnav a:hover {
  color: var(--text);
}
.topbar-actions {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}
.topnav + .topbar-actions {
  margin-left: 0;
}

.icon-button,
.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.icon-button:hover,
.language-toggle:hover {
  background: var(--surface-2);
}
.icon-button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.button-primary {
  background: var(--brand);
  color: var(--ink);
}
.button-primary:hover {
  background: var(--brand-hover);
}
.button-secondary {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}
.button-secondary:hover {
  background: var(--surface-2);
}

/* Hero */
.hero {
  padding-block: var(--space-8) var(--space-7);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-7);
  align-items: center;
}
.eyebrow {
  margin-bottom: var(--space-3);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.05;
}
.lede {
  margin-top: var(--space-4);
  max-width: 34em;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.play-badge img {
  width: auto;
  height: 72px;
  margin: -12px -4px;
}
.note {
  margin-top: var(--space-4);
  max-width: 34em;
  font-size: 14px;
  color: var(--muted);
}
.hero-visual {
  display: flex;
  justify-content: center;
}

/* Phone: a plain frame around a screenshot */
.device {
  width: min(300px, 100%);
  border: 8px solid var(--device);
  border-radius: 40px;
  background: var(--surface);
  overflow: hidden;
}
.device img {
  width: 100%;
  aspect-ratio: 780 / 1688;
  object-fit: cover;
}
.hero-visual .device {
  width: min(320px, 100%);
}

.rename {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: center;
  font-weight: 500;
}

/* Sections */
.section {
  padding-block: var(--space-8);
}
.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.section-heading {
  margin-bottom: var(--space-6);
}
.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  max-width: 20em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
}
.step h3,
.module-card h3,
.perk h3 {
  font-size: 18px;
  font-weight: 700;
}
.step p,
.module-card p,
.perk p {
  margin-top: var(--space-2);
  color: var(--muted);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.module-card {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}
.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--tile-bg);
  color: var(--tile-fg);
}
.tint-yellow { --tile-bg: var(--tint-yellow-bg); --tile-fg: var(--tint-yellow-fg); }
.tint-green { --tile-bg: var(--tint-green-bg); --tile-fg: var(--tint-green-fg); }
.tint-blue { --tile-bg: var(--tint-blue-bg); --tile-fg: var(--tint-blue-fg); }
.tint-rose { --tile-bg: var(--tint-rose-bg); --tile-fg: var(--tint-rose-fg); }
.tint-orange { --tile-bg: var(--tint-orange-bg); --tile-fg: var(--tint-orange-fg); }
.tint-neutral { --tile-bg: var(--tint-neutral-bg); --tile-fg: var(--tint-neutral-fg); }

/* Screens carousel */
.shots-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}
.segmented button {
  min-height: 36px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  background: var(--brand);
  color: var(--ink);
}
.shots-nav {
  display: flex;
  gap: var(--space-2);
}
.shots-track {
  display: flex;
  gap: var(--space-5);
  margin: 0;
  padding: 0 0 var(--space-4);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.shot {
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: start;
}
.shot figure {
  margin: 0;
}
.shot .device {
  width: 100%;
}
.shot figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-4);
}
.shot figcaption span {
  font-size: 14px;
  color: var(--muted);
}
.shots-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.shots-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line-strong);
  cursor: pointer;
}
.shots-dots button[aria-current="true"] {
  background: var(--text);
}

.perks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.perk .icon {
  margin-bottom: var(--space-3);
  color: var(--text);
}

/* FAQ */
.faq {
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  width: 20px;
  height: 20px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("./assets/icons/plus.svg") center / contain no-repeat;
  mask: url("./assets/icons/plus.svg") center / contain no-repeat;
  transition: transform 0.15s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  padding-bottom: var(--space-5);
  max-width: 40em;
  color: var(--muted);
}

/* Footer */
.footer {
  padding-block: var(--space-7);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-5);
  align-items: start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-brand p {
  font-size: 14px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  font-size: 15px;
  font-weight: 500;
}
.footer-rights {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--muted);
}

/* Legal pages: a contents list next to a readable column. */
.page-shell {
  position: relative;
}
.legal-layout {
  width: min(1000px, calc(100% - 32px));
  margin: var(--space-7) auto;
}
.legal-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 88px;
  font-size: 14px;
}
.legal-toc summary {
  display: none;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.legal-toc summary::-webkit-details-marker {
  display: none;
}
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.legal-toc a {
  display: block;
  padding: 6px var(--space-3);
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.legal-toc a:hover {
  color: var(--text);
}
.legal-toc a[aria-current="true"] {
  border-left-color: var(--brand);
  color: var(--text);
  font-weight: 600;
}
.legal-card {
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.legal-card h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 600;
}
.legal-card h2 {
  font-size: 22px;
}
.legal-card h3 {
  margin-top: var(--space-4);
  font-size: 16px;
}
.legal-section {
  padding-top: var(--space-6);
  scroll-margin-top: 88px;
}
.legal-card p,
.legal-card li {
  margin-top: var(--space-3);
  color: var(--muted);
}
.legal-card li {
  margin-top: var(--space-2);
}
.legal-card .eyebrow + h1 {
  margin-top: 0;
}
.legal-card > p {
  max-width: 40em;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.legal-meta span {
  padding: 6px var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 14px;
  color: var(--muted);
}
.legal-meta .legal-date {
  border-color: var(--brand);
  background: var(--tint-yellow-bg);
  color: var(--text);
  font-weight: 600;
}
.legal-previous {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

@media (max-width: 960px) {
  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .perks {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .legal-toc {
    position: static;
  }
  .legal-toc summary {
    display: block;
  }
  .legal-toc ol {
    margin-top: var(--space-2);
  }
}

@media (max-width: 760px) {
  .legal-card {
    padding: var(--space-5) var(--space-4);
  }
  .topnav {
    display: none;
  }
  .hero {
    padding-block: var(--space-6);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .section {
    padding-block: var(--space-7);
  }
  .shot {
    width: 200px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .module-grid,
  .perks {
    grid-template-columns: 1fr;
  }
  .shots-controls {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .faq summary::after {
    transition: none;
  }
}

/* Data table of the privacy policy: scrolls sideways on narrow screens. */
.legal-table {
  margin-top: var(--space-4);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.legal-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}
.legal-table th,
.legal-table td {
  margin: 0;
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}
.legal-table th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}
.legal-table tr:last-child td {
  border-bottom: 0;
}
.legal-card ul {
  margin: var(--space-3) 0 0;
  padding-left: var(--space-5);
}

/* Closed beta: three steps, each with its action at the bottom. */
.beta-steps .step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.beta-steps .step .button {
  margin-top: auto;
}
.beta-steps .step p {
  margin-bottom: var(--space-4);
}
.step-time {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  padding: 2px var(--space-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.beta-steps .step {
  position: relative;
}
.beta-hint {
  margin-top: var(--space-5);
}
.note a {
  color: inherit;
  font-weight: 600;
}
