/* maVinification website. Same tokens as the app (App/Sources/Theme.swift). */

@font-face { font-family: "Raleway"; font-weight: 700; font-display: swap; src: url("fonts/Raleway-Bold.ttf") format("truetype"); }
@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url("fonts/Lato-Regular.ttf") format("truetype"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url("fonts/Lato-Bold.ttf") format("truetype"); }

:root {
  --coral: #EF7156;        /* buttons */
  --coral-dark: #CE5F2F;   /* pressed */
  --coral-soft: #FDEAE5;
  --indigo: #322A7D;       /* links */
  --ink: #354052;          /* text */
  --grey: #56657A;         /* secondary text (app grey #7F8FA4, darkened for 4.5:1 on the page) */
  --line: #DFDFDF;
  --background: #EEEEEE;
  --card: #FFFFFF;
  --density: #1E8A4C;
  --temperature: #CD3E4E;

  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(48px, 6vw, 88px);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--background); color: var(--ink);
  font: 400 17px/1.6 "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-underline-offset: 3px; }
h1, h2, h3 { font-family: "Raleway", "Lato", sans-serif; font-weight: 700; margin: 0; color: var(--ink); }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header: logo + wordmark, links, one pill. Like the app's home header. */
.header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--background) 92%, transparent);
          backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
         font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; }
.nav a:hover { color: var(--indigo); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px; border-radius: 999px;
        background: var(--coral-soft); color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap; }
@media (max-width: 760px) { .nav { display: none; } .header .chip { margin-left: auto; } }

/* Buttons: the app's PrimaryButtonStyle and SecondaryButtonStyle. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px;
          border-radius: 18px; font: 700 18px/1 "Lato", sans-serif; text-decoration: none; }
.button.primary { background: var(--coral); color: #FFFFFF; }
.button.primary:hover, .button.primary:active { background: var(--coral-dark); }
.button.secondary { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--coral); }
.button.secondary:hover { background: var(--coral-soft); }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 var(--section); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.08; letter-spacing: -0.02em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; margin: 20px 0 28px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { color: var(--grey); font-size: 15px; margin: 14px 0 0; }

.phones { position: relative; display: flex; justify-content: center; min-height: 300px; }
.phone { width: min(300px, 62%); border-radius: 40px; overflow: hidden; background: var(--card);
         box-shadow: 0 0 0 8px #1D2430, 0 40px 70px -30px rgba(53, 64, 82, 0.55); }
.phone.back { position: absolute; right: 0; top: 56px; width: min(250px, 50%); transform: rotate(5deg); opacity: 0.98; }
.phone.front { position: relative; z-index: 1; margin-right: 22%; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { margin-top: 8px; }
  .phone.back { display: none; }
  .phone.front { margin-right: 0; width: min(300px, 78%); }
}

/* Sections */
.section { padding: var(--section) 0; }
.section h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -0.01em; }
.section .intro { max-width: 40em; margin: 14px 0 32px; font-size: 19px; }
.white { background: var(--card); }

/* What it does: white cards, like the app's cards. */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.facts li { background: var(--card); border-radius: var(--radius); padding: 22px 22px 24px; }
.facts h3 { font-size: 20px; margin: 0 0 6px; }
.facts p { margin: 0; color: var(--grey); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 2px; }
.dot.green { background: var(--density); } .dot.red { background: var(--temperature); } .dot.coral { background: var(--coral); }
@media (max-width: 960px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr; } }

/* How it works: one paragraph, each step a bold phrase. */
.how .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.steps { font-size: clamp(21px, 2.2vw, 28px); line-height: 1.45; color: var(--grey); margin: 20px 0 0; }
.steps strong { color: var(--ink); font-weight: 700; }
.how .phone { margin: 0 auto; width: min(280px, 70%); }
@media (max-width: 900px) { .how .wrap { grid-template-columns: 1fr; } }

/* Questions */
.faq { max-width: 800px; margin: 0 auto; }
.faq h2 { text-align: center; margin-bottom: 28px; }
.faq details { background: var(--card); border-radius: 18px; margin: 0 0 10px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
               padding: 18px 0; font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--coral); font-size: 26px; line-height: 1; font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--grey); }

/* Footer */
.footer { padding: 28px 0 36px; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer .brand { font-size: 17px; }
.footer .brand img { width: 28px; height: 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.footer a { color: var(--ink); font-size: 15px; }
.footer small { color: var(--grey); font-size: 14px; width: 100%; }

/* Legal pages: one white card per page, readable column. */
.legal { padding: clamp(28px, 5vw, 56px) 0 var(--section); }
.legal .wrap { max-width: 820px; }
.legal article { background: var(--card); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); }
.legal h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.15; margin: 0 0 6px; }
.legal .version { color: var(--grey); margin: 0 0 28px; }
.legal h2 { font-size: 21px; margin: 32px 0 8px; }
.legal h3 { font-size: 18px; margin: 18px 0 6px; }
.legal p, .legal li { margin: 0 0 10px; }
.legal ul { padding-left: 22px; margin: 0 0 10px; }
.legal dl { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 8px 20px; margin: 0 0 12px; }
.legal dt { font-weight: 700; }
.legal dd { margin: 0; }
@media (max-width: 600px) { .legal dl { grid-template-columns: 1fr; gap: 2px; } .legal dd { margin-bottom: 10px; } }
.legal .card { background: var(--background); border-radius: 16px; padding: 16px 18px; margin: 0 0 12px; }
.legal .card h3 { margin-top: 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 16px; }
.legal th, .legal td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--grey); }
.legal .table { overflow-x: auto; }
.todo { background: var(--coral-soft); border-radius: 6px; padding: 0 6px; font-weight: 700; }
.lang-switch { display: flex; gap: 16px; margin: 0 0 24px; font-weight: 700; }
hr.split { border: 0; border-top: 1px solid var(--line); margin: 44px 0 8px; }

/* Sticker page (/cuve/...) and 404 */
.center { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: var(--section) 0; }
.center .card { background: var(--card); border-radius: var(--radius); padding: clamp(24px, 5vw, 44px); max-width: 520px; }
.center h1 { font-size: clamp(28px, 4vw, 36px); margin: 0 0 12px; }
.center p { margin: 0 0 22px; }
.center [hidden] { display: none; }
