/* Podonomo landing — moss on white, Committed color strategy.
   Fonts are self-hosted (LOPD: no CDN requests).

   CANONICAL brand-token source. The Vue app mirrors these values into
   frontend/src/style.css (shadcn token names). Mirror any colour change there too.
   See docs/adr/0005-brand-tokens-landing-canonical-fe-mirrors.md. */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-normal.197cc326af6d.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin-wght-normal.c501f578bf3f.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: oklch(1 0 0);
  --ink: oklch(0.2 0.015 140);
  --muted: oklch(0.43 0.02 140);
  --line: oklch(0.9 0.008 135);

  --moss: oklch(0.42 0.08 138);
  --moss-hover: oklch(0.36 0.075 138);
  --moss-deep: oklch(0.29 0.055 140);
  --moss-tint: oklch(0.962 0.014 135);
  --on-moss: oklch(1 0 0);
  --on-moss-muted: oklch(0.87 0.04 135);

  --amber: oklch(0.68 0.13 65);
  --amber-ink: oklch(0.47 0.11 60);

  --serif: "Source Serif 4", "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --z-nav: 10;

  --measure: 62ch;
  --container: 71rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  max-width: var(--measure);
  text-wrap: pretty;
}

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

a {
  color: var(--moss);
  text-underline-offset: 0.2em;
}

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

.on-moss :focus-visible {
  outline-color: var(--on-moss);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-nav);
  background: var(--bg);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
}

.skip-link:focus {
  left: 0;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: 0.5rem;
  font: 600 1rem/1 var(--sans);
  padding: 0.95rem 1.6rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms var(--ease-out-quart),
    border-color 150ms var(--ease-out-quart),
    transform 150ms var(--ease-out-quart);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--moss);
  color: var(--on-moss);
}

.btn--primary:hover {
  background: var(--moss-hover);
}

.btn--ghost {
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--muted);
}

.btn--inverse {
  background: var(--on-moss);
  color: var(--moss-deep);
}

.btn--inverse:hover {
  background: oklch(0.93 0.02 135);
}

.btn--on-moss-ghost {
  color: var(--on-moss);
  border-color: oklch(1 0 0 / 0.35);
}

.btn--on-moss-ghost:hover {
  border-color: oklch(1 0 0 / 0.7);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--moss-deep);
  transition: box-shadow 200ms var(--ease-out-quart);
}

.nav.is-scrolled {
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.12), 0 8px 24px oklch(0.2 0.03 140 / 0.25);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-block: 0.9rem;
}

.wordmark {
  font: 600 1.35rem/1 var(--serif);
  letter-spacing: -0.01em;
  color: var(--on-moss);
  text-decoration: none;
  margin-right: auto;
}

.nav__link {
  color: var(--on-moss-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 150ms var(--ease-out-quart);
}

.nav__link:hover {
  color: var(--on-moss);
}

.nav .btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
}

@media (max-width: 40rem) {
  .nav__link--secondary {
    display: none;
  }

  .nav__inner {
    gap: 1rem;
  }

  .wordmark {
    font-size: 1.2rem;
  }

  .nav .btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
  }
}

/* ---------- Hero (moss drench) ---------- */

.hero {
  background: var(--moss-deep);
  color: var(--on-moss);
  overflow: clip;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(4.5rem, 10vw, 8rem);
}

.hero h1 {
  font-size: clamp(2.35rem, 1.1rem + 4.4vw, 4.15rem);
  font-weight: 600;
  line-height: 1.06;
}

.hero h1 .contra {
  display: block;
  color: var(--on-moss-muted);
}

.hero__sub {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--on-moss-muted);
  max-width: 46ch;
}

.hero__cta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.hero__note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--on-moss-muted);
}

@media (max-width: 56rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    padding-block: clamp(3.5rem, 8vw, 5rem);
  }
}

/* Hero entrance — visible by default; animation only decorates. */
@media (prefers-reduced-motion: no-preference) {
  .hero [data-rise] {
    animation: rise 800ms var(--ease-out-expo) backwards;
  }

  .hero [data-rise="2"] { animation-delay: 90ms; }
  .hero [data-rise="3"] { animation-delay: 180ms; }
  .hero [data-rise="4"] { animation-delay: 270ms; }

  .hero .vignette {
    animation: vignette-in 900ms 250ms var(--ease-out-expo) backwards;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
}

@keyframes vignette-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem) scale(0.985);
  }
}

/* ---------- UI vignettes (hand-built product stills) ---------- */

