/* ==========================================================================
   Canva pages (index.html, travel.html) — pixel-exact reproductions of
   assets/Design_Language/FINAL/{1,2}.png.

   Each band is the design's flat background color at the design's exact
   aspect ratio; every element is a transparent layer cut from the export
   (assets/images/canva/final/, made by FINAL/slice.py) and placed at its
   original coordinates in % of the 1366px Canva canvas. At rest the page is
   identical to the export; animations only run on the way in.
   ========================================================================== */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-var.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cinzel Decorative';
  src: url('../assets/fonts/cinzel-decorative-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Parisienne';
  src: url('../assets/fonts/parisienne-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #faf5eb;
  overflow-x: clip;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Legacy names consumed by js/gate.js's injected styles */
:root {
  --color-bg: #faf5eb;
  --color-surface: #fffdf9;
  --color-text: #33402c;
  --color-text-soft: #5f6a55;
  --color-border: rgba(74, 106, 48, 0.28);
  --copper: #648a43;
  --copper-deep: #4a6a30;
  --golden-hour: #efb23e;
  --blush: #f7e1e4;
  --font-script: 'Parisienne', cursive;
  --font-body: 'Cormorant Garamond', Georgia, serif;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Bands & layers ---------- */
main { display: block; container-type: inline-size; }
.cv-band {
  position: relative;
  width: 100%;
  height: calc(var(--h) * 100cqw / 1366); /* whole pixels at native width */
  container-type: inline-size;
  background: var(--bg);
  overflow: hidden;
}
.cv-layer {
  position: absolute;
  display: block;
  max-width: none;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.cv-link {
  position: absolute;
  display: block;
  border-radius: 4px;
}
.cv-link:focus-visible { outline: 2px solid #1f7c97; outline-offset: 2px; }

/* ---------- Header (same look as the floral pages' .site-nav) ----------
   Sits above the design (body is padded by its height) so it never covers
   any of the Canva artwork. */
:root { --nav-h: 4.5rem; }
body { padding-top: var(--nav-h); }

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(252, 248, 241, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 106, 48, 0.18);
  transition: box-shadow 0.3s;
}
.site-nav.is-scrolled { box-shadow: 0 6px 24px -18px rgba(51, 64, 44, 0.5); }
.site-nav .container {
  width: min(100% - 2.5rem, 1120px);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav__logo { display: block; width: 52px; height: 52px; }
.site-nav__logo img { display: block; width: 100%; height: 100%; }
.site-nav__links {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__links a {
  position: relative;
  font-family: 'Cinzel Decorative', Georgia, serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: #33402c;
  text-decoration: none;
  padding: 0.35rem 0;
}
.site-nav__links a::after {
  content: '';
  position: absolute;
  left: 50%; right: 50%; bottom: 0;
  height: 1.5px;
  background: #d4688c;
  transition: left 0.3s, right 0.3s;
}
.site-nav__links a:hover::after,
.site-nav__links a[aria-current="page"]::after { left: 0; right: 0; }
.site-nav__links a[aria-current="page"] { color: #4a6a30; }
.site-nav__toggle {
  display: none;
  background: none;
  border: 1px solid rgba(74, 106, 48, 0.28);
  border-radius: 999px;
  width: 44px; height: 44px;
  color: #4a6a30;
  font-size: 1.2rem;
  cursor: pointer;
}
@media (max-width: 720px) {
  .site-nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav__links {
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: #fcf8f1;
    border-bottom: 1px solid rgba(74, 106, 48, 0.28);
    box-shadow: 0 18px 40px -18px rgba(51, 64, 44, 0.28);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s;
  }
  .site-nav__links.is-open { max-height: 22rem; }
  .site-nav__links li { width: 100%; text-align: center; }
  .site-nav__links a { display: block; padding: 1rem; }
  .site-nav__links a::after { display: none; }
}

/* ==========================================================================
   Entrance animations — only when JS is running (html.cv-js). js/canva.js
   adds .is-in to a band once it's in view AND its images have loaded.
   The one-time entrances run for everyone (they're the design's intent);
   only the continuous sway is skipped under prefers-reduced-motion.
   Every animation ends at the layer's exact resting state.
   ========================================================================== */
@supports (animation-name: x) {
  .cv-js .cv-band:not(.is-in) [data-anim] { opacity: 0; }
  .cv-js .cv-band.is-in [data-anim] {
    animation-duration: 1.2s;
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
    animation-fill-mode: backwards; /* release styles after the run so layers render un-composited, pixel-exact */
    animation-delay: calc(var(--d, 0) * 1s);
  }

  /* handwriting: wipe in left → right */
  .cv-js .cv-band.is-in [data-anim="write"] { animation-name: cv-write; animation-duration: 1.9s; animation-timing-function: cubic-bezier(0.45, 0.05, 0.4, 1); }
  @keyframes cv-write {
    from { clip-path: inset(-10% 100% -10% -2%); opacity: 1; }
    to { clip-path: inset(-10% -2% -10% -2%); opacity: 1; }
  }

  /* text & small art: rise and fade */
  .cv-js .cv-band.is-in [data-anim="rise"] { animation-name: cv-rise; }
  @keyframes cv-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

  /* stems: grow up from the base */
  .cv-js .cv-band.is-in [data-anim="grow"] { animation-name: cv-grow; animation-duration: 1.7s; transform-origin: 50% 100%; }
  @keyframes cv-grow {
    from { opacity: 0; transform: translateY(6%) scaleY(0.82); clip-path: inset(100% -5% 0 -5%); }
    40% { opacity: 1; }
    to { opacity: 1; transform: none; clip-path: inset(-5% -5% 0 -5%); }
  }

  /* bleeding heart: arch swings down from its stem */
  .cv-js .cv-band.is-in [data-anim="swing"] { animation-name: cv-swing; animation-duration: 1.8s; transform-origin: 8% 96%; }
  @keyframes cv-swing { from { opacity: 0; transform: rotate(-14deg); } 50% { opacity: 1; } to { opacity: 1; transform: none; } }

  /* cake: soft fade + settle */
  .cv-js .cv-band.is-in [data-anim="settle"] { animation-name: cv-settle; animation-duration: 1.6s; transform-origin: 50% 100%; }
  @keyframes cv-settle { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

  /* photos & label boxes: wipe reveal */
  .cv-js .cv-band.is-in [data-anim="wipe"] { animation-name: cv-wipe; animation-duration: 1.4s; }
  @keyframes cv-wipe { from { clip-path: inset(0 100% 0 0); opacity: 1; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
  .cv-js .cv-band.is-in [data-anim="wipe-up"] { animation-name: cv-wipe-up; animation-duration: 1.6s; }
  @keyframes cv-wipe-up { from { clip-path: inset(100% 0 0 0); opacity: 1; } to { clip-path: inset(0 0 0 0); opacity: 1; } }

  /* airplane: flies in along its dashed trail */
  .cv-js .cv-band.is-in [data-anim="fly"] { animation-name: cv-fly; animation-duration: 2.2s; }
  @keyframes cv-fly {
    from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translate(-6%, 8%); }
    30% { opacity: 1; }
    to { opacity: 1; clip-path: inset(-5% -5% -5% -5%); transform: none; }
  }

}

@media (prefers-reduced-motion: no-preference) {
  /* gentle, continuous sway for flowers once they've arrived */
  [data-sway] { transform-origin: 50% 100%; }
  .cv-js .cv-band.is-in [data-sway] {
    animation-name: var(--enter, cv-rise), cv-sway;
    animation-duration: 1.7s, 6s;
    animation-delay: calc(var(--d, 0) * 1s), calc(var(--d, 0) * 1s + 1.7s);
    animation-iteration-count: 1, infinite;
    animation-direction: normal, alternate;
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1), ease-in-out;
  }
  .cv-js .cv-band.is-in [data-sway][data-anim="grow"] { --enter: cv-grow; }
  .cv-js .cv-band.is-in [data-sway][data-anim="swing"] { --enter: cv-swing; transform-origin: 8% 96%; }
  @keyframes cv-sway { from { rotate: -0.9deg; } to { rotate: 0.9deg; } }
}
