/* Tidyo website, shared stylesheet. One file for every page (EN + FR). */

/* ---------- Tokens ---------- */
:root {
  --indigo: #5B3DF5;
  --indigo-deep: #3A1FC9;
  --violet: #7B5CFF;
  --lilac: #9A89FF;
  --coral: #FFB199;
  --ink: #0E0E14;
  --muted: #5F6372;          /* #6E7280 darkened slightly for AA on #F3F5FA */
  --card: #F3F5FA;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --line: rgba(14, 14, 20, .08);
  --link: #4A2EE0;
  --focus: #5B3DF5;
  --aurora: linear-gradient(135deg, #7B5CFF 0%, #5B3DF5 48%, #3A1FC9 100%);
  --shadow-lg: 0 30px 60px -20px rgba(42, 19, 143, .35), 0 12px 24px -12px rgba(14, 14, 20, .18);
  --shadow-sm: 0 1px 2px rgba(14, 14, 20, .06), 0 6px 16px -8px rgba(14, 14, 20, .12);
  --radius: 22px;
  --radius-lg: 32px;
  --gutter: 16px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F4F4F8;
    --muted: #A7AABA;
    --card: #17171F;
    --bg: #0B0B10;
    --surface: #121219;
    --line: rgba(255, 255, 255, .09);
    --link: #B3A4FF;
    --focus: #B3A4FF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 16px -8px rgba(0, 0, 0, .6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.022em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.1rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.75rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.012em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

[id] { scroll-margin-top: 76px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.hero :focus-visible, .band :focus-visible, .cta :focus-visible, .page-hero :focus-visible { outline-color: #fff; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.15rem; letter-spacing: -0.02em; margin-right: auto; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: none; gap: 4px; }
.nav a, .lang { color: var(--ink); text-decoration: none; font-size: .95rem; padding: 8px 10px; border-radius: 10px; opacity: .82; }
.nav a:hover, .lang:hover { opacity: 1; background: var(--card); }
.lang { font-weight: 600; font-size: .85rem; border: 1px solid var(--line); padding: 6px 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--indigo); color: #fff; text-decoration: none; font-weight: 650; font-size: .95rem; border: 0;
  box-shadow: 0 6px 16px -6px rgba(91, 61, 245, .6);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(91, 61, 245, .7); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .88rem; }
@media (min-width: 880px) { .nav { display: flex; } }
@media (max-width: 340px) { .site-header .btn-sm { display: none; } }

/* ---------- Hero (indigo aurora) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff; background: var(--aurora);
  padding: 56px 0 0;
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .7; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; right: -160px; top: -200px; background: radial-gradient(closest-side, rgba(255, 177, 153, .85), transparent); }
.hero::after { width: 620px; height: 620px; left: -260px; bottom: -280px; background: radial-gradient(closest-side, rgba(154, 137, 255, .9), transparent); }
.hero-grid { display: grid; gap: 40px; align-items: end; }
.hero-copy { padding-bottom: 8px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--indigo); margin: 0 0 14px;
}
.hero .eyebrow { color: #FFE0D6; background: rgba(255, 255, 255, .12); padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); }
.hero h1 { color: #fff; max-width: 13ch; }
.hero .lead { font-size: clamp(1.1rem, 2.3vw, 1.3rem); color: rgba(255, 255, 255, .88); max-width: 36ch; margin-bottom: 26px; }
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 22px; }
.store-badge { display: inline-block; border-radius: 10px; line-height: 0; }
.store-badge img { width: auto; height: 54px; }   /* width follows the badge's own aspect ratio (img width/height attributes) */
.store-note { font-size: .9rem; color: rgba(255, 255, 255, .82); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 8px; list-style: none; }
.chips li { font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .16); }
.hero-visual { display: flex; justify-content: center; }
@media (min-width: 900px) {
  .hero { padding-top: 88px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .hero-copy { padding-bottom: 96px; }
}

/* ---------- Hero visual (header creative, phone crop) ---------- */
.hero-shot {
  width: min(540px, 100%); margin: 0 auto;
  /* fade the creative's own background into the hero gradient */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 18%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 18%);
          mask-composite: intersect;
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.alt { background: var(--card); }

/* Intro / problem */
.intro-grid { display: grid; gap: 24px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.stat p { margin: 0; color: var(--muted); font-size: .97rem; }
@media (min-width: 768px) { .intro-grid { grid-template-columns: repeat(3, 1fr); } }

/* Features */
.features { display: grid; gap: 16px; }
.feature {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm);
}
/* screenshot crop at the bottom of a card, edge to edge */
.f-shot {
  margin: 22px -26px -26px; margin-top: auto; padding-top: 22px;
}
.f-shot img {
  width: 100%; aspect-ratio: 480 / 330; object-fit: cover; object-position: 50% 0;
  border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
}
.alt .feature { background: var(--bg); }
.feature p, .feature li { color: var(--muted); font-size: .98rem; }
.feature ul { margin: 0; padding-left: 1.1em; }
.feature li { margin-bottom: .35em; }
.feature p:last-child { margin-bottom: 0; }
.f-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; margin-bottom: 16px;
  background: var(--aurora); box-shadow: 0 8px 18px -8px rgba(91, 61, 245, .7);
}
.f-ico.coral { background: linear-gradient(135deg, #FFC3AF, #FF8A6B); box-shadow: 0 8px 18px -8px rgba(255, 138, 107, .8); }
.f-ico svg { width: 24px; height: 24px; }
.feature.wide { background: var(--aurora); color: #fff; border: 0; }
.feature.wide p, .feature.wide li { color: rgba(255, 255, 255, .88); }
.feature.wide .f-ico { background: rgba(255, 255, 255, .18); box-shadow: none; }
.feature.wide .f-shot img { border-radius: 0 0 var(--radius) var(--radius); }
@media (min-width: 700px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  /* wide card: text left, screenshot right */
  .feature.wide { grid-column: span 2; display: grid; grid-template-columns: 1fr minmax(220px, 340px); gap: 28px; padding-right: 0; }
  .feature.wide .f-shot { margin: 0 0 -26px; padding: 0; align-self: end; }
  .feature.wide .f-shot img { aspect-ratio: 480 / 418; border-radius: 0 0 var(--radius) 0; }
  .features > .feature:last-child { grid-column: span 2; }   /* 7 cards below the wide one: last one spans */
}
@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .features > .feature:last-child { grid-column: auto; }
}

/* Privacy band */
.band {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: #0E0E14;
}
.band::before {
  content: ""; position: absolute; z-index: -1; inset: auto -20% -60% auto; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(91, 61, 245, .7), transparent); filter: blur(30px);
}
.band .eyebrow { color: var(--coral); }
.band h2 { color: #fff; max-width: 18ch; }
.band .section-head p { color: rgba(255, 255, 255, .78); }
.promise { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
.promise li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; padding: 18px 20px; }
.promise strong { display: block; margin-bottom: 2px; }
.promise span { color: rgba(255, 255, 255, .74); font-size: .96rem; }
@media (min-width: 768px) { .promise { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .promise { grid-template-columns: repeat(4, 1fr); } }

/* Steps */
.steps { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; margin-bottom: 14px;
  background: var(--aurora); color: #fff; font-weight: 800;
}
.steps p { color: var(--muted); margin: 0; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Pricing */
.plans { display: grid; gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.alt .plan { background: var(--bg); }
.plan.pro { border: 2px solid var(--indigo); }
.pro-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--indigo); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.plan ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.fine { font-size: .88rem; color: var(--muted); margin-top: 18px; }
@media (min-width: 768px) { .plans { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 2px; font-weight: 650; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--card) no-repeat center / 14px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%235B3DF5' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 2px 20px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }
.faq h3 { font-size: inherit; margin: 0; font-weight: inherit; letter-spacing: inherit; line-height: 1.35; }

/* Final CTA */
.cta {
  position: relative; isolation: isolate; overflow: hidden; text-align: center; color: #fff;
  background: var(--aurora); border-radius: var(--radius-lg); padding: 56px 24px;
}
.cta::after { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -120px; top: -180px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 177, 153, .7), transparent); filter: blur(40px); }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .88); max-width: 46ch; margin: 0 auto 24px; }
.cta .store-row { justify-content: center; margin: 0; }
.cta img.app-icon { width: 80px; height: 80px; border-radius: 18px; margin: 0 auto 20px; box-shadow: 0 14px 30px -12px rgba(14, 14, 20, .5); }

/* Screenshot gallery: scroll-snap carousel, 4-column grid on desktop */
.shots {
  display: flex; gap: 16px; list-style: none;
  margin: 0 calc(-1 * var(--gutter)); padding: 6px var(--gutter) 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 25%, transparent) transparent;
}
.shots li { flex: none; width: min(62vw, 260px); scroll-snap-align: start; }
.shots img { width: 100%; border-radius: 22px; box-shadow: var(--shadow-sm); background: var(--card); }
.shots:focus-visible { outline-offset: -3px; }
@media (min-width: 700px) { .shots li { width: 30vw; } }
@media (min-width: 1000px) {
  .shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; margin: 0; padding: 0; overflow: visible; }
  .shots li { width: auto; }
  .shots img { border-radius: 26px; }
}

/* ---------- Sub-pages (privacy, support) ---------- */
.page-hero { color: #fff; background: var(--aurora); padding: 56px 0 48px; position: relative; overflow: hidden; isolation: isolate; }
.page-hero::after { content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; right: -140px; top: -220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 177, 153, .7), transparent); filter: blur(50px); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); color: #fff; }
.page-hero p { color: rgba(255, 255, 255, .88); max-width: 60ch; margin: 0; font-size: 1.1rem; }
.prose { max-width: 740px; padding-top: 48px; padding-bottom: 72px; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink); }
.prose .muted { color: var(--muted); }
.callout { background: var(--card); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 24px; border-left: 4px solid var(--indigo); }
.callout p:last-child { margin-bottom: 0; }
.contact-card { display: grid; gap: 6px; background: var(--card); border-radius: var(--radius); padding: 24px; margin: 8px 0 32px; }
.contact-card a.btn { justify-self: start; margin-top: 10px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; }
.toc a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--card); text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink); }
.toc a:hover { background: color-mix(in srgb, var(--indigo) 14%, var(--card)); }
.prose .faq summary { font-size: 1.02rem; }
kbd, .path { font-family: inherit; font-weight: 600; background: var(--card); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
@media (max-width: 420px) { .path { white-space: normal; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 36px; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; margin-bottom: 8px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.legal { font-size: .8rem; line-height: 1.5; margin: 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.2fr 1fr; } }

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