/* Cuenta & Cocina — the one shared stylesheet: colour tokens, base rules, and the parts every page shares.
   Every page links it before its own styles, and the free tools (L4) inherit the same tokens.
   Palette: the four brand colours, approved 8 Oct 2026, in their AA-safe shades.
   Contrast (WCAG): every text colour below is paired only with grounds it reaches 4.5:1 on. */

:root {
  /* Brand */
  --green: #1E3A2B;            /* brand green: text on light (10.7:1 on cream), and dark surfaces */
  --green-deep: #112F23;       /* deeper green surface: heroes, footer; the logo's own ground, so it sits seamlessly */
  --green-soft: #2B4C3A;       /* raised surface on green */
  --cream: #F5EDE4;            /* brand cream: the page's ground */
  --cream-soft: #FBF7F2;       /* lighter ground, between cream and white */
  --white: #FFFFFF;            /* cards */
  --gold: #C4A484;             /* brand gold: on green only (5.3:1); never text on light */
  --coral: #E07C5A;            /* brand coral: fills, lines and accents only; never text on light */
  --coral-ink: #B74822;        /* coral as text on light: links and labels (4.57:1 on cream, 5.3:1 on white) */
  --coral-fill: #C84F26;       /* coral as a button: white text 4.56:1 */
  --coral-fill-hover: #A9401C;
  --gold-ink: #886441;         /* gold as text on light (4.59:1 on cream), if ever needed */

  /* Text */
  --ink: #2A3530;              /* body text on light (11:1 on cream) */
  --ink-muted: #56635A;        /* secondary text on light (5.4:1 on cream) */
  --on-green: #F5EDE4;         /* text on green (10.7:1 on green) */
  --on-green-muted: #A9C1B3;   /* secondary text on green (5:1 on the lightest green) */

  /* Lines */
  --line: rgba(30, 58, 43, 0.12);
  --line-strong: rgba(30, 58, 43, 0.3);
  --line-on-green: rgba(245, 237, 228, 0.18);
  --line-ui: #7F8B84;          /* the edge of a control (input, chip, switch): 3:1 on cream, 3.5:1 on white */

  /* The app's own colours, used only inside the product mock-ups */
  --app-green: #1A6B52;        /* white text 6.4:1 */
  --app-up: #B42318;           /* a price that rose (6.2:1 on the app's ground) */
  --app-down: #15803D;         /* a price that fell (4.8:1 on the app's ground; not used on cream) */
  --app-ground: #FFF8F0;
  --app-line: #EFE7E0;
  --app-frame: #1A1A1A;
  --app-muted: #56635A;        /* secondary text inside the mock-ups (5.2:1 on the tab grey) */
  /* the four menu-engineering categories, as the app shows them (each pair at least 6:1) */
  --cat-star: #065F46;   --cat-star-bg: #D1FAE5;
  --cat-puzzle: #92400E; --cat-puzzle-bg: #FEF3C7;
  --cat-horse: #1E40AF;  --cat-horse-bg: #DBEAFE;
  --cat-dog: #991B1B;    --cat-dog-bg: #FEE2E2;

  /* Type */
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;

  /* Space: a 4-px scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(20, 42, 31, 0.06), 0 8px 24px rgba(20, 42, 31, 0.08);
  --shadow-lift: 0 2px 4px rgba(20, 42, 31, 0.06), 0 16px 40px rgba(20, 42, 31, 0.12);
  --shadow-device: 0 2px 6px rgba(0, 0, 0, 0.18), 0 24px 56px rgba(0, 0, 0, 0.28);
  --shadow-knob: 0 1px 3px rgba(0, 0, 0, 0.2);
  --overlay: rgba(20, 42, 31, 0.55);   /* behind a modal dialog */
  --container: 1120px;
  --column: 72ch;             /* the reading pages' column; tables may use all of it */
  --measure: 34rem;            /* a line of reading text: about 75 characters (rem, so headings share it) */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); line-height: 1.6; color: var(--ink); background: var(--white); font-variant-numeric: lining-nums; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
::selection { background: var(--gold); color: var(--green); }
:focus-visible { outline: 3px solid var(--coral-ink); outline-offset: 2px; }
/* on the dark surfaces the ring is gold (6.2:1 on green-deep, 5.3:1 on green); coral-ink there is only 2.7:1 */
.page-hero :focus-visible, footer :focus-visible, .hero :focus-visible, .trust-bar :focus-visible, .contact-band :focus-visible, .final-cta :focus-visible { outline-color: var(--gold); }
a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
[hidden] { display: none !important; }

/* Tables never make a page scroll sideways: a table wider than its column scrolls inside itself.
   Every table on this site keeps its rows in one tbody (the browser puts them there), so the
   columns stay aligned. */
table { display: block; max-width: 100%; overflow-x: auto; }
table > tbody { display: table; width: 100%; border-collapse: collapse; }

/* Motion: nothing loops, and a visitor who asks for less motion gets none. Everything is already in
   its final, visible state; the few entrances only ease it in. */
