/* =========================================================
   Wedding Website — Editorial elegance
   Inspired by the Royal London Equestrian reference.
   Palette sampled from the invitation:
     cream  #e8dcd5  (background)
     tawny  #a99969  (display accents, hairlines, eyebrows)
     spruce #2F4A36  (body + primary accents)
   ========================================================= */

:root {
  --color-cream: #e8dcd5;
  --color-cream-warm: #f1e8e0;
  --color-tawny: #a99969;
  --color-tawny-deep: #7f6c42;  /* darker gold for text on cream/hazy photos */
  --color-tawny-soft: rgba(169, 153, 105, 0.18);
  --color-spruce: #2F4A36;
  --color-spruce-soft: #4A6B53;
  --color-moss: #182218;        /* dark mossy green — for feature panels */
  --color-moss-deep: #0E160E;   /* even darker — hero gradient base */
  --color-overlay: rgba(24, 34, 24, 0.7);

  /* Typography — editorial serif + the cursive reserved for the ampersand only */
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-body:    "Cormorant Garamond", "Lora", Georgia, serif;
  --font-script:  "Pinyon Script", "Allura", cursive;

  --tracking-wide:  0.32em;
  --tracking-title: 0.22em;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;
  --space-xxl: 10rem;

  --maxw-content: 76rem;
  --maxw-text: 36rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-spruce);
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
  font-weight: 500;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Typography ---------- */

h1, h2, h3 { font-weight: 500; line-height: 1.1; margin: 0; }

/* Display title — wide-tracked serif in ALL CAPS, à la EQUESTRIAN */
.display-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.5rem + 6vw, 6.5rem);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
  color: var(--color-spruce);
  text-align: center;
  font-weight: 500;
  margin: var(--space-md) 0;
  /* Letter-spacing adds a trailing space to every line, which pushes
     centered text visibly left of center (worst on mobile where the
     hero name wraps). This padding rebalances it. */
  padding-left: var(--tracking-title);
}

.display-title .amp {
  font-family: var(--font-script);
  font-size: 1.1em;
  letter-spacing: 0;
  color: var(--color-tawny);
  text-transform: none;
  font-style: normal;
  display: inline-block;
  transform: translateY(0.05em);
  margin: 0 0.15em;
}

/* Hero overlay variant — lighter color so it reads against a dark photo */
.hero .display-title { color: var(--color-cream); }
.hero .display-title .amp { color: var(--color-tawny); }

/* Eyebrow — small caps text flanked by thin gold lines */
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-tawny-deep);
  margin: 0;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  flex: 0 0 clamp(28px, 5vw, 64px);
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow--left  { justify-content: flex-start; }
.eyebrow--left::before { display: none; }
.eyebrow--right { justify-content: flex-end; }
.eyebrow--right::after { display: none; }

p { margin: 0 0 var(--space-sm); }

a {
  color: var(--color-tawny);
  text-decoration: none;
  transition: color 200ms ease;
}
a:hover { color: var(--color-spruce); }

/* "More info →" style inline link */
.linkout {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-tawny-deep);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.3rem;
  transition: border-color 250ms ease, color 250ms ease;
}
.linkout::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
}
.linkout:hover {
  color: var(--color-spruce);
  border-bottom-color: currentColor;
}

/* ---------- Layout primitives ---------- */

.container { max-width: var(--maxw-content); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; position: relative; }

/* ---------- Hub page (index.html) — full-viewport dark landing ---------- */

body.hub {
  background: var(--color-moss-deep);
  min-height: 100vh;
}
body.hub .hero { min-height: 100vh; }
body.hub .hero .button-row { gap: 1.5rem; }

/* ---------- Top nav (home link, sits over the hero) ---------- */

.top-nav {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-cream);
  text-decoration: none;
  padding: 0.6rem 0;
  transition: color 200ms ease;
}
.top-nav::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: currentColor;
  transition: width 250ms ease;
}
.top-nav:hover {
  color: var(--color-tawny);
}
.top-nav:hover::before {
  width: 2.4rem;
}

/* ---------- Hero (full-bleed) ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-xxl) var(--space-md);
  background:
    /* Fades the hero's own bottom edge into the cream below, so the
       transition into #our-story is a blend rather than a hard cut. */
    linear-gradient(to bottom,
      transparent 0%,
      transparent 76%,
      rgba(232, 220, 213, 0.08) 82%,
      rgba(232, 220, 213, 0.30) 88%,
      rgba(232, 220, 213, 0.65) 94%,
      var(--color-cream) 100%),
    linear-gradient(180deg, var(--color-overlay), var(--color-overlay)),
    /* Swap this URL once you drop a hero photo into images/hero/hero.jpg */
    radial-gradient(ellipse at top, var(--color-moss) 0%, var(--color-moss-deep) 100%);
  background-size: cover;
  background-position: center;
  color: var(--color-cream);
}

