/* =============================================================
   CONVITE 15 ANOS — STYLE.CSS
   Variáveis, reset, tipografia base e componentes de layout.
   Animações ficam em animations.css / breakpoints em responsive.css
============================================================= */

/* =========================================================
   1. VARIÁVEIS GLOBAIS (DESIGN TOKENS)
========================================================= */
:root {
  /* Cores */
  --primary: #d88ba0;        /* rosa principal — flores, destaques */
  --primary-dark: #b96a82;   /* rosa mais escuro — hover / contraste */
  --secondary: #f7e1e8;      /* rosa claro — fundos alternados */
  --accent: #c9a86a;         /* dourado — bordas, divisores, ícones */
  --background: #fffaf8;     /* fundo geral off-white */
  --white: #ffffff;
  --text: #4a3b3f;           /* marrom escuro — leitura */
  --text-light: #8a7377;     /* marrom acinzentado — textos secundários */

  /* Tipografia */
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', 'Playfair Display', serif;

  /* Espaçamento (escala baseada em 8px) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Sombra e bordas */
  --shadow-soft: 0 10px 30px rgba(184, 106, 130, 0.15);
  --shadow-strong: 0 15px 40px rgba(74, 59, 63, 0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-round: 999px;

  /* Timing de transição (reutilizado no JS) */
  --ease-default: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration-fast: 0.3s;
  --duration-base: 0.6s;
  --duration-slow: 1.2s;
}

/* =========================================================
   2. RESET / BASE
========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* Foco visível para navegação por teclado */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   3. TIPOGRAFIA
========================================================= */
h1, h2, h3 {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--primary-dark);
  line-height: 1.2;
}

.opening__title,
.hero__title {
  font-size: clamp(2.8rem, 8vw, 5rem);
}

.message__title,
.countdown__title,
.timeline__title,
.details__title,
.location__title,
.rsvp__title {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  text-align: center;
}

.opening__eyebrow,
.hero__eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

p {
  font-size: 1.1rem;
  color: var(--text);
}