.reveal { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- The header bar (every page) ---------- */
.top-bar { background: var(--cream); border-bottom: 2px solid var(--coral); padding: var(--s2) var(--s5); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.back-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); color: var(--green); font-size: 14px; font-weight: 700; text-decoration: none; border: 2px solid var(--green); border-radius: 10px; white-space: nowrap; transition: background-color 0.2s, color 0.2s; }
.back-btn:hover { background: var(--green); color: var(--on-green); }
.lang-switcher { display: flex; gap: 6px; flex-shrink: 0; }
.lang-btn { min-width: 44px; min-height: 44px; padding: 0 10px; background: transparent; color: var(--green); border: 2px solid var(--green); border-radius: 10px; font: 700 13px/1 var(--font-body); letter-spacing: 1px; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.lang-btn:hover { background: var(--green); color: var(--on-green); }
.lang-btn.active { background: var(--coral-fill); border-color: var(--coral-fill); color: var(--white); }

/* ---------- The sub-pages' hero ---------- */
.page-hero { background: var(--green-deep); color: var(--on-green); padding: var(--s8) var(--s5) var(--s7); text-align: center; position: relative; overflow: hidden; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.15; color: var(--on-green); margin-bottom: var(--s2); position: relative; animation: rise 0.6s var(--ease-out) backwards; }
.page-hero p, .page-hero .meta { font-size: 16px; color: var(--on-green-muted); max-width: 520px; margin: 0 auto; position: relative; animation: rise 0.6s var(--ease-out) 0.1s backwards; }

/* ---------- Reading pages ---------- */
.content { max-width: calc(var(--column) + 2 * var(--s5)); margin: 0 auto; padding: var(--s7) var(--s5) var(--s8); }
.lang-content { display: none; }
.lang-content.active { display: block; }
.last-updated { display: inline-block; font-size: 13px; color: var(--ink-muted); margin-bottom: var(--s6); background: var(--cream); padding: 6px 14px; border-radius: 20px; }
.content h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--green); margin: var(--s7) 0 var(--s3); padding-bottom: var(--s2); border-bottom: 2px solid var(--cream); }
.content h3 { font-size: 17px; font-weight: 700; color: var(--green); margin: var(--s5) 0 var(--s2); }
.content p { font-size: 16px; color: var(--ink); margin-bottom: var(--s3); line-height: 1.75; }
.content ul { margin: 0 0 var(--s3); padding-left: 22px; }
/* Text and tables share one readable measure, centred in the column (a wide table scrolls inside itself). */
.lang-content > :is(p, ul, ol, h2, h3, .info-box, .note-box, .warning-box, table) { max-width: var(--measure); margin-left: auto; margin-right: auto; }
/* the pieces that aren't blocks (the date pill, the cookie button) start where the text starts */
.lang-content > :is(.last-updated, .consent-btn) { margin-left: max(0px, calc((100% - var(--measure)) / 2)); }
.nowrap { white-space: nowrap; }
.content ul li { font-size: 16px; color: var(--ink); line-height: 1.75; margin-bottom: var(--s1); }
.content a { color: var(--coral-ink); text-decoration: underline; }
.content a:hover { color: var(--green); }

.info-box, .note-box, .warning-box { background: var(--cream-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
.info-box p, .note-box p, .warning-box p { margin: 0; font-size: 15px; color: var(--ink); }
/* an email link in a box: a 44-px tall target without making the line taller */
.info-box a.cc-email, .content td a.cc-email { display: inline-block; padding: 14px 0; margin: -14px 0; }

.content table, .cookie-table { margin-bottom: var(--s5); font-size: 14px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.content th { background: var(--green); color: var(--on-green); padding: 12px 12px; text-align: left; font-weight: 600; font-size: 13px; letter-spacing: 0.3px; }
.content td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.content tr:nth-child(even) td { background: var(--cream-soft); }
/* a five-column table (the cookie list) is set a little tighter, so it fits the text's width */
.content table:has(th:nth-child(5)) { font-size: 13px; }
.content table:has(th:nth-child(5)) :is(th, td) { padding-left: 8px; padding-right: 8px; }
/* a second price (the yearly one) sits on its own line, the same way in every row */
.content td .price-alt { display: block; font-size: 13px; color: var(--ink-muted); }
.badge { display: inline-block; white-space: nowrap; background: var(--cream); color: var(--green); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 12px; }
.badge-warn { background: var(--cream); color: var(--coral-ink); }

.consent-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: var(--s3); padding: 0 var(--s6); background: var(--coral-fill); color: var(--white); border: none; border-radius: 999px; font: 700 15px/1.2 var(--font-body); cursor: pointer; text-decoration: none; transition: background-color 0.2s, transform 0.2s; }
.consent-btn:hover { background: var(--coral-fill-hover); transform: translateY(-1px); }
/* a button-styled link inside reading text keeps its button colours, not the link colours */
.content a.consent-btn, .content a.consent-btn:hover { color: var(--white); text-decoration: none; }

/* ---------- Footer (every page) ---------- */
footer { background: var(--green-deep); color: var(--on-green); padding: var(--s7) var(--s5); text-align: center; font-size: 14px; border-top: 1px solid var(--line-on-green); }
footer a { color: var(--on-green-muted); text-decoration: none; margin: 0 2px; vertical-align: top; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; white-space: nowrap; transition: color 0.2s; }
footer a:hover { color: var(--on-green); text-decoration: underline; }

@media (max-width: 768px) {
  .top-bar { flex-wrap: wrap; justify-content: center; padding: var(--s2) var(--s4); }
  .content { padding: var(--s6) var(--s4) var(--s7); }
  .content table { font-size: 13px; }
  .content th, .content td { padding: 8px 10px; }
}
