/* Adyton product site.
   Tokens mirror the app's docs/DESIGN-LANGUAGE.md: dark first, light by system preference.
   No inline styles anywhere on the site: the server sends style-src 'self'. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark light;

  --bg: #0b0d10;
  --surface: #15181d;
  --surface-raised: #1e232a;
  --border: #2a3038;
  --text: #f2f4f7;
  --text-muted: #9aa4b2;
  --accent: #d9a441;
  --on-accent: #0b0d10;
  --card-shadow: none;

  /* Spacing unit 4. */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s6: 24px;
  --s8: 32px;
  --s12: 48px;
  --s24: 96px;

  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 999px;

  /* Type scale 13, 15, 17, 22, 28, 34 at a 16 px root, plus one display step for the hero. */
  --t13: 0.8125rem;
  --t15: 0.9375rem;
  --t17: 1.0625rem;
  --t22: 1.375rem;
  --t28: 1.75rem;
  --t34: 2.125rem;
  --t-display: clamp(2.125rem, 1.3rem + 3.6vw, 3.5rem);

  --page-pad: var(--s6);
  --page-max: 1120px;
  --motion: 160ms ease-out;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-raised: #eef0f3;
    --border: #d9dee5;
    --text: #0b0d10;
    --text-muted: #566070;
    --accent: #8a6100;
    --on-accent: #ffffff;
    --card-shadow: 0 1px 2px rgb(11 13 16 / 6%), 0 8px 24px rgb(11 13 16 / 6%);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--t17);
  line-height: 1.5;
  font-weight: 400;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--motion);
}

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

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

svg {
  display: block;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--page-pad));
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

/* Skip link: first stop for keyboard users. */
.skip {
  position: absolute;
  left: var(--s4);
  top: var(--s4);
  z-index: 10;
  padding: var(--s3) var(--s6);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--t15);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.skip:hover {
  color: var(--on-accent);
}

/* Header */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s4);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.logo {
  width: auto;
  height: 28px;
}

.logo-mark {
  fill: var(--accent);
}

.logo-word {
  fill: var(--text);
}

.langs ul {
  display: flex;
  gap: var(--s1);
}

.langs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--s3);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: var(--t15);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--motion), background-color var(--motion);
}

.langs a:hover {
  color: var(--text);
  background: var(--surface);
}

.langs a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-raised);
}

/* Narrow screens show EN, ES, FR; the full name stays in the link for assistive
   technology, so it is clipped, never display: none. */
.langs a {
  position: relative;
}

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

@media (min-width: 640px) {
  .lang-short {
    display: none;
  }

  .lang-full {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
  }
}

/* Hero */
.hero {
  padding-block: var(--s12) var(--s12);
}

.hero .wrap {
  display: grid;
  gap: var(--s12);
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 6px var(--s3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--t13);
  font-weight: 600;
  line-height: 1.35;
}

.chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin-top: var(--s6);
  font-size: var(--t-display);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 34em;
  margin-top: var(--s6);
  color: var(--text-muted);
  font-size: clamp(var(--t17), 0.9rem + 0.8vw, var(--t22));
  line-height: 1.45;
}

.hero-note {
  margin-top: var(--s6);
  color: var(--text-muted);
  font-size: var(--t15);
}