.hero[data-hero-image] {
  background:
    linear-gradient(to bottom,
      transparent 0%,
      transparent 76%,
      rgba(232, 220, 213, 0.08) 82%,
      rgba(232, 220, 213, 0.30) 88%,
      rgba(232, 220, 213, 0.65) 94%,
      var(--color-cream) 100%),
    linear-gradient(180deg, var(--color-overlay), var(--color-overlay)),
    url("../images/hero/hero.jpg") center / cover no-repeat,
    var(--color-moss-deep);
}

.hero .eyebrow { color: var(--color-cream); margin-bottom: var(--space-md); }
.hero .eyebrow::before,
.hero .eyebrow::after { background: var(--color-cream); opacity: 0.8; }

.hero .date {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-cream);
  opacity: 0.95;
  margin-top: var(--space-md);
}

/* Side affordances: page-count on the left, vertical SCROLL on the right */
.hero-counter,
.hero-scroll {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-cream);
  opacity: 0.8;
}
.hero-counter {
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hero-counter .active { color: var(--color-tawny); opacity: 1; }
.hero-scroll {
  right: var(--space-md);
  top: 50%;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.hero-scroll::after {
  content: "";
  width: 1px;
  height: 60px;
  background: var(--color-cream);
  opacity: 0.5;
}

/* ---------- Outlined pill buttons ---------- */

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

.btn {
  display: inline-block;
  padding: 1.05rem 2.6rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: transparent;
  color: var(--color-tawny);
  transition: background 250ms ease, color 250ms ease, border-color 250ms ease;
}

.btn:hover {
  background: var(--color-tawny);
  color: var(--color-cream);
  border-color: var(--color-tawny);
}

/* On dark hero background, the outlined button keeps tawny outline + tawny text */
.hero .btn { color: var(--color-tawny); }
.hero .btn:hover { background: var(--color-tawny); color: var(--color-cream); }

/* Outside the hero, primary/secondary variants on the cream background */
.btn-on-cream { color: var(--color-spruce); border-color: var(--color-spruce); }
.btn-on-cream:hover { background: var(--color-spruce); color: var(--color-cream); border-color: var(--color-spruce); }

/* ---------- Section heading block (eyebrow + display title) ---------- */

.section-head {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-head .display-title {
  font-size: clamp(2.25rem, 1.3rem + 4vw, 4.5rem);
}

/* ---------- Feature row — image on one side, copy on the other ---------- */

.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
  padding: var(--space-lg) 0;
}

.feature:nth-child(even) .feature-image { order: 2; }

/* Collage pair — a main photo with a smaller accent photo overhanging
   its bottom edge, like two prints set down slightly askew. Replaces
   the old single hard-edged rectangle. */
.feature-image {
  position: relative;
  background: none;
  border: none;
  padding-bottom: 12%;
}
.feature-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
/* The proposal photo is a landscape shot; don't crop it to portrait. */
.feature--proposal .feature-image img:not(.accent-photo) {
  aspect-ratio: 4 / 3;
}
.feature-image .accent-photo {
  position: absolute;
  width: 46%;
  aspect-ratio: 1 / 1;
  left: 10%;
  bottom: -12%;
  z-index: 2;
  transform: rotate(-3deg);
}

/* Edgeless photos — no mat, no frame line. A mask fades each photo's
   own pixels to transparent over its last ~28px on every side, so it
   dissolves straight into whatever sits behind it (the hazy section
   background, or an overlapped photo). */
.collage-photo img,
.feature-image img {
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent),
    linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent),
    linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-composite: intersect;
}
.feature:nth-child(even) .feature-image .accent-photo {
  left: auto;
  right: 10%;
  transform: rotate(3deg);
}

.feature-copy { max-width: var(--maxw-text); }
.feature-copy .display-title {
  text-align: left;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  color: var(--color-tawny-deep);
  margin: var(--space-sm) 0 var(--space-md);
  padding-left: 0; /* left-aligned; no centering compensation needed */
}
.feature-copy .eyebrow {
  justify-content: flex-start;
}
.feature-copy .eyebrow::before { display: none; }
.feature-copy .eyebrow::after  { flex: 0 0 40px; }
.feature-copy p { color: var(--color-spruce); }
.feature-copy .linkout { margin-top: var(--space-sm); }

/* ---------- Gallery collage (scattered, staggered columns) ----------
   Replaces the old carousel. Three flex columns of varying-height
   photos (natural aspect ratios, not force-cropped), with the middle
   column offset downward so nothing lines up into rows — the same
   "mood board" feel as the Our Story collage pairs. */

.collage-grid {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.collage-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
}
.collage-col--mid {
  margin-top: var(--space-xl);
}

