:root {
  --navy-950: #050b1a;
  --navy-900: #0a1428;
  --navy-800: #0f1f3d;
  --navy-700: #16305c;
  --navy-500: #2c4f8f;
  --steel: #8296bd;
  --silver: #c9d3e3;
  --silver-2: #e6ebf3;
  --ink: #dfe6f1;
  --muted: #9fb0cc;
  --line: rgba(201, 211, 227, 0.2);
  --radius: 14px;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --prata: linear-gradient(180deg, #f4f7fb 0%, #c3cee2 55%, #8ea0c4 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  color: #1b2a4a;
  background: linear-gradient(180deg, #f5eee2, #ece0cd);
  line-height: 1.65;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid #9db8ff; outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(960px, 100% - 32px); margin-inline: auto; position: relative; z-index: 1; }

/* Faixa de rascunho */
.draft-bar {
  background: var(--navy-700);
  color: var(--silver);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: center;
  padding: 6px 12px;
}
.draft-bar code { color: #fff; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  padding: 80px 16px 96px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(44, 79, 143, 0.55), transparent 60%),
    radial-gradient(ellipse at 90% 90%, rgba(130, 150, 189, 0.18), transparent 50%),
    linear-gradient(180deg, var(--navy-800), var(--navy-950));
}
.hero.full { min-height: calc(100vh - 32px); display: grid; align-content: center; }

.hero-ball {
  position: absolute; top: 0; right: 7%;
  width: clamp(96px, 20vw, 190px);
  filter: drop-shadow(0 0 30px rgba(201, 211, 227, 0.25));
  transform-origin: 50% 0;
  animation: balanca 7s ease-in-out infinite;
}
.hero-vinyl {
  position: absolute; left: -16%; bottom: -26%;
  width: min(560px, 100vw);
  opacity: 0.95;
  pointer-events: none;
}
.hero-ball svg, .hero-vinyl svg { display: block; width: 100%; height: auto; }
.gira { transform-origin: 200px 200px; animation: gira 28s linear infinite; }
.brilho { animation: brilha 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes balanca { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes brilha { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }

.hero .eyebrow {
  letter-spacing: 0.34em; text-transform: uppercase;
  font-size: 12px; font-weight: 400; color: var(--silver); margin: 0 0 8px;
}
.hero .num {
  font-family: var(--serif);
  font-size: clamp(150px, 34vw, 270px);
  font-weight: 300;
  font-variant-numeric: lining-nums;
  line-height: 1;
  padding-bottom: 0.06em;
  margin: 0;
  background: var(--prata);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .name {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(34px, 7vw, 54px); letter-spacing: 0.06em; margin-top: -0.4em; color: #fff;
}
.hero .lead { margin: 20px auto 0; max-width: 36ch; color: #dfe6f1; }
.hero h1 { font-size: clamp(32px, 6vw, 46px); }

/* Botões */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font: 400 13px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  padding: 16px 30px; border-radius: 999px;
  background: var(--prata); color: var(--navy-900); text-decoration: none;
  box-shadow: 0 6px 22px rgba(130, 150, 189, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(157, 184, 255, 0.35); }
.btn.ghost {
  background: transparent; color: var(--silver);
  border: 1px solid rgba(201, 211, 227, 0.5); box-shadow: none;
}
.btn.ghost:hover { background: rgba(201, 211, 227, 0.12); border-color: var(--silver); }
.btn.small { padding: 11px 20px; font-size: 12px; }

/* Contagem regressiva */
.countdown { display: flex; justify-content: center; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.countdown div {
  background: rgba(10, 20, 40, 0.55);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; min-width: 76px;
  backdrop-filter: blur(4px);
}
.countdown b { display: block; font: 300 34px/1.1 var(--serif); font-variant-numeric: lining-nums; color: #fff; }
.countdown span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.2em; }

/* Seções */
section.block { padding: 72px 0 8px; }
.orn { width: 56px; margin: 0 auto 16px; color: var(--silver); opacity: 0.9; }
.orn svg { display: block; width: 100%; height: auto; }
.section-title { font-size: clamp(34px, 6vw, 46px); font-weight: 300; text-align: center; letter-spacing: 0.02em; }
.section-sub { text-align: center; color: var(--muted); margin: 10px auto 34px; max-width: 46ch; }

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card {
  background: linear-gradient(180deg, rgba(22, 48, 92, 0.5), rgba(15, 31, 61, 0.5));
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.ico {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(201, 211, 227, 0.35); color: var(--silver);
}
.ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 24px; margin: 14px 0 4px; color: #fff; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .value { color: var(--ink); font-weight: 400; }

/* Data, horário e local: letra maior */
#detalhes .cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
#detalhes .card h3 { font-size: 29px; }
#detalhes .card p { font-size: 18px; }
#detalhes .card .value { font-size: 21px; }

/* Dress code: espaço da imagem de referência */
.dress-figura {
  margin: 0 auto; max-width: 400px; aspect-ratio: 4 / 5;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  padding: 24px; text-align: center;
  border: 1px dashed rgba(22, 48, 92, 0.35); border-radius: 18px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--muted); font-size: 14px; letter-spacing: 0.04em;
}
.dress-figura .dress-icone { width: 64px; color: var(--silver); }
.dress-figura .dress-icone svg { display: block; width: 100%; height: auto; }
.dress-figura img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.dress-figura:has(img) { padding: 0; border-style: solid; overflow: hidden; }

/* Karaokê: faixa azul-marinho no meio do bege */
section.block.escuro {
  --ink: #dfe6f1;
  --muted: #9fb0cc;
  --line: rgba(201, 211, 227, 0.2);
  --silver: #c9d3e3;
  margin-top: 72px;
  padding: 72px 0;
  color: #fff;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(44, 79, 143, 0.5), transparent 65%),
    linear-gradient(180deg, var(--navy-800), var(--navy-950));
}
section.block.escuro .section-title { color: #fff; }
section.block.escuro .section-sub { margin-bottom: 0; }
section.block.escuro :focus-visible { outline-color: #9db8ff; }

.equalizador { display: flex; justify-content: center; align-items: flex-end; gap: 7px; height: 46px; margin-top: 30px; }
.equalizador span {
  width: 3px; height: 100%; border-radius: 2px;
  background: linear-gradient(180deg, #f4f7fb, #8ea0c4);
  transform-origin: bottom; transform: scaleY(0.25);
  animation: eq 1.2s ease-in-out infinite;
}
.equalizador span:nth-child(3n + 1) { animation-duration: 1.1s; animation-delay: -0.3s; }
.equalizador span:nth-child(3n + 2) { animation-duration: 0.8s; animation-delay: -0.6s; }
.equalizador span:nth-child(3n) { animation-duration: 1.4s; animation-delay: -0.1s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(1); } }

.gift .top { display: flex; align-items: center; gap: 14px; }
.gift .top h3 { margin: 0; font-size: 21px; }
.gift .tag {
  display: inline-block; margin-top: 14px; font-size: 12px; letter-spacing: 0.06em;
  border: 1px solid var(--line); color: var(--silver); padding: 3px 12px; border-radius: 999px;
}
.gift .btn { margin-top: 16px; }

/* Formulário RSVP */
.rsvp {
  background: linear-gradient(180deg, rgba(22, 48, 92, 0.5), rgba(15, 31, 61, 0.5));
  border: 1px solid var(--line);
  border-radius: 20px; padding: clamp(22px, 5vw, 40px);
  max-width: 560px; margin: 0 auto;
}
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend, label.lbl {
  font-weight: 400; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--silver); margin-bottom: 10px; display: block; padding: 0;
}
.choices { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; text-align: center; padding: 14px 10px; cursor: pointer;
  border: 1px solid rgba(201, 211, 227, 0.35); border-radius: 12px; font-weight: 400;
  transition: all 0.15s ease;
}
.choice span:hover { border-color: var(--silver); }
.choice input:checked + span { background: var(--prata); color: var(--navy-900); border-color: transparent; }
.choice input:focus-visible + span { outline: 2px solid #9db8ff; outline-offset: 2px; }
select, textarea {
  width: 100%; font: inherit; font-weight: 300; padding: 12px 14px;
  border: 1px solid rgba(201, 211, 227, 0.35); border-radius: 12px;
  background: rgba(5, 11, 26, 0.6); color: #fff;
}
select option { background: var(--navy-800); color: #fff; }
textarea { min-height: 96px; resize: vertical; }
textarea::placeholder { color: var(--muted); }
.rsvp .btn { width: 100%; margin-top: 4px; }
.notice { font-size: 13px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.notice.err-envio { color: #ffb9b0; margin-top: 12px; }
.notice.err-envio:empty { display: none; }
.thanks { text-align: center; }
.thanks .big { width: 60px; margin: 0 auto; color: var(--silver); }
.thanks .big svg { width: 100%; height: auto; display: block; }
.thanks h3 { font-size: 32px; font-weight: 300; margin: 12px 0 6px; color: #fff; }
.thanks p { color: var(--muted); margin: 0 0 20px; }
[hidden] { display: none !important; }

/* Página pública */
.gate { max-width: 440px; margin: 40px auto 0; }
.gate form { display: flex; gap: 8px; }
.gate input[type="text"] {
  flex: 1; min-width: 0; font: inherit; font-weight: 300; padding: 12px 18px;
  border: 1px solid rgba(201, 211, 227, 0.4); border-radius: 999px;
  background: rgba(5, 11, 26, 0.55); color: #fff;
}
.gate input::placeholder { color: var(--muted); }
.gate .btn { padding: 14px 24px; }
.gate .err { color: #ffb9b0; font-size: 14px; min-height: 1.4em; margin-top: 10px; }
.gate small { display: block; color: var(--muted); margin-top: 14px; }

footer { text-align: center; color: var(--muted); font-size: 14px; padding: 64px 16px 44px; }
footer b { font-family: var(--serif); font-weight: 400; color: var(--silver); font-size: 22px; letter-spacing: 0.06em; }

/* Seções claras (fundo bege). O topo (hero) continua azul-marinho. */
.block, footer {
  --ink: #1b2a4a;
  --muted: #5a6683;
  --line: rgba(22, 48, 92, 0.16);
  --silver: #2c4f8f;
}
.block :focus-visible, footer :focus-visible { outline-color: var(--navy-500); }
.section-title { color: var(--navy-800); }
.card, .rsvp {
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--line);
  box-shadow: 0 8px 28px rgba(22, 48, 92, 0.07);
}
.card h3, .thanks h3 { color: var(--navy-800); }
.block .btn:not(.ghost) {
  background: linear-gradient(180deg, var(--navy-700), var(--navy-900));
  color: var(--silver-2);
  box-shadow: 0 6px 20px rgba(15, 31, 61, 0.25);
}
.block .btn.ghost { color: var(--navy-700); border-color: rgba(22, 48, 92, 0.45); }
.block .btn.ghost:hover { background: rgba(22, 48, 92, 0.08); border-color: var(--navy-700); }
.ico { border-color: rgba(22, 48, 92, 0.3); }
.gift .tag { background: rgba(22, 48, 92, 0.05); color: var(--navy-700); }
.choice span { border-color: rgba(22, 48, 92, 0.3); }
.choice span:hover { border-color: var(--navy-700); }
.choice input:checked + span { background: linear-gradient(180deg, var(--navy-700), var(--navy-900)); color: #fff; border-color: transparent; }
.choice input:focus-visible + span { outline-color: var(--navy-500); }
select, textarea { background: #fff; color: var(--navy-900); border-color: rgba(22, 48, 92, 0.3); }
select option { background: #fff; color: var(--navy-900); }
textarea::placeholder { color: #7c86a0; }
.notice.err-envio { color: #a3341f; }
.thanks .big { color: var(--navy-700); }
footer b { color: var(--navy-800); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-ball, .gira, .brilho { animation: none; }
  .equalizador span { animation: none; transform: scaleY(0.6); }
  .brilho { opacity: 0.8; }
  .btn, .choice span { transition: none; }
}
