/* ===========================================================
   Ourinvite — styles
   Elegant, modern, fully responsive
   =========================================================== */

:root {
  --ink: #1c1a27;
  --ink-soft: #56506a;
  --cream: #fbf7f2;
  --cream-2: #f4ece3;
  --white: #ffffff;
  --plum: #6d4aff;
  --plum-deep: #5436d6;
  --rose: #ff7eb3;
  --gold: #c9a24b;
  --line: rgba(28, 26, 39, 0.10);
  --shadow-sm: 0 4px 16px rgba(28, 26, 39, 0.06);
  --shadow-md: 0 18px 50px rgba(28, 26, 39, 0.12);
  --shadow-lg: 0 40px 90px rgba(84, 54, 214, 0.20);
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum-deep);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--plum), var(--plum-deep));
  color: var(--white);
  box-shadow: 0 12px 28px rgba(84, 54, 214, 0.30);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(84, 54, 214, 0.38); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: rgba(251, 247, 242, 0.78);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--white);
  background: linear-gradient(135deg, var(--plum), var(--rose));
  box-shadow: var(--shadow-sm);
}
.brand-name { font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-name span { color: var(--plum-deep); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-menu a:not(.btn) {
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.2s ease;
}
.nav-menu a:not(.btn):hover { color: var(--ink); }
.nav-menu a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--plum);
  transition: width 0.25s var(--ease);
}
.nav-menu a:not(.btn):hover::after { width: 100%; }
.nav-cta { color: var(--white) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0; overflow: hidden; }
.hero-glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  background: radial-gradient(circle at 30% 30%, rgba(109, 74, 255, 0.22), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(255, 126, 179, 0.20), transparent 60%);
  filter: blur(10px);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  margin-bottom: 20px;
}
.hero h1 em { font-style: italic; color: var(--plum-deep); }
.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 30ch;
  margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.hero-stats {
  display: flex;
  gap: clamp(20px, 4vw, 40px);
  list-style: none;
  flex-wrap: wrap;
}
.hero-stats strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  color: var(--ink);
}
.hero-stats span { font-size: 0.85rem; color: var(--ink-soft); }

/* Invite card */
.hero-card-wrap { position: relative; display: grid; place-items: center; }
.invite-card {
  position: relative;
  width: min(360px, 86vw);
  padding: 38px 34px 32px;
  text-align: center;
  background:
    linear-gradient(160deg, #ffffff, #fdf9f4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
  transition: transform 0.5s var(--ease);
}
.hero-card-wrap:hover .invite-card { transform: rotate(0deg) translateY(-4px); }
.invite-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 162, 75, 0.40);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}
.invite-card-top { margin-bottom: 16px; }
.invite-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.invite-script {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.invite-names {
  font-size: 2.1rem;
  margin: 6px 0 8px;
  color: var(--ink);
}
.invite-meta { font-size: 0.86rem; color: var(--ink-soft); }
.invite-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gold);
  margin: 16px 0;
}
.invite-divider span { height: 1px; width: 46px; background: rgba(201, 162, 75, 0.5); }
.invite-detail { font-size: 0.92rem; color: var(--ink); margin: 2px 0; }
.invite-rsvp {
  margin-top: 20px;
  padding: 10px 26px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-family: inherit;
  color: var(--white);
  background: linear-gradient(135deg, var(--plum), var(--plum-deep));
  cursor: default;
}

.floating-pill {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  animation: float 5s ease-in-out infinite;
}
.pill-1 { top: 8%; left: -6%; }
.pill-2 { bottom: 10%; right: -4%; animation-delay: 1.6s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-alt { background: var(--cream-2); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(109,74,255,0.12), rgba(255,126,179,0.14));
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.22rem; margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- Templates ---------- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.template-card {
  --accent: var(--plum-deep);
  --media-from: #f2edff;
  --media-to: #e6dcff;
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.template-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.template-media {
  height: 158px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: linear-gradient(160deg, var(--media-from), var(--media-to));
}
.template-media svg {
  width: 84px;
  height: 84px;
  transition: transform 0.4s var(--ease);
}
.template-card:hover .template-media svg { transform: scale(1.08) rotate(-3deg); }
.template-body { padding: 22px 24px 26px; }
.template-kind {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.template-card h3 { font-size: 1.4rem; margin: 6px 0; color: var(--ink); }
.template-card p { font-size: 0.92rem; color: var(--ink-soft); }
/* per-occasion accent + illustration backdrop */
.t-wedding   { --accent: #2f7d6b; --media-from: #eaf5f0; --media-to: #d5ebe2; }
.t-birthday  { --accent: #d64d8c; --media-from: #ffeef5; --media-to: #ffd8e6; }
.t-baby      { --accent: #5470c8; --media-from: #eef2ff; --media-to: #dbe5ff; }
.t-corporate { --accent: #5a5a74; --media-from: #eef0f4; --media-to: #dee1ea; }

/* ---------- Custom select (Event type) ---------- */
.select-wrap { position: relative; }
.select-wrap select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
.select-wrap select:invalid { color: #9a93ad; }
.select-wrap select option { color: var(--ink); }
.select-chevron {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
  pointer-events: none;
  transition: color 0.2s ease, transform 0.25s var(--ease);
}
.select-wrap select:hover + .select-chevron { color: var(--ink); }
.select-wrap select:focus + .select-chevron {
  color: var(--plum);
  transform: translateY(-50%) rotate(180deg);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  counter-reset: step;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 28px;
  position: relative;
}
.step-num {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--plum), var(--plum-deep));
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(84,54,214,0.30);
}
.step h3 { font-size: 1.25rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 14px; }
.contact-copy > p { color: var(--ink-soft); max-width: 40ch; margin-bottom: 28px; }
.contact-list { list-style: none; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.contact-ico {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
}
.contact-list a:hover { color: var(--plum-deep); }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--plum);
  box-shadow: 0 0 0 4px rgba(109, 74, 255, 0.14);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #e0567a;
}
.field-hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }
.form-note { font-size: 0.9rem; min-height: 1.2em; }
.form-note.ok { color: #2c8a5a; font-weight: 600; }
.form-note.err { color: #d44a6b; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding-top: 52px;
}
.site-footer .brand-name { color: var(--white); font-size: 1.3rem; }
.site-footer .brand-name span { color: var(--rose); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand p { margin-top: 10px; font-size: 0.94rem; max-width: 28ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.footer-links a { color: rgba(255,255,255,0.78); font-weight: 500; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { padding: 22px 22px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* ---------- Reveal animation ----------
   Content is visible by default; the hidden state only applies once JS
   adds .js-reveal, so the page degrades gracefully without JavaScript. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .feature-grid, .template-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    inset: 70px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px 22px 26px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu li { width: 100%; }
  .nav-menu a:not(.btn) { display: block; padding: 12px 6px; }
  .nav-cta { margin-top: 8px; }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-card-wrap { order: 1; }
  .lead { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }

  .contact-inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .feature-grid, .template-grid { grid-template-columns: 1fr; }
  .floating-pill { font-size: 0.74rem; padding: 7px 12px; }
  .pill-1 { left: 0; }
  .pill-2 { right: 0; }
  .hero-stats { gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
