/* ─── Derin & Miguel — Wedding Website ─── */

:root {
  --bg-paper: #f5f0e6;
  --bg-paper-2: #ece5d4;
  --bg-paper-3: #e2d9c4;
  --ink: #3a4128;
  --ink-soft: #5a6149;
  --ink-mute: #8a8e7a;
  --sage: #6b7d5a;
  --sage-deep: #4a5a3e;
  --sage-light: #c7d1b8;
  --sage-mist: #dde3d0;
  --blush: #e8c9be;
  --blush-soft: #f0d8d0;
  --terracotta: #c97f55;
  --hairline: rgba(58,65,40,0.16);
  --hairline-strong: rgba(58,65,40,0.32);

  --f-script: "Allura", "Pinyon Script", cursive;
  --f-serif: "Cormorant Garamond", "EB Garamond", Garamond, serif;
  --f-caps: "Italiana", "Cormorant Garamond", serif;
  --f-ui: "Inter", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-paper);
  color: var(--ink);
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Paper texture: subtle layered noise gradient ─────────────────── */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(199,209,184,0.45), transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(199,209,184,0.32), transparent 70%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(232,201,190,0.28), transparent 70%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(199,209,184,0.32), transparent 70%);
  mix-blend-mode: multiply;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(58,65,40,0.012) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(58,65,40,0.012) 0 1px, transparent 1px 3px);
  opacity: 0.7;
}

main, header, footer, .nav, .tweaks-host { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4,h5,h6 { margin: 0; font-weight: 400; }
p { margin: 0; }

/* ── Typography utilities ─────────────────────────────────────────── */
.script { font-family: var(--f-script); font-weight: 400; line-height: 0.95; letter-spacing: 0.005em; }
.caps    { font-family: var(--f-caps); letter-spacing: 0.32em; text-transform: uppercase; }
.italic  { font-style: italic; }
.ui      { font-family: var(--f-ui); letter-spacing: 0.04em; }

/* ── Navigation ───────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  background: rgba(245,240,230,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
  z-index: 50;
}
.nav-logo { font-family: var(--f-script); font-size: 30px; color: var(--ink); line-height: 1; padding-top: 4px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-family: var(--f-caps);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color .2s;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--sage-deep); border-bottom-color: var(--sage); }
.nav-lang {
  display: flex; gap: 2px; font-family: var(--f-caps); font-size: 11px; letter-spacing: 0.24em;
  color: var(--ink-soft);
}
.nav-lang button {
  background: none; border: none; cursor: pointer; padding: 4px 8px;
  font: inherit; color: inherit; letter-spacing: inherit;
  border-radius: 999px; transition: all .2s;
}
.nav-lang button.active { background: var(--sage); color: var(--bg-paper); }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - 78px);
  padding: 72px 40px 60px;
  text-align: center;
  overflow: hidden;
}
.hero-inner { max-width: 980px; margin: 0 auto; position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--f-caps);
  font-size: 11px;
  letter-spacing: 0.46em;
  color: var(--ink-soft);
  margin-bottom: 36px;
}
.hero-eyebrow span { display: inline-block; padding: 0 18px; }
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: ""; display: inline-block; vertical-align: middle;
  width: 64px; height: 1px; background: var(--hairline-strong);
}
.hero-names {
  font-family: var(--f-script);
  color: var(--sage-deep);
  font-size: clamp(80px, 13vw, 200px);
  line-height: 0.92;
  position: relative;
}
.hero-names .derin { display: block; text-align: center; margin-right: 1.2em; }
.hero-names .amp   {
  display: inline-block;
  font-size: 0.45em;
  line-height: 1;
  margin: -0.15em 0 -0.15em 0;
  position: relative; top: -0.6em; left: 0.1em;
}
.hero-names .m { display: block; text-align: center; margin-left: 1.2em; margin-top: -0.05em; }
.hero-tag {
  font-family: var(--f-serif); font-style: italic;
  font-size: clamp(20px, 2.2vw, 30px);
  color: var(--ink-soft);
  margin-top: 36px;
}
.hero-meta {
  margin-top: 48px;
  display: inline-flex; align-items: center; gap: 28px;
  font-family: var(--f-caps); font-size: 12.5px; letter-spacing: 0.36em;
  color: var(--ink);
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--sage); }
.hero-venue {
  margin-top: 14px;
  font-family: var(--f-serif); font-style: italic;
  font-size: 22px; color: var(--ink-soft);
}
.hero-couple {
  margin-top: 40px;
  text-align: center;
  display: flex; justify-content: center;
}
.hero-couple img {
  width: clamp(280px, 28vw, 380px);
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(58,65,40,0.06));
}

/* Watercolor florals around hero corners */
.watercolor-blob {
  position: absolute; pointer-events: none;
  filter: blur(0.5px);
  z-index: 1;
}

/* ── Sections ─────────────────────────────────────────────────────── */
section {
  position: relative;
  padding: 120px 40px;
}
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-eyebrow {
  font-family: var(--f-caps);
  font-size: 10.5px;
  letter-spacing: 0.42em;
  color: var(--sage-deep);
  text-align: center;
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--f-script);
  font-size: clamp(56px, 8vw, 104px);
  color: var(--ink);
  text-align: center;
  line-height: 1;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 20px;
  margin-bottom: 72px;
  max-width: 640px; margin-left: auto; margin-right: auto;
}