.collage-photo {
  display: block;
}
.collage-photo img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 400ms ease, filter 400ms ease;
  filter: saturate(0.95);
}
.collage-photo--tilt-l img { transform: rotate(-2.5deg); }
.collage-photo--tilt-r img { transform: rotate(2.5deg); }

.collage-photo:hover img {
  transform: rotate(0deg) scale(1.03);
  filter: saturate(1.05);
}

/* ---------- Hazy photo backgrounds (cream sections) ----------
   Same idea as the hero: a photo dimmed under a heavy veil so it
   reads as texture, not competition for the content. Layers, top
   to bottom: cream edge feather (keeps the fluid section blends),
   cream haze veil, the photo, cream base. */

#our-story, #details, #gallery {
  background:
    linear-gradient(to bottom,
      var(--color-cream) 0,
      rgba(232, 220, 213, 0) 96px,
      rgba(232, 220, 213, 0) calc(100% - 96px),
      var(--color-cream) 100%),
    linear-gradient(rgba(232, 220, 213, 0.73), rgba(232, 220, 213, 0.73)),
    var(--color-cream);
  background-size: cover;
  background-position: center;
}
#our-story {
  background-image:
    linear-gradient(to bottom,
      var(--color-cream) 0,
      rgba(232, 220, 213, 0) 96px,
      rgba(232, 220, 213, 0) calc(100% - 96px),
      var(--color-cream) 100%),
    linear-gradient(rgba(232, 220, 213, 0.73), rgba(232, 220, 213, 0.73)),
    url("../images/backgrounds/story.jpg");
}
#details {
  background-image:
    linear-gradient(to bottom,
      var(--color-cream) 0,
      rgba(232, 220, 213, 0) 96px,
      rgba(232, 220, 213, 0) calc(100% - 96px),
      var(--color-cream) 100%),
    linear-gradient(rgba(232, 220, 213, 0.73), rgba(232, 220, 213, 0.73)),
    url("../images/backgrounds/bg4.jpg");
}
#gallery {
  background-image:
    linear-gradient(to bottom,
      var(--color-cream) 0,
      rgba(232, 220, 213, 0) 96px,
      rgba(232, 220, 213, 0) calc(100% - 96px),
      var(--color-cream) 100%),
    linear-gradient(rgba(232, 220, 213, 0.73), rgba(232, 220, 213, 0.73)),
    url("../images/backgrounds/up.jpg");
}

footer {
  background:
    linear-gradient(to bottom,
      var(--color-cream) 0,
      rgba(232, 220, 213, 0) 40px,
      rgba(232, 220, 213, 0) calc(100% - 40px),
      var(--color-cream) 100%),
    linear-gradient(rgba(232, 220, 213, 0.73), rgba(232, 220, 213, 0.73)),
    url("../images/backgrounds/bg5.jpg") center / cover no-repeat,
    var(--color-cream);
}

/* ---------- Details row (Ceremony · Reception · Dress code) ---------- */

.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  padding: 0;
  text-align: center;
}
.details--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 56rem;
  margin: 0 auto;
}
.details-item .eyebrow { margin-bottom: var(--space-sm); }
.details-item p { font-size: 1.2rem; }

/* ---------- Registry (dark mossy-green feature panel) ---------- */

.registry {
  /* Dark moss veil over a photo, with cream edge feathering so the
     panel still melts into the neighboring sections. Fixed px bands;
     the mobile override below tightens them where .section's
     responsive padding drops this section's padding to 4rem (64px). */
  background:
    linear-gradient(to bottom,
      var(--color-cream) 0,
      rgba(232, 220, 213, 0) 96px,
      rgba(232, 220, 213, 0) calc(100% - 96px),
      var(--color-cream) 100%),
    linear-gradient(rgba(24, 34, 24, 0.73), rgba(24, 34, 24, 0.73)),
    url("../images/backgrounds/disney.jpg") center / cover no-repeat,
    var(--color-moss);
  padding: var(--space-xxl) 0;
}

.registry .section-head { margin-bottom: var(--space-md); }

.registry .eyebrow {
  color: var(--color-tawny);
}
.registry .eyebrow::before,
.registry .eyebrow::after {
  background: var(--color-tawny);
}

.registry .display-title {
  color: var(--color-cream);
}
.registry .display-title .amp {
  color: var(--color-tawny);
}

.registry-note {
  max-width: var(--maxw-text);
  margin: 0 auto;
  text-align: center;
  font-style: italic;
  font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.45rem);
  color: var(--color-cream);
  padding-top: var(--space-md);
  position: relative;
}
.registry-note::before {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-tawny);
  margin: 0 auto var(--space-md);
}

/* ---------- RSVP ---------- */

