:root {
    --bg: #F6F2E8;
    --bg-panel: #FBF8F1;
    --ink: #396020;
    --ink-soft: #5A5346;
    --green: #4B5A40;
    --gold: #A9824C;
    --rose: #8B5A4A;
    --line: #D4C9AD;
    --shadow: rgba(43,38,32,0.08);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #211E19;
      --bg-panel: #29251F;
      --ink: #EFE9DC;
      --ink-soft: #C4BAA5;
      --green: #92A67F;
      --gold: #CBA765;
      --rose: #C08B77;
      --line: #4A4436;
      --shadow: rgba(0,0,0,0.35);
    }
  }
  :root[data-theme="dark"] {
    --bg: #211E19;
    --bg-panel: #29251F;
    --ink: #EFE9DC;
    --ink-soft: #C4BAA5;
    --green: #92A67F;
    --gold: #CBA765;
    --rose: #C08B77;
    --line: #4A4436;
    --shadow: rgba(0,0,0,0.35);
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
  }

  .wrap { max-width: 640px; margin: 0 auto; padding: 0 28px; }

  h1, h2, .display {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    color: var(--ink);
    margin: 0;
  }

  /* ---------- Ornament ---------- */
  .sprig {
    width: 64px;
    height: 40px;
    margin: 0 auto;
    display: block;
  }
  .sprig path, .sprig ellipse {
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.1;
  }

  /* ---------- Hero ---------- */
  .hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    position: relative;
  }
  .hero .eyebrow {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--ink-soft);
    margin-bottom: 18px;
    opacity: 0;
    animation: rise 1s ease-out 0.1s forwards;
  }
  .hero h1 {
    font-size: clamp(3rem, 12vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: 0.01em;
    opacity: 0;
    animation: rise 1.1s ease-out 0.35s forwards;
  }
  .hero .amp {
    display: block;
    font-size: 0.5em;
    color: var(--gold);
    margin: 6px 0;
  }
  .hero .date {
    margin-top: 26px;
    font-size: 1.05rem;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    opacity: 0;
    animation: rise 1s ease-out 0.6s forwards;
  }
  .hero .place {
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--ink-soft);
    opacity: 0;
    animation: rise 1s ease-out 0.75s forwards;
  }
  .hero .sprig { margin-top: 34px; opacity: 0; animation: rise 1s ease-out 0.9s forwards; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ---------- Countdown ---------- */
  .countdown {
    display: flex;
    justify-content: center;
    gap: clamp(18px, 6vw, 44px);
    margin-top: 40px;
    opacity: 0;
    animation: rise 1s ease-out 1.05s forwards;
  }
  .countdown .unit { text-align: center; }
  .countdown .num {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    color: var(--green);
    display: block;
  }
  .countdown .label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
  }

  /* ---------- Sections ---------- */
  section { padding: 96px 0; }
  .divider {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 28px;
  }
  .divider .rule { flex: 1; height: 1px; background: var(--line); }

  .kicker {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--rose);
    text-align: center;
    margin-bottom: 10px;
  }
  h2.title {
    font-size: clamp(2rem, 6vw, 2.7rem);
    text-align: center;
    margin-bottom: 34px;
  }
  p { color: var(--ink-soft); font-size: 1.02rem; }
  .lede {
    text-align: center;
    max-width: 46ch;
    margin: 0 auto;
    font-size: 1.08rem;
  }

  /* ---------- Event cards ---------- */
  .events {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 44px;
  }
  @media (max-width: 620px) {
    .events { grid-template-columns: 1fr; }
  }
  .event-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    padding: 34px 26px;
    text-align: center;
  }
  .event-card .kind {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--rose);
    font-size: 1rem;
    margin-bottom: 6px;
  }
  .event-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.5rem;
    margin: 0 0 10px;
    color: var(--ink);
  }
  .event-card .time {
    font-size: 0.95rem;
    color: var(--green);
    margin-bottom: 14px;
  }
  .event-card .addr {
    font-size: 0.92rem;
    color: var(--ink-soft);
    margin-bottom: 18px;
  }
  .event-card a.map {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 2px;
  }
  .event-card a.map:hover { color: var(--rose); border-color: var(--rose); }

  /* ---------- Dress code ---------- */
  .swatches {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 30px 0 8px;
  }
  .swatch {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
  }
  .swatches .swatch:nth-child(1) { background: #F6F2E8; }
  .swatches .swatch:nth-child(2) { background: #D9CBA3; }
  .swatches .swatch:nth-child(3) { background: #8B5A4A; }
  .swatches .swatch:nth-child(4) { background: #4B5A40; }
  .swatches .swatch:nth-child(5) { background: #2B2620; }

  /* ---------- RSVP ---------- */
  .rsvp-panel {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    padding: 44px 30px;
    max-width: 460px;
    margin: 44px auto 0;
  }
  .field { margin-bottom: 20px; }
  .field label {
    display: block;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
    margin-bottom: 7px;
  }
  .field input[type="text"],
  .field input[type="number"],
  .field textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    padding: 8px 2px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    color: var(--ink);
  }
  .field input:focus, .field textarea:focus {
    outline: none;
    border-bottom-color: var(--gold);
  }
  .field textarea { resize: vertical; min-height: 60px; }
  .radio-row { display: flex; gap: 22px; margin-top: 6px; }
  .radio-row label {
    display: flex; align-items: center; gap: 7px;
    font-size: 0.95rem; color: var(--ink); cursor: pointer;
  }
  .submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--green);
    color: var(--bg-panel);
    border: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
  }
  .submit-btn:hover { background: var(--rose); }
  .submit-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .confirm-msg {
    display: none;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--green);
    margin-top: 18px;
  }
  .confirm-msg.show { display: block; }
  .confirm-msg.error { color: var(--rose); }

  /* ---------- Footer ---------- */
  footer {
    text-align: center;
    padding: 70px 24px 50px;
    color: var(--ink-soft);
    font-size: 0.9rem;
  }
  footer .names {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--ink);
    margin-bottom: 8px;
  }

  @media (prefers-reduced-motion: reduce) {
    .hero .eyebrow, .hero h1, .hero .date, .hero .place, .hero .sprig, .countdown {
      animation: none !important; opacity: 1 !important; transform: none !important;
    }
  }