/* =========================================================
   4. BOTÕES
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.9rem 2.4rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-round);
  transition: transform var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default),
              background-color var(--duration-fast) var(--ease-default);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px) scale(1.02);
}

.btn--outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn--outline:hover {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.btn--filled {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.btn--filled:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-strong);
}

/* =========================================================
   5. ÍCONES (SVG inline via mask, cor controlada por background)
========================================================= */
[class^="icon-"],
[class*=" icon-"] {
  display: inline-block;
  width: 1.4rem;
  height: 1.4rem;
  background-color: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.icon-butterfly {
  color: var(--primary);
  width: 2.2rem;
  height: 2.2rem;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path d='M32 20c-4-10-16-16-24-12-6 3-6 14 2 20 6 4.5 16 4 22-2zm0 0c4-10 16-16 24-12 6 3 6 14-2 20-6 4.5-16 4-22-2zm0 4v20M28 32c-4 4-4 12 0 16s10 2 10-4-2-16-10-12zm8 0c4 4 4 12 0 16s-10 2-10-4 2-16 10-12z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path d='M32 20c-4-10-16-16-24-12-6 3-6 14 2 20 6 4.5 16 4 22-2zm0 0c4-10 16-16 24-12 6 3 6 14-2 20-6 4.5-16 4-22-2zm0 4v20M28 32c-4 4-4 12 0 16s10 2 10-4-2-16-10-12zm8 0c4 4 4 12 0 16s-10 2-10-4 2-16 10-12z'/></svg>");
}

.icon-whatsapp {
  width: 1.2rem;
  height: 1.2rem;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2a10 10 0 00-8.6 15L2 22l5.2-1.4A10 10 0 1012 2zm5.7 14.2c-.2.6-1.4 1.2-1.9 1.2-.5.1-1.1.1-1.8-.1-.4-.1-1-.3-1.7-.6-3-1.3-5-4.3-5.1-4.5-.1-.2-1.2-1.6-1.2-3s.8-2.2 1-2.5c.3-.3.6-.4.8-.4h.6c.2 0 .4 0 .6.5.2.6.7 1.9.8 2 .1.2.1.4 0 .6-.1.2-.2.3-.3.5-.2.2-.3.3-.5.5-.2.2-.3.4-.1.7.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.4 1.5.3.1.5.1.6-.1l.9-1c.3-.3.5-.3.8-.2l1.8.9c.3.1.5.2.5.4.1.2.1.9-.1 1.4z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2a10 10 0 00-8.6 15L2 22l5.2-1.4A10 10 0 1012 2zm5.7 14.2c-.2.6-1.4 1.2-1.9 1.2-.5.1-1.1.1-1.8-.1-.4-.1-1-.3-1.7-.6-3-1.3-5-4.3-5.1-4.5-.1-.2-1.2-1.6-1.2-3s.8-2.2 1-2.5c.3-.3.6-.4.8-.4h.6c.2 0 .4 0 .6.5.2.6.7 1.9.8 2 .1.2.1.4 0 .6-.1.2-.2.3-.3.5-.2.2-.3.3-.5.5-.2.2-.3.4-.1.7.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.4 1.5.3.1.5.1.6-.1l.9-1c.3-.3.5-.3.8-.2l1.8.9c.3.1.5.2.5.4.1.2.1.9-.1 1.4z'/></svg>");
}

.icon-sound {
  color: var(--primary-dark);
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 9v6h4l5 5V4L8 9H4zm11.5 3a4.5 4.5 0 00-2.5-4v8a4.5 4.5 0 002.5-4z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 9v6h4l5 5V4L8 9H4zm11.5 3a4.5 4.5 0 00-2.5-4v8a4.5 4.5 0 002.5-4z'/></svg>");
}

.icon-church {
  color: var(--accent);
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2v3m-1.5 0h3v2h3v3h-2v11H6V10H4V7h3V5h3zM11 12h2v6h-2z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2v3m-1.5 0h3v2h3v3h-2v11H6V10H4V7h3V5h3zM11 12h2v6h-2z'/></svg>");
}

.icon-toast {
  color: var(--accent);
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 2l1 9a3 3 0 003 3 3 3 0 003-3l1-9M11 14v8m-3 0h6M18 4l-2 2 2 2 2-2z'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 2l1 9a3 3 0 003 3 3 3 0 003-3l1-9M11 14v8m-3 0h6M18 4l-2 2 2 2 2-2z'/></svg>");
}

.icon-dance {
  color: var(--accent);
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='4' r='2'/><path d='M12 6v6m0 0l-4 8m4-8l4 8m-4-8l-4-2m4 2l4-2'/></svg>");
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='4' r='2'/><path d='M12 6v6m0 0l-4 8m4-8l4 8m-4-8l-4-2m4 2l4-2'/></svg>");
}

/* =========================================================
   6. OPENING (TELA DE ABERTURA)
========================================================= */
.opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--secondary) 0%, var(--background) 60%);
  overflow: hidden;
}

.opening__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(216, 139, 160, 0.25), transparent 55%),
              radial-gradient(circle at 80% 80%, rgba(201, 168, 106, 0.2), transparent 55%);
}

.opening__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-md);
}

.opening__corner {
  position: absolute;
  width: 140px;
  height: 140px;
  z-index: 1;
  opacity: 0.9;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 8rem;
  line-height: 1;
}

.opening__corner--top {
  top: -20px;
  left: -20px;
}

.opening__corner--bottom {
  bottom: -20px;
  right: -20px;
  transform: rotate(180deg); /* reaproveita a mesma ilustração espelhada */
}

.opening__name {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.opening__button {
  margin-top: var(--space-sm);
}

/* =========================================================
   7. HEADER FLUTUANTE
========================================================= */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 250, 248, 0.7);
  backdrop-filter: blur(8px);
  transition: transform var(--duration-base) var(--ease-default);
}

