/* Pomodoro Sync website: one stylesheet for the home, content pages and
   404. Generated pages link it as /assets/site.<hash>.css (immutable).
   Same palette as the app (lib/theme/app_theme.dart). No drop shadows and no
   gradients: 1px borders only, like the app. */
:root {
  color-scheme: light dark;
  --ink: #1a1a1a;
  --ink-soft: #6b6b6b;
  --canvas: #fafaf8;
  --surface: #ffffff;
  --surface-alt: #f2f1ee;
  --divider: rgba(0, 0, 0, 0.1);
  --track: rgba(0, 0, 0, 0.09);
  --accent: #c2412d;        /* filled buttons: white text 5.1:1 */
  --accent-text: #c2412d;   /* links, labels */
  --on-accent: #ffffff;
  --phase: #e5614c;         /* ring */
  --phase-text: #c2412d;
  --phase-btn: #c2412d;
  --photo-bg: #e8e4dc;
  --focus: #1a1a1a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f2f0;
    --ink-soft: #a3a3a1;
    --canvas: #111111;
    --surface: #1b1b1b;
    --surface-alt: #202020;
    --divider: rgba(255, 255, 255, 0.12);
    --track: rgba(255, 255, 255, 0.13);
    --accent-text: #ef8473;
    --phase-text: #ef8473;
    --photo-bg: #2a2724;
    --focus: #f2f2f0;
  }
}
[data-phase="short"] { --phase: #4c9e8a; --phase-text: #2f7a68; --phase-btn: #2f7a68; }
[data-phase="long"] { --phase: #5b7cc4; --phase-text: #4563a8; --phase-btn: #4563a8; }
@media (prefers-color-scheme: dark) {
  [data-phase="short"] { --phase-text: #6cc2ad; }
  [data-phase="long"] { --phase-text: #93abe0; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible { border-radius: 12px; }
.vh {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Skip links: hidden until focused. */
.skip {
  position: absolute; left: 12px; top: -100px; z-index: 10;
  padding: 12px 16px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 10px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Language notice (only for browsers without the page's language). */
.lang-notice {
  display: none; align-items: center; justify-content: center; gap: 8px;
  padding: 0 8px 0 16px; background: var(--surface-alt);
  border-bottom: 1px solid var(--divider); font-size: 14px; text-align: center;
}
html[data-notice] .lang-notice { display: flex; }
.lang-notice a {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink);
}
.lang-notice a:hover { color: var(--accent-text); }
.lang-notice button {
  flex-shrink: 0; width: 44px; height: 44px; background: none; border: 0; padding: 0;
  font: inherit; font-size: 22px; line-height: 1; color: var(--ink-soft); cursor: pointer;
}
.lang-notice button:hover { color: var(--ink); }

/* Header */
header.nav {
  max-width: 1080px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 600; text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 4px; font-size: 14px; color: var(--ink-soft); }
.nav-links a, .lang-switch a, .lang-switch .current {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0 8px; text-decoration: none;
}
.nav-links a:hover, .lang-switch a:hover { color: var(--ink); }
.lang-switch {
  display: flex; align-items: center; font-size: 14px; letter-spacing: 0.5px;
  color: var(--ink-soft); white-space: nowrap; padding-left: 8px; position: relative;
}
/* Short divider, as tall as the text (a 44 px border looked like the
   language switch hung lower than the rest of the row). */
.lang-switch::before {
  content: ""; position: absolute; left: 0; top: 50%; height: 18px; margin-top: -9px;
  border-left: 1px solid var(--divider);
}
.lang-switch .current { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) {
  /* Phones keep only "Descargar" (the converting action) next to ES·EN. */
  .nav-links a:not(.nav-dl) { display: none; }
}
/* Narrow phones (360 px): brand, "Descargar" and ES·EN must fit, or the
   page grows wider than the screen and everything shifts left. */
@media (max-width: 400px) {
  header.nav { gap: 8px; }
  .brand { gap: 8px; font-size: 15px; }
  .nav-right { gap: 4px; }
  .nav-links a, .lang-switch a, .lang-switch .current { min-width: 40px; padding: 0 5px; }
  .lang-switch { padding-left: 4px; }
}

main { display: block; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main:focus { outline: none; }
section { scroll-margin-top: 16px; }
h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.4px; margin: 0 0 12px; }
.section { padding: 56px 0 8px; }
.section > .lead, .section-lead { color: var(--ink-soft); max-width: 720px; margin: 0 0 28px; }
.center { text-align: center; }
.center .section-lead, .center > .lead { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: 12px;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; line-height: 1.2;
  border: 1px solid var(--divider); background: var(--surface); color: var(--ink); cursor: pointer;
}
.btn:hover { border-color: var(--ink-soft); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #a8361f; border-color: #a8361f; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.btn-ink:hover { opacity: 0.9; border-color: var(--ink); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.stores .btn { flex: 1 1 220px; max-width: 320px; }
/* Visitor's own platform first and filled (data-platform is set in <head>). */
html[data-platform="android"] .store-android,
html[data-platform="windows"] .store-windows,
html:not([data-platform="android"]):not([data-platform="windows"]) .store-web { order: -1; }
html[data-platform="android"] .store-android,
html[data-platform="windows"] .store-windows { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.hint { font-size: 14px; color: var(--ink-soft); margin: 14px 0 0; }
.hint a { color: var(--ink); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 28px; padding: 28px 0 8px; align-items: start;
}
/* default */
.hero-text { text-align: center; }
/* Desktop: text + photo on the left, the timer on the right spanning both
   rows. The photo stretches to the bottom of the timer column, so both
   columns end at the same height (no empty block under the photo). */
@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "text tool" "photo tool";
    grid-template-rows: auto 1fr;
    column-gap: 48px; row-gap: 28px; padding-top: 48px; align-items: stretch;
  }
  .hero-text { grid-area: text; text-align: left; }
  .hero .hero-text .lead { margin: 0; }
  .hero-tool { grid-area: tool; align-self: start; }
  .hero-photo { grid-area: photo; min-height: 240px; position: relative; }
  .hero-photo img { aspect-ratio: auto; position: absolute; inset: 0; width: 100%; height: 100%; }
}

.hero h1 { font-size: clamp(28px, 4.4vw, 44px); letter-spacing: -0.8px; margin: 0 0 8px; }
.hero .sub { font-size: clamp(17px, 2vw, 20px); font-weight: 600; color: var(--phase-text); margin: 0 0 8px; }
.hero .lead { color: var(--ink-soft); margin: 0 auto; max-width: 560px; }
/* Phones: the Start button must sit inside the first screen (lab, P3/P4:
   at 390-412 px wide it fell on the fold). */
@media (max-width: 560px) {
  .hero { gap: 20px; padding-top: 16px; }
  .hero .lead { font-size: 15px; line-height: 1.5; }
}

/* Photos */
.photo {
  margin: 0; overflow: hidden; border-radius: 20px; background: var(--photo-bg);
  border: 1px solid var(--divider);
}
.photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
@media (max-width: 959px) { .hero-photo img { aspect-ratio: 16 / 9; } }
@media (prefers-color-scheme: dark) {
  .photo img, .article figure img { filter: brightness(0.88) contrast(1.02); }
}

/* Timer card */
.timer {
  background: var(--surface); border: 1px solid var(--divider); border-radius: 24px;
  padding: 20px 16px 18px; margin: 20px auto 0; max-width: 460px; text-align: center;
}
.presets {
  display: flex; justify-content: center; gap: 4px; padding: 4px; margin: 0 auto 8px;
  background: var(--surface-alt); border-radius: 12px; border: 0; max-width: 360px;
}
.presets legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.presets label { flex: 1; position: relative; }
.presets input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.presets span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px;
  border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.presets input:checked + span { background: var(--surface); color: var(--ink); border: 1px solid var(--divider); }
.presets input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.dial { position: relative; width: min(280px, 78vw); aspect-ratio: 1; margin: 4px auto 8px; }
@media (max-width: 560px) { .dial { width: min(240px, 62vw); } }
/* Wide but short screens (laptops at 1280x720, lab P2): keep Start above
   the fold. */
@media (min-width: 561px) and (max-height: 820px) {
  .hero { padding-top: 20px; gap: 20px; }
  .hero h1 { font-size: clamp(26px, 3.2vw, 34px); }
  .hero .lead { font-size: 15px; line-height: 1.5; }
  .dial { width: min(220px, 60vh); }
}
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 6; }
.dial .track { stroke: var(--track); }
.dial .bar { stroke: var(--phase); stroke-linecap: round; transition: stroke-dashoffset 0.4s linear; }
.dial-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.phase-label {
  font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--phase-text);
}
.digits {
  font-size: clamp(52px, 16vw, 72px); font-weight: 700; letter-spacing: -1px; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.cycle { font-size: 14px; color: var(--ink-soft); min-height: 22px; }
.controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 4px 0 6px; }
.round {
  width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--divider); background: transparent; color: var(--ink-soft); cursor: pointer; padding: 0;
}
.round:hover { color: var(--ink); border-color: var(--ink-soft); }
.round svg { width: 22px; height: 22px; }
.play {
  min-width: 132px; height: 60px; border-radius: 30px; padding: 0 24px; border: 0; cursor: pointer;
  background: var(--phase-btn); color: var(--on-accent); font: inherit; font-size: 17px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.play:hover { filter: brightness(0.92); }
.play:focus-visible { outline-offset: 4px; border-radius: 30px; }
.play svg { width: 20px; height: 20px; }
.timer-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.timer-note { font-size: 13px; color: var(--ink-soft); margin: 4px 0 0; }
.toast {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  min-height: 44px; font-size: 14px; margin-top: 6px;
}
.toast[hidden] { display: none; }
.toast button {
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--divider);
  background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}

/* Sync CTA (details/summary works without JS) */
.sync { max-width: 460px; margin: 16px auto 0; text-align: center; }
.sync-lead { font-size: 14px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 14px; }
.sync-lead strong { color: var(--ink); }
.sync-stores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sync-stores .btn { justify-content: center; gap: 8px; padding: 10px 8px; min-height: 48px; white-space: nowrap; }
@media (max-width: 400px) { .sync-stores .btn svg { display: none; } }
/* The visitor's own platform goes first and filled. */
html[data-platform="windows"] .sync-windows,
html[data-platform="android"] .sync-android { order: -1; background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.sync-panel p strong { color: var(--ink); }
.sync-panel .stores .btn { flex-basis: 100%; max-width: none; }

/* Price table */
.price-wrap { display: grid; gap: 20px; }
table.compare { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; overflow: hidden; font-size: 15px; }
.compare-cap { color: var(--ink-soft); font-size: 14px; margin: 0 0 8px; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--divider); text-align: left; vertical-align: top; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--surface-alt); font-size: 14px; }
.compare td { text-align: center; white-space: nowrap; font-weight: 600; width: 22%; }
.compare .no { color: var(--ink-soft); font-weight: 400; }
.trust { font-size: 15px; margin: 0; }
.trust a { color: var(--accent-text); font-weight: 600; }

/* How it works */
.steps { display: grid; gap: 20px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0 0 20px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--divider); border-radius: 20px; overflow: hidden; }
.steps .photo { border: 0; border-radius: 0; }
.steps h3 { font-size: 17px; margin: 16px 18px 6px; }
.steps p { margin: 0 18px 18px; color: var(--ink-soft); font-size: 15px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-text); font-weight: 600; }

/* Screenshots carousel */
.shots {
  display: flex; gap: 16px; overflow-x: auto; padding: 8px 4px 16px; margin: 0;
  scroll-snap-type: x proximity; list-style: none;
}
.shots picture { flex: 0 0 auto; scroll-snap-align: center; }
.shots img { height: 480px; width: auto; border-radius: 22px; border: 1px solid var(--divider); background: #111; }

/* Feature cards */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .grid.phases { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; padding: 20px; }
.card .icon { width: 22px; height: 22px; color: var(--accent-text); margin-bottom: 8px; }
.card h3 { font-size: 16px; margin: 0 0 6px; }
.card p { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* Download band */
.band { background: var(--surface-alt); border-radius: 24px; padding: 40px 20px; margin-top: 56px; text-align: center; }
.band .section-lead { margin: 0 auto 24px; }

/* Guides list */
.guides { display: grid; gap: 12px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .guides { grid-template-columns: repeat(2, 1fr); } }
.guides a {
  display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--divider); border-radius: 14px;
  background: var(--surface); text-decoration: none;
}
.guides a:hover { border-color: var(--ink-soft); }
.guides strong { display: block; margin-bottom: 4px; }
.guides span { color: var(--ink-soft); font-size: 14px; }

/* FAQ */
.faq-list { max-width: none; }
.faq-list details { border: 1px solid var(--divider); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.faq-list summary {
  display: flex; align-items: center; min-height: 52px; padding: 10px 18px; font-weight: 600; cursor: pointer;
}
.faq-list details p { margin: 0; padding: 0 18px 16px; color: var(--ink-soft); }

/* Footer */
footer.site {
  max-width: 1080px; margin: 64px auto 0; padding: 24px 16px 40px; border-top: 1px solid var(--divider);
  color: var(--ink-soft); font-size: 14px;
}
footer.site .links { display: flex; flex-wrap: wrap; gap: 0 8px; margin: 0 0 8px -8px; padding: 0; list-style: none; }
footer.site .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; text-decoration: none; }
footer.site .links a:hover { color: var(--ink); }
footer.site p { margin: 8px 0; }
footer.site .credits a { color: var(--ink-soft); }

/* Content pages (web_landing/content/) */
.crumbs { font-size: 14px; color: var(--ink-soft); margin: 20px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
.crumbs li { display: flex; align-items: center; min-height: 44px; }
.crumbs li + li::before { content: "/"; margin-right: 4px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.article { max-width: 720px; margin: 0 auto; }
.article h1 { font-size: clamp(30px, 4.6vw, 42px); letter-spacing: -0.8px; margin: 8px 0 8px; }
.article .dates { font-size: 14px; color: var(--ink-soft); margin: 0 0 24px; }
.article h2 { margin: 40px 0 12px; }
.article h3 { font-size: 18px; margin: 28px 0 8px; }
.article p, .article li { font-size: 17px; }
.article .lead { font-size: 19px; color: var(--ink); }
.article a { color: var(--accent-text); }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; display: block; overflow-x: auto; }
.article th, .article td { padding: 10px 12px; border: 1px solid var(--divider); text-align: left; vertical-align: top; }
.article thead th { background: var(--surface-alt); }
.article figure { margin: 24px 0; }
.article figure img { border-radius: 16px; border: 1px solid var(--divider); background: var(--photo-bg); width: 100%; height: auto; }
.article figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.article blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--divider); color: var(--ink-soft); }
.next-steps { max-width: 720px; margin: 48px auto 0; }

/* 404 */
.notfound { max-width: 640px; margin: 64px auto; text-align: center; }
.notfound .stores { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Classes used inside web_landing/content/ pages (WEB-CONTENT). */
.article p.note { font-size: 15px; color: var(--ink-soft); border-top: 1px solid var(--divider); padding-top: 16px; margin-top: 32px; }
.article p.cta-row, p.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.article .btn { color: var(--ink); text-decoration: none; }
.article .btn-primary { color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--divider); }
.article table caption { caption-side: top; text-align: left; font-size: 14px; color: var(--ink-soft); padding: 0 0 8px; }
kbd {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.88em; padding: 1px 6px;
  border: 1px solid var(--divider); border-bottom-width: 2px; border-radius: 6px; background: var(--surface);
}
cite { font-style: italic; }
.article figure picture { display: block; }

/* "Acceso de pruebas" (test site only, build_landing.mjs --gate) */
.access { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.access-card {
  width: min(380px, 100%); background: var(--surface); border: 1px solid var(--divider);
  border-radius: 16px; padding: 24px; display: grid; gap: 10px;
}
.access-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-weight: 600; }
.access-brand img { border-radius: 6px; }
.access h1 { font-size: 20px; margin: 0; }
.access-text { color: var(--ink-soft); margin: 0 0 8px; font-size: 15px; }
.access label { font-size: 14px; }
.access input {
  min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--divider);
  background: var(--canvas); color: var(--ink); font: inherit;
}
.access input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.access-err { color: var(--accent); margin: 0; font-size: 14px; }
.access .btn { justify-content: center; margin-top: 6px; }