/* The tap grid: the app's signature, shown once. */
.grid-card {
  width: 100%;
  max-width: 384px;
  margin-inline: auto;
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.tap-grid {
  width: 100%;
  height: auto;
}

.grid-cell {
  fill: var(--surface-raised);
}

.grid-lit,
.grid-dot {
  fill: var(--accent);
}

.grid-trail {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}

.lit-1 {
  opacity: 0.2;
}

.lit-2 {
  opacity: 0.4;
}

.lit-3 {
  opacity: 0.66;
}

.lit-4 {
  opacity: 1;
}

/* One short trace on load that ends in the static state above; no loop. */
@media (prefers-reduced-motion: no-preference) {
  .grid-lit,
  .grid-dot {
    animation: lit-in 180ms ease-out both;
  }

  .step-1 {
    animation-delay: 500ms;
  }

  .step-2 {
    animation-delay: 850ms;
  }

  .step-3 {
    animation-delay: 1200ms;
  }

  .step-4 {
    animation-delay: 1550ms;
  }

  .grid-trail {
    stroke-dasharray: 100;
    animation: trail-in 1050ms linear 550ms both;
  }

  @keyframes lit-in {
    from {
      opacity: 0;
    }
  }

  @keyframes trail-in {
    from {
      stroke-dashoffset: 100;
    }

    to {
      stroke-dashoffset: 0;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Sections */
.section {
  padding-block: var(--s12);
}

.section-head {
  max-width: 40em;
  margin-bottom: var(--s8);
}

.section h2 {
  font-size: var(--t28);
}

.section-head p {
  margin-top: var(--s3);
  color: var(--text-muted);
}

/* How it works */
.steps {
  display: grid;
  gap: var(--s4);
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--s4);
  color: var(--accent);
  font-size: var(--t13);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.steps h3,
.cards h3,
.limits h3 {
  font-size: var(--t17);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.steps p,
.cards p,
.limits p {
  margin-top: var(--s2);
  color: var(--text-muted);
  font-size: var(--t15);
  line-height: 1.55;
}

/* What protects your files */
.cards {
  display: grid;
  gap: var(--s4);
}

.cards li {
  padding: var(--s6);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

/* The limits */
.limits {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.limits li {
  padding: var(--s6);
}

.limits li + li {
  border-top: 1px solid var(--border);
}

/* Availability and contact */
.duo {
  display: grid;
  gap: var(--s4);
}

.panel {
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.panel h2 {
  font-size: var(--t22);
}

.panel p {
  margin-top: var(--s3);
  color: var(--text-muted);
}

.panel .chip {
  margin-bottom: var(--s4);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: var(--s2);
  font-weight: 600;
}

/* Footer */
.site-footer {
  margin-top: var(--s12);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--t13);
  line-height: 1.6;
}

.site-footer .wrap {
  display: grid;
  gap: var(--s4);
  padding-block: var(--s8) var(--s12);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s6);
  font-size: var(--t15);
}

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

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

.footer-notes {
  display: grid;
  gap: var(--s1);
  max-width: 52em;
}

/* Text pages: privacy, not found */
.prose {
  max-width: 44em;
  padding-block: var(--s12);
}

.prose h1 {
  font-size: var(--t34);
  letter-spacing: -0.02em;
}

.prose .updated {
  margin-top: var(--s3);
  color: var(--text-muted);
  font-size: var(--t15);
}

.prose h2 {
  margin-top: var(--s12);
  font-size: var(--t22);
}

.prose h3 {
  margin-top: var(--s8);
  font-size: var(--t17);
  font-weight: 600;
}

.prose p,
.prose ul,
.prose address {
  margin-top: var(--s4);
  line-height: 1.6;
}

.prose address {
  font-style: normal;
}

.prose ul {
  padding-left: 1.25em;
  list-style: disc;
}

.prose li + li {
  margin-top: var(--s2);
}

.prose li::marker {
  color: var(--text-muted);
}

.summary {
  margin-top: var(--s8);
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.summary p:first-child {
  margin-top: 0;
}

.notfound {
  padding-block: var(--s24);
}

.notfound h1 {
  font-size: var(--t34);
}

.notfound p {
  margin-top: var(--s4);
  color: var(--text-muted);
}

.notfound-links {
  margin-top: var(--s6);
}

.notfound-links li + li {
  margin-top: var(--s3);
}

.notfound a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Wider screens */
@media (max-width: 359px) {
  :root {
    --page-pad: var(--s4);
  }
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .limits li + li {
    border-top: 0;
  }

  .limits li:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .limits li:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .limits li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .hero {
    padding-block: var(--s24) var(--s12);
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: var(--s24);
  }

  .section {
    padding-block: calc(var(--s12) + var(--s6));
  }

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

  .site-header .wrap {
    padding-block: var(--s6);
  }
}