.rsvp {
  position: relative;
  padding: var(--space-xxl) 0;
  background:
    linear-gradient(to bottom,
      var(--color-cream) 0,
      rgba(232, 220, 213, 0) 96px,
      rgba(232, 220, 213, 0) calc(100% - 96px),
      var(--color-cream) 100%),
    linear-gradient(rgba(232, 220, 213, 0.73), rgba(232, 220, 213, 0.73)),
    url("../images/backgrounds/kissing.jpg") center / cover no-repeat,
    var(--color-cream);
}

.rsvp-intro {
  max-width: var(--maxw-text);
  margin: var(--space-md) auto var(--space-xl);
  text-align: center;
  font-style: italic;
}

.zoho-form-wrapper {
  max-width: var(--maxw-text);
  margin: 0 auto;
}

/* Zoho Forms HTML embed overrides — underline-only inputs, pill submit button */
.zoho-form-wrapper input[type="text"],
.zoho-form-wrapper input[type="email"],
.zoho-form-wrapper input[type="tel"],
.zoho-form-wrapper textarea,
.zoho-form-wrapper select {
  width: 100%;
  padding: 0.85rem 0.2rem;
  border: none;
  border-bottom: 1px solid var(--color-spruce);
  background: transparent;
  color: var(--color-spruce);
  font-family: var(--font-body);
  font-size: 1.05rem;
  border-radius: 0;
  transition: border-color 200ms ease;
}
.zoho-form-wrapper input:focus,
.zoho-form-wrapper textarea:focus,
.zoho-form-wrapper select:focus {
  outline: none;
  border-color: var(--color-tawny);
}
.zoho-form-wrapper label {
  color: var(--color-spruce-soft);
  font-size: 0.75rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.zoho-form-wrapper button[type="submit"],
.zoho-form-wrapper input[type="submit"] {
  background: transparent;
  color: var(--color-spruce);
  border: 1px solid var(--color-spruce);
  padding: 1.05rem 2.8rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: background 250ms ease, color 250ms ease;
  display: block;
  margin: var(--space-lg) auto 0;
}
.zoho-form-wrapper button[type="submit"]:hover,
.zoho-form-wrapper input[type="submit"]:hover {
  background: var(--color-spruce);
  color: var(--color-cream);
}

/* ---------- Footer ---------- */

footer {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  color: var(--color-spruce-soft);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ---------- Scroll-driven reveal (progressive enhancement) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms ease, transform 800ms ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@supports (animation-timeline: view()) {
  .reveal {
    opacity: 1; transform: none;
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-image { order: 0; }
  .feature-copy .display-title { text-align: center; padding-left: var(--tracking-title); }
  .feature-copy .eyebrow { justify-content: center; }
  .feature-copy .eyebrow::before { display: flex; flex: 0 0 40px; }
  .details { grid-template-columns: 1fr; gap: var(--space-md); }
  .hero-counter, .hero-scroll { display: none; }
  .collage-col--mid { margin-top: var(--space-md); }
}

@media (max-width: 639px) {
  .section { padding: var(--space-lg) 0; }
  /* Three narrow columns get cramped on a phone; stack into one. */
  .collage-grid { flex-direction: column; gap: var(--space-lg); }
  .collage-col--mid { margin-top: 0; }
  .button-row { flex-direction: column; align-items: stretch; padding: 0 var(--space-md); }
  .btn { text-align: center; }
  .hero { min-height: 80vh; padding: var(--space-xl) var(--space-md); }
  /* Section padding shrinks to 4rem here; tighten the feathered bands
     so the fades finish before the content starts. */
  .registry {
    background:
      linear-gradient(to bottom,
        var(--color-cream) 0,
        rgba(232, 220, 213, 0) 48px,
        rgba(232, 220, 213, 0) calc(100% - 48px),
        var(--color-cream) 100%),
      linear-gradient(rgba(24, 34, 24, 0.73), rgba(24, 34, 24, 0.73)),
      url("../images/backgrounds/disney.jpg") center / cover no-repeat,
      var(--color-moss);
  }
  #our-story, #details, #gallery, .rsvp {
    background-image:
      linear-gradient(to bottom,
        var(--color-cream) 0,
        rgba(232, 220, 213, 0) 48px,
        rgba(232, 220, 213, 0) calc(100% - 48px),
        var(--color-cream) 100%),
      linear-gradient(rgba(232, 220, 213, 0.73), rgba(232, 220, 213, 0.73)),
      var(--photo-mobile, none);
  }
  #our-story { --photo-mobile: url("../images/backgrounds/story.jpg"); }
  #details { --photo-mobile: url("../images/backgrounds/bg4.jpg"); }
  #gallery { --photo-mobile: url("../images/backgrounds/up.jpg"); }
  .rsvp { --photo-mobile: url("../images/backgrounds/kissing.jpg"); }
}
