  /* ============================================================
     THEME TOKENS
     ============================================================ */
  :root {
    --bg: #0b0d12;
    --bg-2: #10131a;
    --surface: #151922;
    --surface-2: #1c212c;
    --line: #2a303d;
    --text: #eef1f6;
    --muted: #a9b1c1;
    --faint: #78819a;
    --wine: #c92f55;
    --wine-2: #e23a5f;
    --crimson: #e23a5f;
    --wine-glow: rgba(226, 58, 95, .35);
    --gold: #e6c47e;
    --gold-soft: rgba(230, 196, 126, .14);
    --radius: 14px;
    --max: 1160px;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* ----------------------------------------------------------
       HERO BACKGROUND IMAGE PLACEHOLDER ("herobg")
       When you have generated the image, save it next to this
       file (e.g. herobg.jpg) and replace `none` with:
         url("herobg.jpg")
       The dark gradient overlay in .hero::before keeps text readable.
       ---------------------------------------------------------- */
    --hero-bg-image: none;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  img, svg { display: block; }
  a { color: var(--gold); text-decoration: none; }
  a:hover { text-decoration: underline; }
  h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
  h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
  h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
  h3 { font-size: 1.3rem; }
  p { margin: 0 0 1em; }
  .container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
  .eyebrow {
    display: inline-block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 14px;
  }
  .lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
  .center { text-align: center; }
  .center .lead { margin-left: auto; margin-right: auto; }

  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: .98rem; font-weight: 600; cursor: pointer;
    padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
    transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
    text-decoration: none !important; white-space: nowrap;
  }
  .btn:active { transform: translateY(1px); }
  .btn-primary { background: var(--wine-2); color: #fff; box-shadow: 0 8px 24px var(--wine-glow); }
  .btn-primary:hover { background: #c33357; }
  .btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
  .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
  .btn-block { width: 100%; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

  /* ============================================================
     HEADER
     ============================================================ */
  header.site {
    position: sticky; top: 0; z-index: 50;
    background: rgba(15, 10, 12, .82);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(58, 42, 49, .6);
  }
  .nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
  .brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
  .brand:hover { text-decoration: none; }
  .tld { color: var(--crimson); }
  .brand .tld { color: var(--crimson); }
  .brand svg { width: 30px; height: 30px; }
  .nav-links { display: flex; gap: 28px; }
  .nav-links a { color: var(--muted); font-size: .95rem; }
  .nav-links a:hover { color: var(--text); text-decoration: none; }
  .nav-actions { display: flex; gap: 10px; }
  .nav-actions .btn { padding: 9px 18px; font-size: .92rem; }
  @media (max-width: 860px) { .nav-links { display: none; } }
  @media (max-width: 420px) { .nav-actions .btn-ghost { display: none; } }

  /* ============================================================
     HERO
     ============================================================ */
  .hero {
    position: relative; overflow: hidden;
    padding: 110px 0 120px;
    background-color: var(--bg);
    background-image: var(--hero-bg-image);
    background-size: cover; background-position: center;
  }
  .hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
      radial-gradient(900px 500px at 78% 30%, rgba(142, 31, 58, .35), transparent 60%),
      radial-gradient(600px 400px at 10% 90%, rgba(230, 196, 126, .08), transparent 60%),
      linear-gradient(90deg, rgba(15,10,12,.96) 0%, rgba(15,10,12,.82) 45%, rgba(15,10,12,.55) 100%);
  }
  .hero .container { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
  .hero h1 em { font-style: italic; color: var(--gold); }
  .hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
  .hero-note { font-size: .9rem; color: var(--faint); }
  .hero-art { position: relative; justify-self: center; width: 100%; max-width: 420px; }
  .hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,.6)); }
  @media (max-width: 860px) {
    .hero { padding: 64px 0 80px; }
    .hero .container { grid-template-columns: 1fr; }
    .hero-art { max-width: 300px; order: -1; }
  }

  /* ============================================================
     SECTIONS
     ============================================================ */
  section { padding: 100px 0; }
  section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .section-head { margin-bottom: 56px; }
  @media (max-width: 640px) { section { padding: 72px 0; } }

  /* Idea / steps */
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
  .step { position: relative; padding: 32px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .step::before {
    counter-increment: step; content: "0" counter(step);
    position: absolute; top: 22px; right: 26px; font-family: var(--serif); font-size: 2.2rem; color: var(--line);
  }
  .step .icon { width: 48px; height: 48px; margin-bottom: 18px; color: var(--gold); }
  .step p { color: var(--muted); margin: 0; }
  @media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

  /* Features */
  .features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .feature { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
  .feature .icon { width: 40px; height: 40px; color: var(--wine-2); margin-bottom: 14px; }
  .feature h3 { font-size: 1.15rem; }
  .feature p { color: var(--muted); font-size: .96rem; margin: 0; }
  .ai-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--gold); background: var(--gold-soft); border-radius: 999px; vertical-align: middle; }
  @media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

  /* Cellar preview */
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .split > *, .scan-wrap > *, .hero .container > * { min-width: 0; }
  .checklist { list-style: none; padding: 0; margin: 24px 0 0; }
  .checklist li { display: flex; gap: 12px; margin-bottom: 14px; color: var(--muted); }
  .checklist svg { flex: none; width: 22px; height: 22px; color: var(--gold); margin-top: 3px; }
  .checklist strong { color: var(--text); font-weight: 600; }
  .mock {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
  }
  .mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
  .mock-top b { font-family: var(--serif); font-size: 1.1rem; }
  .mock-top span { font-size: .8rem; color: var(--faint); }
  .rack { background: var(--bg); border-radius: 12px; border: 1px solid var(--line); margin-bottom: 16px; overflow: hidden; }
  .rack svg, .rack img { display: block; width: 100%; height: auto; }
  .slot { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); background: radial-gradient(circle at 35% 35%, #2a1f24, #120c0f); }
  .slot.red { background: radial-gradient(circle at 35% 35%, #c2405f, #5c0f22); border-color: #7a1a31; }
  .slot.white { background: radial-gradient(circle at 35% 35%, #f0dc9e, #8c7230); border-color: #8c7230; }
  .slot.rose { background: radial-gradient(circle at 35% 35%, #f2a7a9, #8e4a52); border-color: #8e4a52; }
  .slot.hl { box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(230, 196, 126, .5); }
  .row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); font-size: .9rem; }
  .row .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .row .meta { color: var(--faint); font-size: .8rem; white-space: nowrap; }
  .pill { font-size: .72rem; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
  .pill.ready { background: rgba(120, 180, 120, .15); color: #9fd39f; }
  .pill.wait { background: var(--gold-soft); color: var(--gold); }
  .pill.soon { background: rgba(226, 58, 95, .18); color: #e88aa1; }
  @media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } }

  /* Scan section */
  .scan-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
  .scan-art { max-width: 380px; width: 100%; justify-self: center; }
  .scan-art svg { width: 100%; height: auto; }
  .scan-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
  .scan-fields div { padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
  .scan-fields small { display: block; font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
  .scan-fields span { font-size: .95rem; }
  @media (max-width: 860px) { .scan-wrap { grid-template-columns: 1fr; } }
  @keyframes scanline { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(150px); } }
  .scanline { animation: scanline 3.2s ease-in-out infinite; }
  @media (prefers-reduced-motion: reduce) { .scanline { animation: none; } html { scroll-behavior: auto; } }

  /* Pricing */
  .pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 920px; margin: 0 auto; }
  .plan { padding: 36px 32px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
  .plan.main { border-color: var(--wine-2); background: linear-gradient(180deg, rgba(226,58,95,.22), var(--surface) 55%); box-shadow: 0 20px 60px rgba(226,58,95,.18); }
  .plan .label { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
  .price { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; }
  .price b { font-family: var(--serif); font-size: 3.4rem; font-weight: 600; line-height: 1; }
  .price span { color: var(--muted); }
  .price-sub { color: var(--faint); font-size: .9rem; margin-bottom: 22px; }
  .plan ul { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
  .plan li { display: flex; gap: 10px; padding: 7px 0; color: var(--muted); font-size: .96rem; }
  .plan li svg { flex: none; width: 18px; height: 18px; margin-top: 4px; color: var(--gold); }
  .ai-table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: .95rem; }
  .ai-table td { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
  .ai-table td:last-child { text-align: right; color: var(--text); font-weight: 600; white-space: nowrap; padding-left: 12px; }
  .ai-table tr:last-child td { border-bottom: 0; }
  .fine { font-size: .82rem; color: var(--faint); text-align: center; margin-top: 28px; }
  @media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }

  /* FAQ */
  .faq { max-width: 760px; margin: 0 auto; }
  .faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
  .faq summary { cursor: pointer; list-style: none; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
  .faq details[open] summary::after { transform: rotate(45deg); }
  .faq details p { color: var(--muted); margin: 12px 0 0; }

  /* CTA band */
  .cta-band { text-align: center; padding: 90px 0; background: radial-gradient(700px 300px at 50% 100%, rgba(226,58,95,.35), transparent 70%), var(--bg); }
  .cta-band .btn { margin-top: 10px; }

  /* Footer */
  footer.site { border-top: 1px solid var(--line); padding: 36px 0; color: var(--faint); font-size: .88rem; }
  footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
  footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
  footer nav a { color: var(--faint); }

  /* ============================================================
     DIALOGS (sign in / register)
     ============================================================ */
  dialog {
    width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 18px;
    background: var(--surface); color: var(--text); box-shadow: 0 40px 100px rgba(0,0,0,.7);
  }
  dialog::backdrop { background: rgba(8, 5, 6, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
  dialog[open] { animation: pop .18s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
  .dlg { padding: 34px 32px 28px; position: relative; }
  .dlg-close {
    position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
    border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
  }
  .dlg-close:hover { background: var(--surface-2); color: var(--text); }
  .dlg-head { text-align: center; margin-bottom: 24px; }
  .dlg-head svg { width: 40px; height: 40px; margin: 0 auto 12px; }
  .dlg-head h2 { font-size: 1.7rem; margin-bottom: 4px; }
  .dlg-head p { color: var(--muted); font-size: .95rem; margin: 0; }
  .field { margin-bottom: 16px; }
  .field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
  .field input {
    width: 100%; font: inherit; font-size: 1rem; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
  }
  .field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
  .field-row { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; margin: -4px 0 20px; color: var(--muted); }
  .check { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
  .check input { accent-color: var(--wine-2); margin-top: 4px; }
  .dlg-switch { text-align: center; font-size: .9rem; color: var(--muted); margin: 18px 0 0; }
  .linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--gold); cursor: pointer; }
  .linkish:hover { text-decoration: underline; }
  .form-msg { display: none; margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: .88rem; background: var(--gold-soft); color: var(--gold); text-align: center; }
  .form-msg.show { display: block; }

/* ============================================================
   ADDED FOR THE SERVER VERSION
   ============================================================ */
.lang-dd { position: relative; margin-right: 6px; }
.lang-dd summary { list-style: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); cursor: pointer; }
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary:hover, .lang-dd[open] summary { color: var(--text); background: var(--surface); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 140px; padding: 6px; background: var(--bg-2, #151922); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); z-index: 60; display: grid; }
.lang-menu a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: .9rem; }
.lang-menu a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.lang-menu a[aria-current] { color: var(--gold); font-weight: 700; }

  /* round 2: code step, forgot password, legal pages */
  .form-msg.ok { background: rgba(120, 180, 120, .15); color: var(--ok); }
  .code-input { text-align: center; font-size: 1.6rem !important; letter-spacing: .5em; padding-left: .5em !important; font-variant-numeric: tabular-nums; }
  .dlg-forgot { text-align: right; font-size: .85rem; margin: -6px 0 14px; }
  .dlg-head p b { color: var(--text); overflow-wrap: anywhere; }
  .legal { max-width: 760px; margin: 0 auto; padding: 56px 20px 40px; }
  .legal h1 { margin-bottom: .2em; }
  .legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
  .legal p, .legal li { color: var(--muted); }
  .legal ul { padding-left: 1.2em; }
  .legal .upd { color: var(--faint); font-size: .85rem; }
  .inline-form { display: inline; margin: 0; }