.vignette {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow:
    0 1px 2px oklch(0.2 0.02 140 / 0.06),
    0 24px 60px -24px oklch(0.2 0.04 140 / 0.35);
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 30rem;
}

.vg-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.vg-avatar {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--moss-tint);
  color: var(--moss);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.vg-bar strong {
  display: block;
  font-size: 0.95rem;
}

.vg-bar small {
  color: var(--muted);
}

.vg-chip {
  margin-left: auto;
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--moss);
  background: var(--moss-tint);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.vg-tabs {
  display: flex;
  gap: 1.4rem;
  padding: 0.7rem 1.15rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
}

.vg-tabs span {
  padding-bottom: 0.55rem;
}

.vg-tabs .is-active {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--moss);
}

.vg-entries {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
}

.vg-entries li {
  display: flex;
  gap: 0.9rem;
  padding: 0.7rem 1.15rem;
}

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

.vg-date {
  flex: none;
  width: 3.2rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.vg-entries strong {
  display: block;
  font-size: 0.85rem;
}

.vg-entries small {
  color: var(--muted);
}

.vg-amount {
  margin-left: auto;
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Factura vignette */

.vignette--factura .vg-doc {
  padding: 1.15rem 1.25rem;
}

.vg-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.vg-doc-head strong {
  font-family: var(--serif);
  font-size: 0.95rem;
}

.vg-doc-head small,
.vg-rows small {
  color: var(--muted);
}

.vg-rows {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0;
}

.vg-rows li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.vg-rows .vg-total {
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.7rem;
  font-weight: 700;
}

.vg-verifactu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--moss-tint);
  border-radius: 0 0 0.75rem 0.75rem;
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 600;
}

.vg-verifactu::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--moss);
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
}

.section--tight {
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}

.section--tinted {
  background: var(--moss-tint);
}

.section h2 {
  font-size: clamp(1.8rem, 1rem + 2.6vw, 2.8rem);
  max-width: 24ch;
}

.section__lede {
  margin-top: 1.1rem;
  font-size: 1.125rem;
  color: var(--muted);
}

/* ---------- Pain: the duplicate-entry ledger ---------- */

.pain__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.pain__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pain__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
}

.pain__list li:last-child {
  border-bottom: 1px solid var(--line);
}

.pain__tool {
  font-weight: 600;
}

.pain__again {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
  flex: none;
}

.pain__relief {
  border-top: 3px solid var(--moss);
  padding-top: 1.5rem;
}

.pain__relief h3 {
  font-size: 1.45rem;
  color: var(--moss);
}

.pain__relief p {
  margin-top: 0.9rem;
  color: var(--muted);
}

@media (max-width: 56rem) {
  .pain__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Source of truth rows ---------- */

.truth-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  margin-top: clamp(3rem, 7vw, 5.5rem);
}

.truth-row:nth-of-type(even) .truth-row__media {
  order: -1;
}

.truth-row h3 {
  font-size: clamp(1.4rem, 1rem + 1.4vw, 1.9rem);
}

.truth-row p {
  margin-top: 1rem;
  color: var(--muted);
}

.truth-row__media {
  display: flex;
  justify-content: center;
}

@media (max-width: 56rem) {
  .truth-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .truth-row:nth-of-type(even) .truth-row__media {
    order: 0;
  }
}

/* ---------- The real week (numbered sequence + photos) ---------- */

.week__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

.week__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.week__steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.4rem;
}

.week__steps li + li {
  margin-top: 2.5rem;
}

.week__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--moss);
  color: var(--on-moss);
  font: 700 1rem/1 var(--sans);
  display: grid;
  place-items: center;
}

.week__steps h3 {
  font-size: 1.35rem;
}

.week__steps p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.week__media {
  display: grid;
  gap: 1.25rem;
}

.week__media img {
  border-radius: 0.75rem;
  width: 100%;
  object-fit: cover;
}

.week__media .photo--main {
  aspect-ratio: 16 / 10;
}

.week__media .photo--detail {
  aspect-ratio: 16 / 7;
  max-width: 82%;
  justify-self: end;
}

.week__media figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

@media (max-width: 56rem) {
  .week__layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Fiscal correctness ---------- */

.fiscal__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.fiscal__list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem 2.5rem;
}

.fiscal__list dt {
  font-weight: 700;
  font-size: 1.05rem;
}

