/* ————————————————————————————————————————————————————————————
   Bytes of Tayllor & Austin
   warm, quiet, handmade. a letter, not a landing page.
   ———————————————————————————————————————————————————————————— */

:root {
  /* the hazel thread */
  --cream:      #FAF6F0;   /* warm off-white base            */
  --cream-deep: #F3ECE1;   /* slightly deeper for shadows    */
  --hazel:      #B8865B;   /* muted amber / honey-brown      */
  --hazel-soft: #C9A17C;   /* lighter hazel for hover        */
  --charcoal:   #33302B;   /* warm near-black, never pure    */
  --charcoal-soft: #6E675E;/* muted body / captions          */

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono:  "JetBrains Mono", "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  /* barely-there paper grain — subtle, tactile, not digital */
  background-image:
    radial-gradient(circle at 50% 0%, rgba(184,134,91,0.05), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--charcoal);
  font-family: var(--serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono  { font-family: var(--mono); }
.serif { font-family: var(--serif); }

/* ————————————————————————————— Hero ————————————————————————————— */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem 4rem;
  position: relative;
}

.hero__inner { max-width: 40rem; }

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
}

.hero__bytes {
  font-family: var(--mono);
  font-weight: 300;
  font-size: clamp(0.85rem, 2.5vw, 1.15rem);
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--hazel);
  padding-left: 0.28em; /* optical balance for the letter-spacing */
}

.hero__names {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}

.hero__names .amp {
  color: var(--hazel);
  font-style: italic;
  font-weight: 400;
  padding: 0 0.08em;
}

.hero__subtitle {
  margin-top: 1.75rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 3vw, 1.35rem);
  color: var(--charcoal-soft);
}

.hero__scroll {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
}
.hero__scroll-line {
  display: block;
  width: 1px;
  height: 3.5rem;
  background: linear-gradient(to bottom, transparent, var(--hazel));
  animation: drift 2.8s var(--ease) infinite;
}
@keyframes drift {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; transform-origin: top; }
  50%      { transform: scaleY(1);   opacity: 1;   transform-origin: top; }
}

/* ———————————————————————————— Slideshow ———————————————————————————— */

.gallery {
  padding: 4rem 1.5rem 6rem;
  display: flex;
  justify-content: center;
}

.gallery__stage {
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  text-align: center;
}

.gallery__frame {
  position: relative;
  /* height-driven so it fits the viewport; the ratio adapts to the active
     item (set by app.js as --frame-ratio), so photos and portrait videos
     each get their own true shape — no cropping. */
  height: min(74vh, 34rem);
  aspect-ratio: var(--frame-ratio, 3 / 4);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 1.1rem;
  overflow: hidden;
  background: var(--cream-deep); /* soft mat behind any letterbox */
  box-shadow:
    0 1px 2px rgba(51,48,43,0.04),
    0 18px 40px -18px rgba(184,134,91,0.35);
  transition: aspect-ratio 0.5s var(--ease);
}

.gallery__frame img,
.gallery__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;                   /* never crop the moment */
  opacity: 0;
  transition: opacity 1.4s var(--ease);  /* crossfade over slide */
}
.gallery__frame img.is-active,
.gallery__frame video.is-active { opacity: 1; }

/* unmute control — quiet, bottom-right, only shown on video slides */
.gallery__sound {
  position: absolute;
  bottom: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: none;
  border-radius: 999px;
  background: rgba(51,48,43,0.42);
  color: var(--cream);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.4s var(--ease), opacity 0.4s var(--ease);
}
.gallery__sound[hidden] { display: none; }
.gallery__sound:hover { background: rgba(184,134,91,0.85); }
.gallery__sound-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}
.gallery__sound::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  background: currentColor;
  /* muted speaker glyph */
  -webkit-mask: var(--sound-icon) center / contain no-repeat;
  mask: var(--sound-icon) center / contain no-repeat;
  --sound-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3 9v6h4l5 5V4L7 9H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4z'/%3E%3C/svg%3E");
}
.gallery__sound.is-on::before {
  --sound-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M3 9v6h4l5 5V4L7 9H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E");
}

.gallery__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--charcoal-soft);
  font-size: 0.85rem;
  opacity: 0.7;
}

.gallery__caption {
  margin-top: 1.5rem;
  min-height: 1.5rem;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  color: var(--charcoal-soft);
  transition: opacity 0.6s var(--ease);
}

.gallery__controls {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.gallery__btn {
  background: none;
  border: 1px solid rgba(184,134,91,0.35);
  color: var(--hazel);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.gallery__btn:hover {
  background: var(--hazel);
  border-color: var(--hazel);
  color: var(--cream);
}

.gallery__dots { display: flex; gap: 0.55rem; }
.gallery__dots button {
  width: 7px; height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(184,134,91,0.3);
  cursor: pointer;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.gallery__dots button.is-active {
  background: var(--hazel);
  transform: scale(1.35);
}

/* ———————————————————————————— Closing ———————————————————————————— */

.closing {
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 7rem;
  gap: 2.5rem;
}

.closing__line {
  max-width: 30rem;
  font-weight: 300;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  line-height: 1.4;
  color: var(--charcoal);
}

.closing__sig {
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--hazel);
}

/* ———————————————————————————— Motion ———————————————————————————— */

/* hero: staged fade-in on load (no bounce, no slide) */
.reveal {
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.reveal.is-in { opacity: 1; }

/* sections: gentle fade + the faintest lift as they enter view */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.reveal-on-scroll.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal, .reveal-on-scroll { opacity: 1; transform: none; }
}