.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 24px auto 64px;
  color: var(--sage); opacity: .8;
}
.divider .line { width: 80px; height: 1px; background: var(--hairline-strong); }
.divider .leaf { font-family: var(--f-caps); font-size: 12px; }

/* ── Countdown ────────────────────────────────────────────────────── */
.countdown {
  display: flex; justify-content: center;
  gap: 0;
  background: transparent;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.countdown-cell {
  flex: 1;
  text-align: center;
  padding: 44px 12px;
  border-right: 1px solid var(--hairline);
  position: relative;
}
.countdown-cell:last-child { border-right: none; }
.countdown-num {
  font-family: var(--f-caps);
  font-size: clamp(48px, 6vw, 84px);
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: lining-nums;
}
.countdown-lbl {
  margin-top: 14px;
  font-family: var(--f-caps);
  font-size: 10.5px;
  letter-spacing: 0.4em;
  color: var(--sage-deep);
}

/* ── Story ───────────────────────────────────────────────────────── */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.story-photo {
  aspect-ratio: 3 / 4;
  background: var(--sage-mist);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.story-text { font-size: 19px; line-height: 1.75; color: var(--ink-soft); }
.story-text p + p { margin-top: 1em; }
.story-text .lede {
  font-family: var(--f-serif); font-style: italic;
  font-size: 26px; color: var(--ink); line-height: 1.35;
  margin-bottom: 1.2em;
}

/* ── The Day — card grid ─────────────────────────────────────────── */
.day-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}
.day-card {
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid var(--hairline);
  padding: 56px 36px 52px;
  text-align: center;
  border-radius: 2px;
  position: relative;
  transition: box-shadow .3s ease, transform .3s ease;
  display: flex; flex-direction: column; align-items: center;
}
.day-card:hover {
  box-shadow: 0 8px 28px rgba(58,65,40,0.08);
  transform: translateY(-2px);
}
.day-icon {
  margin-bottom: 28px;
  color: var(--sage-deep);
}
.day-time {
  font-family: var(--f-caps);
  font-size: 38px;
  color: var(--ink);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 14px;
  font-variant-numeric: lining-nums;
}
.day-name {
  font-family: var(--f-caps);
  font-size: 12px;
  letter-spacing: 0.36em;
  color: var(--terracotta);
  margin-bottom: 26px;
  text-transform: uppercase;
}
.day-desc {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 32ch;
}
@media (max-width: 880px) {
  .day-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .day-card { padding: 40px 22px 36px; }
}
@media (max-width: 560px) {
  .day-grid { grid-template-columns: 1fr; }
}

/* ── Map ─────────────────────────────────────────────────────────── */
.map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-paper-2);
  border: 1px solid var(--hairline);
  overflow: hidden;
  border-radius: 2px;
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  /* Filter the live map slightly to harmonise with the cream/sage palette
     without breaking legibility. */
  filter: saturate(0.85) sepia(0.06);
}
.map-wrap svg { display: block; width: 100%; height: 100%; }
.venue-map-col { width: 100%; }
.map-legend {
  position: relative;
  z-index: 2;
  display: flex; justify-content: space-around; gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
  padding: 18px 24px;
  background: rgba(255, 253, 247, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--hairline);
  border-radius: 2px;
}
.map-legend-item {
  text-align: center;
}
.map-legend-item .from {
  font-family: var(--f-caps);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.map-legend-item .duration {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--terracotta);
}
.map-legend-item .duration .num { font-style: normal; font-family: var(--f-caps); letter-spacing: 0.04em; }
.schedule {
  background: linear-gradient(180deg, var(--bg-paper-2) 0%, var(--bg-paper) 100%);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.timeline {
  max-width: 720px; margin: 0 auto;
  position: relative;
}
.timeline::before {
  content: ""; position: absolute;
  left: 50%; top: 12px; bottom: 12px;
  width: 1px; background: var(--hairline-strong);
}
.timeline-row {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
}
.timeline-time {
  font-family: var(--f-caps);
  font-size: 22px;
  letter-spacing: 0.18em;
  color: var(--sage-deep);
}
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--sage);
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 0 6px var(--bg-paper-2);
}
.timeline-info { font-family: var(--f-serif); }
.timeline-info .name {
  font-style: italic; font-size: 24px; color: var(--ink); line-height: 1.2;
}
.timeline-info .desc {
  margin-top: 6px; color: var(--ink-soft); font-size: 16px; line-height: 1.5;
}
.timeline-row.left .timeline-time { text-align: right; }
.timeline-row.left .timeline-info { text-align: left; }
.timeline-row.right .timeline-time { order: 3; text-align: left; }
.timeline-row.right .timeline-info { order: 1; text-align: right; }
.timeline-row.right .timeline-dot { order: 2; }