.fiscal__list dd {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

@media (max-width: 56rem) {
  .fiscal__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Testimonials (placeholders until real) ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.quote {
  margin: 0;
  border: 1px dashed oklch(0.68 0.13 65 / 0.7);
  border-radius: 0.75rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quote__pending {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-ink);
  background: oklch(0.68 0.13 65 / 0.14);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--muted);
}

.quote figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: auto;
}

/* ---------- Pricing ---------- */

.price__plan {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: clip;
}

.price__main {
  padding: clamp(2rem, 4vw, 3rem);
}

.price__was {
  color: var(--muted);
  font-size: 1rem;
}

.price__was s {
  font-variant-numeric: tabular-nums;
}

.price__now {
  font-family: var(--serif);
  font-size: clamp(3rem, 2rem + 3vw, 4.2rem);
  font-weight: 600;
  line-height: 1;
  margin-top: 0.35rem;
}

.price__now small {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--muted);
}

.price__launch {
  margin-top: 0.8rem;
  color: var(--amber-ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.price__cta {
  margin-top: 2rem;
}

.price__note {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.price__includes {
  background: var(--moss-tint);
  padding: clamp(2rem, 4vw, 3rem);
}

.price__includes h3 {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--moss);
}

.price__includes ul {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.price__includes li {
  padding-left: 1.6rem;
  position: relative;
}

.price__includes li + li {
  margin-top: 0.8rem;
}

.price__includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.85rem;
  height: 0.45rem;
  border-left: 2px solid var(--moss);
  border-bottom: 2px solid var(--moss);
  transform: rotate(-45deg);
}

@media (max-width: 56rem) {
  .price__plan {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Final band ---------- */

.final {
  background: var(--moss-deep);
  color: var(--on-moss);
  text-align: center;
  padding-block: clamp(5rem, 11vw, 8.5rem);
}

.final h2 {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem);
  margin-inline: auto;
}

.final p {
  margin: 1.25rem auto 0;
  color: var(--on-moss-muted);
  font-size: 1.125rem;
}

.final .btn {
  margin-top: 2.25rem;
}

.final__note {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--on-moss-muted);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer .wordmark {
  color: var(--ink);
  font-size: 1.15rem;
}

.footer a {
  color: var(--muted);
}

.footer__legal {
  margin-left: auto;
}

/* ---------- Scroll reveals (enhance-only; content visible without JS) ---------- */

/* No pre-hidden state: if the observer never fires, content stays visible. */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal].in {
    animation: reveal-rise 650ms var(--ease-out-expo) backwards;
    animation-delay: calc(var(--i, 0) * 70ms);
  }
}

@keyframes reveal-rise {
  from {
    opacity: 0;
    transform: translateY(0.9rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Legal pages ---------- */

.legal {
  padding-block: clamp(3rem, 7vw, 5rem) 4rem;
}

.legal__inner {
  max-width: 48rem;
}

.legal h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  margin-block-end: 0.5rem;
}

.legal__meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-block-end: 2.5rem;
}

.legal__lead {
  font-size: 1.1rem;
  border-inline-start: 3px solid var(--moss);
  padding-inline-start: 1.25rem;
  margin-block-end: 2.5rem;
}

.legal h2 {
  font-size: 1.4rem;
  margin-block: 3rem 1rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line);
}

.legal h3 {
  font-size: 1.1rem;
  margin-block: 2rem 0.75rem;
}

.legal p,
.legal li {
  max-width: var(--measure);
  line-height: 1.7;
}

.legal p {
  margin-block-end: 1rem;
}

.legal ul,
.legal ol {
  margin-block-end: 1rem;
  padding-inline-start: 1.5rem;
}

.legal li {
  margin-block-end: 0.5rem;
}

.legal a {
  color: var(--moss);
  text-underline-offset: 0.15em;
}

.legal a:hover {
  color: var(--moss-hover);
}

.legal code {
  background: var(--moss-tint);
  border-radius: 0.25rem;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

/* Tables carry the substance on these pages, so they scroll rather than squeeze. */
.legal__table-wrap {
  overflow-x: auto;
  margin-block-end: 1.5rem;
}

.legal__table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.95rem;
}

.legal__table th,
.legal__table td {
  border-block-end: 1px solid var(--line);
  padding: 0.75rem 1rem 0.75rem 0;
  text-align: start;
  vertical-align: top;
  line-height: 1.6;
}

.legal__table thead th {
  border-block-end-color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal__table tbody th {
  font-weight: 600;
  white-space: nowrap;
  padding-inline-end: 2rem;
}

.legal__nowrap {
  white-space: nowrap;
}

.legal__muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.legal__contact {
  margin-block-start: 3rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
}
