/* =====================================================================
   Fernando Gonçalves Fotografia — site.css
   Custom CSS not expressible as Tailwind utilities.
   Tailwind CDN handles utility classes; this file handles everything else.
   ===================================================================== */

/* ---------- CSS Custom Properties (Design Tokens) -------------------- */
:root {
  --bg: 40 10% 95%;
  --fg: 217 27% 26%;
  --card: 40 10% 97%;
  --card-foreground: 217 27% 26%;
  --muted: 32 20% 90%;
  --muted-foreground: 217 15% 38%;
  --border: 32 14% 84%;
  --ring: 217 27% 26%;

  --brand-navy:      217 27% 26%;   /* #303E54 */
  --brand-caramel:   28 37% 50%;    /* #AE7C50 */
  --brand-sand:      34 32% 74%;    /* #D2C0A8 */
  --brand-brown:     19 50% 28%;    /* #6B3B24 */
  --brand-off-white: 40 10% 95%;    /* #F3F2F0 */

  /* Legacy aliases */
  --brand-graphite:  217 27% 26%;
  --brand-warm:      40 10% 95%;
  --brand-champagne: 34 32% 90%;
  --brand-ocean:     28 37% 50%;

  --primary:             217 27% 26%;
  --primary-foreground:  40 10% 97%;
  --secondary:           32 20% 90%;
  --secondary-foreground:217 27% 26%;
  --accent:              28 37% 50%;
  --accent-foreground:   40 10% 97%;

  --radius: 14px;
  --shadow-soft:  0 10px 30px rgba(48,62,84,0.10);
  --shadow-float: 0 18px 60px rgba(48,62,84,0.18);

  --container: 1120px;
  --gutter: 24px;
  --section-y: clamp(56px, 7vw, 120px);

  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  --overlay-top:  rgba(8,12,20,0.75);
  --overlay-mid:  rgba(8,12,20,0.45);
  --overlay-bot:  rgba(8,12,20,0.80);
  --overlay-soft: rgba(8,12,20,0.35);
}

/* ---------- Base Reset & Typography ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: hsl(var(--bg));
  color: hsl(var(--fg));
  font-family: 'Figtree', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: 'rlig' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Cormorant Garamond', ui-serif, serif;
  letter-spacing: -0.01em;
  font-weight: 600;
}

::selection {
  background: hsl(var(--brand-caramel) / 0.32);
  color: hsl(var(--fg));
}

/* ---------- Marquee: infinite horizontal scroll (right → left) -------- */
.marquee {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee-scroll 45s linear infinite;
  will-change: transform;
}

@media (min-width: 768px) {
  .marquee-track { gap: 24px; animation-duration: 55s; }
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-item {
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 420ms cubic-bezier(0.16, 1, 0.3, 1),
    z-index 0s;
}

.marquee-item:hover {
  transform: scale(1.15);
  z-index: 2;
  box-shadow: 0 24px 60px rgba(48,62,84,0.28);
}

@keyframes marquee-scroll {
  0%   { transform: translate3d(0,0,0); }
  100% { transform: translate3d(-50%,0,0); }
}

/* ---------- Chapter overlays (packages page) -------------------------- */
.chapter-overlay {
  background: linear-gradient(
    180deg,
    var(--overlay-top) 0%,
    var(--overlay-mid) 40%,
    var(--overlay-bot) 100%
  );
}

[data-chapter]::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 15vh;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0) 100%);
  z-index: 2;
  pointer-events: none;
}

[data-chapter]::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 15vh;
  background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0) 100%);
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 767px) {
  [data-chapter] {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
  [data-chapter-bg] > div {
    background-size: cover !important;
    background-position: center center !important;
  }
  [data-chapter]::before {
    height: 20vh;
    background: linear-gradient(to bottom, rgba(10,10,10,0.98) 0%, rgba(10,10,10,0) 100%);
  }
  [data-chapter]::after {
    height: 20vh;
    background: linear-gradient(to top, rgba(10,10,10,0.98) 0%, rgba(10,10,10,0) 100%);
  }
  .chapter-overlay {
    background: linear-gradient(
      180deg,
      rgba(10,10,10,0.70) 0%,
      rgba(10,10,10,0.45) 35%,
      rgba(10,10,10,0.88) 100%
    );
  }
  [data-chapter-copy] {
    display: flex;
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 2rem;
    min-height: 100vh;
  }
}

/* ---------- Noise texture overlay ------------------------------------- */
.noise-overlay {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.06;
  pointer-events: none;
}

/* ---------- Hero gradient wash ---------------------------------------- */
.hero-wash {
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(247,229,225,0.55) 0%, rgba(241,238,232,0.0) 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(169,207,231,0.35) 0%, rgba(241,238,232,0.0) 55%),
    hsl(var(--brand-graphite));
}

/* ---------- Behold widget theming ------------------------------------- */
behold-widget {
  --behold-row-gap: 12px;
  --behold-col-gap: 12px;
  --behold-border-radius: 12px;
}

@media (min-width: 768px) {
  behold-widget {
    --behold-row-gap: 16px;
    --behold-col-gap: 16px;
  }
}

/* ---------- Mobile hero background ------------------------------------ */
@media (max-width: 767px) {
  .hero-new-bg { background-position: 65% center !important; }
  .bg-package,
  .bg-hero {
    background-position: center center !important;
    background-size: cover !important;
    background-attachment: scroll;
  }
}

/* ---------- Noise utility class (replaces inline SVG) ----------------- */
.noise-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ---------- Reduced motion -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
  *,*::before,*::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