/* ── Venue ───────────────────────────────────────────────────────── */
.venue-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 80px; align-items: center;
}
.venue-photo {
  aspect-ratio: 4 / 5;
  background: var(--sage-mist);
  border-radius: 2px;
  overflow: hidden;
}
.venue-name {
  font-family: var(--f-script);
  font-size: 72px;
  line-height: 1;
  color: var(--sage-deep);
  margin-bottom: 16px;
}
.venue-loc {
  font-family: var(--f-caps);
  font-size: 11px;
  letter-spacing: 0.38em;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.venue-desc {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.7;
  margin-bottom: 32px;
}
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--sage-deep);
  color: var(--sage-deep);
  font-family: var(--f-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s;
  border-radius: 0;
}
.btn:hover { background: var(--sage-deep); color: var(--bg-paper); }
.btn.solid { background: var(--sage-deep); color: var(--bg-paper); }
.btn.solid:hover { background: var(--ink); border-color: var(--ink); }

/* ── Travel ──────────────────────────────────────────────────────── */
.travel-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.travel-card {
  padding: 36px 32px;
  background: rgba(255,253,247,0.6);
  border: 1px solid var(--hairline);
  border-radius: 2px;
}
.travel-card h4 {
  font-family: var(--f-caps);
  font-size: 11px; letter-spacing: 0.4em;
  color: var(--sage-deep); margin-bottom: 18px;
}
.travel-card .title {
  font-family: var(--f-serif); font-style: italic; font-size: 26px;
  color: var(--ink); margin-bottom: 14px; line-height: 1.2;
}
.travel-card p { color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.travel-card .meta { margin-top: 18px; font-family: var(--f-ui); font-size: 13px; color: var(--ink-mute); }

/* ── Dress code ──────────────────────────────────────────────────── */
.dresscode {
  text-align: center;
  background: linear-gradient(180deg, var(--bg-paper) 0%, var(--bg-paper-2) 100%);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.dresscode .palette {
  display: inline-flex; gap: 14px; margin-top: 32px;
}
.dresscode .swatch {
  width: 64px; height: 80px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.06);
}
.dresscode .swatch-label {
  margin-top: 28px;
  font-family: var(--f-caps);
  font-size: 10.5px; letter-spacing: 0.4em;
  color: var(--ink-soft);
}

/* ── RSVP ────────────────────────────────────────────────────────── */
.rsvp-wrap {
  max-width: 620px;
  margin: 0 auto;
  background: rgba(255,253,247,0.7);
  border: 1px solid var(--hairline);
  padding: 56px 56px 64px;
  border-radius: 2px;
  position: relative;
}
.rsvp-wrap::before,
.rsvp-wrap::after {
  content: ""; position: absolute;
  width: 16px; height: 16px;
  border: 1px solid var(--sage);
}
.rsvp-wrap::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.rsvp-wrap::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--f-caps);
  font-size: 10.5px; letter-spacing: 0.38em;
  color: var(--sage-deep);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline-strong);
  padding: 8px 0;
  font-family: var(--f-serif);
  font-size: 19px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
  border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--sage-deep);
}
.field textarea { resize: vertical; min-height: 80px; }