.site-header__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin-inline: auto;
}

.site-header__logo {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--primary);
}

.site-header__sound {
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   8. HERO
========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.hero__divider {
  width: 80px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-md) auto;
}

.hero__date {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--text-light);
}

.hero__portrait-frame {
  position: relative;
  margin-top: var(--space-lg);
  width: min(340px, 80vw);
  aspect-ratio: 400 / 500;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 168, 106, 0.7);
  border-radius: 48% 48% 44% 44%;
  background: radial-gradient(circle, var(--white) 0 45%, var(--secondary) 46% 100%);
  box-shadow: var(--shadow-strong);
}

.hero__monogram {
  font-family: var(--font-script);
  font-size: clamp(3.4rem, 12vw, 5rem);
  color: var(--primary-dark);
}

.hero__flower {
  position: absolute;
  color: var(--primary);
  font-size: 5rem;
  line-height: 1;
}

.hero__flower--one { top: -1rem; left: -1rem; }
.hero__flower--two { right: -1rem; bottom: -1rem; color: var(--accent); }

/* Elementos revelados durante a rolagem. */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-base) var(--ease-default) var(--reveal-delay, 0s),
              transform var(--duration-base) var(--ease-default) var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.opening.is-closing {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-default),
              visibility 0s linear var(--duration-base);
}

body.invite-open {
  overflow-y: auto;
}

.hero__decor {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 139, 160, 0.25), transparent 70%);
  z-index: 1;
}

.hero__decor--top { top: -80px; left: -80px; }
.hero__decor--bottom { bottom: -100px; right: -100px; }

/* =========================================================
   9. MESSAGE (MENSAGEM DO CONVITE)
========================================================= */
.message {
  max-width: 640px;
  margin-inline: auto;
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}

.message__icon {
  margin-bottom: var(--space-sm);
}

.message__text {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-light);
}

/* =========================================================
   10. COUNTDOWN (CONTAGEM REGRESSIVA)
========================================================= */
.countdown {
  background: var(--secondary);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}

.countdown__grid {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.countdown__number {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--primary-dark);
}

.countdown__label {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* =========================================================
   11. TIMELINE / PROGRAMAÇÃO
========================================================= */
.timeline {
  max-width: 560px;
  margin-inline: auto;
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}

.timeline__list {
  margin-top: var(--space-lg);
  position: relative;
}

.timeline__list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 27px;
  width: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.timeline__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  text-align: left;
  padding-bottom: var(--space-lg);
  position: relative;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__icon {
  flex-shrink: 0;
  width: 3.2rem;
  height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--accent);
  border-radius: 50%;
  z-index: 1;
}

.timeline__time {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.timeline__label {
  font-size: 1.6rem;
  color: var(--primary-dark);
}

.timeline__desc {
  color: var(--text-light);
  font-size: 1rem;
}

/* =========================================================
   12. DETAILS (TRAJE)
========================================================= */
.details {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  background: var(--secondary);
}

.details__text {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--primary);
  margin-top: var(--space-sm);
}

.details__note {
  color: var(--text-light);
  margin-top: var(--space-xs);
}

/* =========================================================
   13. LOCATION
========================================================= */
.location {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

.location__address {
  margin: var(--space-sm) 0 var(--space-md);
  color: var(--text-light);
}

/* =========================================================
   14. RSVP
========================================================= */
.rsvp {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  background: linear-gradient(180deg, var(--secondary), var(--background));
}

.rsvp__text {
  margin: var(--space-sm) 0 var(--space-md);
  color: var(--text-light);
}

/* =========================================================
   15. FOOTER
========================================================= */
.site-footer {
  text-align: center;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}

.site-footer__icon {
  margin-bottom: var(--space-sm);
}

.site-footer__text {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--primary-dark);
}

.site-footer__credit {
  margin-top: var(--space-xs);
  font-size: 0.8rem;
  color: var(--text-light);
}