.choices {
  display: flex; gap: 12px;
}
.choice {
  flex: 1;
  padding: 18px 16px;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  font-family: var(--f-caps);
  font-size: 10.5px; letter-spacing: 0.3em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
  border-radius: 0;
}
.choice:hover { border-color: var(--sage-deep); color: var(--sage-deep); }
.choice.active {
  background: var(--sage-deep); border-color: var(--sage-deep); color: var(--bg-paper);
}

.rsvp-success {
  text-align: center; padding: 32px 8px;
}
.rsvp-success .check {
  font-family: var(--f-script);
  font-size: 96px; color: var(--sage); line-height: 0.9;
}
.rsvp-success .msg {
  font-family: var(--f-serif); font-style: italic; font-size: 22px;
  color: var(--ink); margin-top: 16px;
}
.rsvp-success .small { margin-top: 14px; font-size: 16px; color: var(--ink-soft); }

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--hairline);
  padding: 24px 4px;
  cursor: pointer;
}
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--f-serif); font-style: italic; font-size: 22px;
  color: var(--ink);
}
.faq-toggle {
  font-family: var(--f-caps); font-size: 14px; color: var(--sage);
  transition: transform .3s;
}
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, margin-top .35s ease;
  color: var(--ink-soft); font-size: 17px; line-height: 1.65;
}
.faq-item.open .faq-a { max-height: 240px; margin-top: 14px; }

/* ── Footer ──────────────────────────────────────────────────────── */
footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 100px 40px 72px;
  text-align: center;
  border-top: 1px solid var(--hairline);
  background: var(--bg-paper-2);
}
.footer-inner { position: relative; z-index: 1; }
footer .signature {
  font-family: var(--f-script);
  font-size: 64px;
  color: var(--sage-deep);
  line-height: 1;
}
footer .with-love {
  margin-top: 20px;
  font-family: var(--f-serif); font-style: italic;
  font-size: 18px; color: var(--ink-soft);
}
footer .date-foot {
  margin-top: 36px;
  font-family: var(--f-caps);
  font-size: 11px; letter-spacing: 0.4em; color: var(--ink-soft);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .nav { padding: 14px 22px; }
  .nav-links { display: none; }
  section { padding: 80px 22px; }
  .hero { padding: 64px 22px 80px; }
  .story-grid, .venue-grid { grid-template-columns: 1fr; gap: 48px; }
  .travel-cards { grid-template-columns: 1fr; }
  .timeline::before { left: 20px; }
  .timeline-row { grid-template-columns: 32px 1fr; }
  .timeline-row .timeline-time { grid-column: 2; text-align: left !important; order: 0 !important; }
  .timeline-row .timeline-info { grid-column: 2; text-align: left !important; order: 0 !important; }
  .timeline-row .timeline-dot { grid-column: 1; margin: 0; order: 0 !important; }
  .rsvp-wrap { padding: 36px 24px 44px; }
}

/* Watercolor backdrop images positioned absolutely */
.wc {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.wc-tree-left {
  left: -80px;
  top: 100px;
  width: 280px;
  opacity: 0.7;
}
.wc-tree-right {
  right: -70px;
  top: 120px;
  width: 260px;
  opacity: 0.7;
}
.wc-flowers-l {
  left: -40px;
  bottom: -20px;
  width: 480px;
  opacity: 0.82;
}
.wc-flowers-r {
  right: -40px;
  bottom: -20px;
  width: 480px;
  opacity: 0.82;
}

/* Section-level decorations */
section { isolation: isolate; overflow: hidden; }
.section-inner { position: relative; z-index: 1; }

/* When a tweak palette makes the page warm, the green-pigmented PNGs would
   clash. Tint them via hue-rotate so they blend with terracotta moods. */
html[data-mood="terracotta"] .wc,
html[data-mood="terracotta"] .deco-img {
  filter: hue-rotate(-60deg) saturate(0.85);
}
html[data-mood="dusk"] .wc,
html[data-mood="dusk"] .deco-img {
  filter: hue-rotate(-8deg) saturate(0.7);
}
html[data-mood="bloom"] .wc,
html[data-mood="bloom"] .deco-img {
  filter: hue-rotate(-10deg) saturate(0.95);
}
