/* ============================================================
   Dalpat Provisions  ·  Heritage Luxury Provisions House
   Custom design layer (works alongside Tailwind utilities)
   Palette derived from the brand mark gold #CA9A5C
   ============================================================ */

:root {
  /* Brand gold scale */
  --gold:        #CA9A5C;
  --gold-deep:   #B8843E;
  --gold-dark:   #9A6B2A;
  --gold-light:  #E4C691;
  --gold-pale:   #F2E2C4;

  /* Light surfaces (off-white, never pure) */
  --cream:   #FBF6EC;
  --cream-2: #F4EAD9;
  --sand:    #EFE2CC;

  /* Dark surfaces (off-black, warm) */
  --espresso:   #1E170E;
  --espresso-2: #2A2014;
  --espresso-3: #38291A;

  /* Ink + text */
  --ink:      #211A10;
  --ink-soft: #4A3F30;
  --muted:    #8B7C66;
  --muted-on-dark: #C8B79C;

  /* System */
  --r-card: 22px;
  --r-sm:   14px;
  --r-pill: 999px;
  --shadow-soft: 0 18px 50px -24px rgba(60, 40, 12, 0.45);
  --shadow-lift: 0 34px 70px -30px rgba(60, 40, 12, 0.55);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gold-grad: linear-gradient(135deg, #E4C691 0%, #CA9A5C 46%, #9A6B2A 100%);
  --gold-grad-soft: linear-gradient(135deg, #F2E2C4 0%, #D9B57E 100%);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--cream);
  color: var(--ink);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #fff; }

.font-display { font-family: 'Cormorant', Georgia, serif; }

/* Hugeicons inline icon wrapper */
.hi-ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; flex: 0 0 auto; }
.hi-ico svg { display: block; width: 100%; height: 100%; }

/* Atmospheric base gradient on the light canvas */
.canvas-warm {
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(202,154,92,0.18), transparent 55%),
    radial-gradient(90% 80% at -10% 10%, rgba(228,198,145,0.22), transparent 50%),
    var(--cream);
}

/* ---------- Film grain overlay (fixed, non-interactive) ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold-deep);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--gold-light); }
.eyebrow.on-dark::before { background: var(--gold); }
.eyebrow.centered::after {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold-deep);
  display: inline-block;
}

.display-xl {
  font-family: 'Cormorant', Georgia, serif;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.015em;
  font-size: clamp(2.9rem, 7vw, 5.6rem);
}
.display-lg {
  font-family: 'Cormorant', Georgia, serif;
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.01em;
  font-size: clamp(2.4rem, 5vw, 4rem);
}
.accent-italic {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-dark);
}
.accent-italic.on-dark { color: var(--gold-light); }

.lead {
  font-size: clamp(1.05rem, 1.3vw, 1.22rem);
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 56ch;
}
.lead.on-dark { color: var(--muted-on-dark); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border-radius: var(--r-pill);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  will-change: transform;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.985); }

.btn-gold {
  background: var(--gold-grad);
  color: #2b1d08;
  box-shadow: 0 14px 30px -14px rgba(154,107,42,0.85);
}
.btn-gold:hover {
  box-shadow: 0 22px 46px -16px rgba(154,107,42,0.95);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(33,26,16,0.22);
}
.btn-ghost:hover {
  border-color: var(--gold-deep);
  color: var(--gold-dark);
  transform: translateY(-2px);
}
.btn-ghost.on-dark { color: var(--cream); border-color: rgba(244,234,217,0.28); }
.btn-ghost.on-dark:hover { border-color: var(--gold-light); color: var(--gold-light); }

.btn-outline-gold {
  background: transparent;
  color: var(--gold-light);
  border-color: rgba(202,154,92,0.5);
}
.btn-outline-gold:hover { background: rgba(202,154,92,0.12); border-color: var(--gold); transform: translateY(-2px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 76px;
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), height 0.4s var(--ease),
              backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  height: 64px;
  background: rgba(251,246,236,0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: rgba(154,107,42,0.16);
  box-shadow: 0 10px 30px -22px rgba(60,40,12,0.5);
}
.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.4rem 0;
  transition: color 0.3s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--gold-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover { color: var(--gold-dark); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--gold-dark); }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(30,23,14,0.96);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.mobile-drawer.open { opacity: 1; visibility: visible; }
.mobile-drawer a {
  font-family: 'Cormorant', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  padding: 0.5rem 1rem;
  opacity: 0;
  transform: translateY(14px);
  transition: color 0.3s, opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.mobile-drawer.open a { opacity: 1; transform: translateY(0); }
.mobile-drawer a:hover { color: var(--gold-light); }
.mobile-drawer.open a:nth-child(1){ transition-delay: 0.06s; }
.mobile-drawer.open a:nth-child(2){ transition-delay: 0.12s; }
.mobile-drawer.open a:nth-child(3){ transition-delay: 0.18s; }
.mobile-drawer.open a:nth-child(4){ transition-delay: 0.24s; }
.mobile-drawer.open a:nth-child(5){ transition-delay: 0.30s; }
.mobile-drawer.open a:nth-child(6){ transition-delay: 0.36s; }

.burger { width: 26px; height: 16px; position: relative; cursor: pointer; }
.burger span {
  position: absolute; left: 0; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease), background 0.3s;
}
.burger span:nth-child(1){ top: 0; }
.burger span:nth-child(2){ top: 7px; }
.burger span:nth-child(3){ top: 14px; }
.burger.open span { background: var(--cream); }
.burger.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2){ opacity: 0; }
.burger.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 55% at 78% 18%, rgba(202,154,92,0.30), transparent 60%),
    radial-gradient(55% 50% at 12% 82%, rgba(228,198,145,0.28), transparent 60%),
    radial-gradient(40% 40% at 60% 100%, rgba(154,107,42,0.10), transparent 60%);
  animation: meshFloat 16s ease-in-out infinite alternate;
}
@keyframes meshFloat {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-2%, 1.5%, 0) scale(1.08); }
}

.hero-frame {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(202,154,92,0.25);
}
.hero-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,247,232,0.06), rgba(30,23,14,0.34));
}
.hero-badge {
  position: absolute;
  background: rgba(251,246,236,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(202,154,92,0.3);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-soft);
}

.logo-watermark {
  position: absolute;
  opacity: 0.05;
  pointer-events: none;
  filter: saturate(0.6);
}

/* ---------- Reveal / intro (GSAP-driven; hidden pre-animation, no FOUC) ---------- */
.has-js .reveal,
.has-js [data-hero] { opacity: 0; }
.reveal { will-change: transform, opacity; }

/* ---------- Parallax ---------- */
[data-parallax] { will-change: transform; }
.px-frame { position: relative; overflow: hidden; }
.px-img {
  position: absolute;
  left: 0; top: -14%;
  width: 100%; height: 128%;
  object-fit: cover;
}

/* ---------- Marquee (single, allowed) ---------- */
.marquee {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  font-family: 'Cormorant', serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  color: var(--ink-soft);
  padding: 0 1.5rem;
  white-space: nowrap;
  opacity: 0.85;
}
.mq-dot {
  align-self: center;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
  flex: 0 0 auto;
}
.marquee-mask {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

/* ---------- Cards ---------- */
.card-soft {
  background: rgba(255,252,245,0.7);
  border: 1px solid rgba(154,107,42,0.16);
  border-radius: var(--r-card);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.card-soft:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(202,154,92,0.4);
}

/* Product bento cells */
.bento-cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 1px solid rgba(154,107,42,0.16);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
  min-height: 250px;
}
.bento-cell:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.bento-cell .cell-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.02);
  transition: transform 0.9s var(--ease);
}
.bento-cell:hover .cell-img { transform: scale(1.1); }
.bento-cell .cell-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,23,14,0.15) 0%, rgba(30,23,14,0.78) 78%);
}
.bento-gradient {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(228,198,145,0.55), transparent 55%),
    linear-gradient(160deg, var(--cream) 0%, var(--sand) 100%);
}
.cell-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gold-grad);
  color: #2b1d08;
  box-shadow: 0 12px 24px -12px rgba(154,107,42,0.8);
}
.cell-icon.on-dark { box-shadow: 0 12px 24px -10px rgba(0,0,0,0.6); }
.chip {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: rgba(202,154,92,0.12);
  border: 1px solid rgba(202,154,92,0.22);
  padding: 0.28rem 0.7rem;
  border-radius: var(--r-pill);
  margin: 0.18rem 0.18rem 0 0;
}
.chip.on-dark { color: var(--gold-pale); background: rgba(202,154,92,0.16); border-color: rgba(202,154,92,0.3); }

/* ---------- Stats ---------- */
.stat-num {
  font-family: 'Cormorant', serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 4.5vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--gold-dark);
}
.stat-num.on-dark { color: var(--gold-light); }

/* ---------- Values pills ---------- */
.value-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--r-pill);
  background: rgba(255,252,245,0.8);
  border: 1px solid rgba(154,107,42,0.2);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s;
}
.value-pill:hover {
  transform: translateY(-3px);
  background: var(--gold-grad);
  color: #2b1d08;
  border-color: transparent;
}
.value-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.value-pill:hover .dot { background: #2b1d08; }

/* ---------- Dark sections ---------- */
.section-dark {
  position: relative;
  background: var(--espresso);
  color: var(--cream);
  overflow: hidden;
}
.section-dark .dark-glow {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(50% 60% at 85% 8%, rgba(202,154,92,0.22), transparent 60%),
    radial-gradient(45% 55% at 5% 95%, rgba(154,107,42,0.18), transparent 60%);
}
.client-card {
  position: relative;
  border-radius: var(--r-card);
  border: 1px solid rgba(202,154,92,0.22);
  background: linear-gradient(165deg, rgba(56,41,26,0.55), rgba(30,23,14,0.4));
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
  overflow: hidden;
}
.client-card:hover {
  transform: translateY(-7px);
  border-color: rgba(228,198,145,0.55);
  background: linear-gradient(165deg, rgba(72,52,30,0.7), rgba(40,30,18,0.5));
}
.client-num {
  font-family: 'Cormorant', serif;
  font-size: 1rem;
  color: var(--gold-light);
  letter-spacing: 0.2em;
}

/* ---------- USP rows ---------- */
.usp-item {
  display: flex;
  gap: 1.1rem;
  padding: 1.5rem 0.2rem;
  border-top: 1px solid rgba(154,107,42,0.18);
  transition: padding-left 0.4s var(--ease);
}
.usp-item:hover { padding-left: 0.9rem; }
.usp-ico {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(202,154,92,0.14);
  border: 1px solid rgba(202,154,92,0.28);
  color: var(--gold-dark);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.usp-item:hover .usp-ico { background: var(--gold-grad); color: #2b1d08; transform: rotate(-6deg) scale(1.05); }

/* ---------- Timeline (left rail, asymmetric) ---------- */
.tl2 { position: relative; }
.tl2::before {
  content: ""; position: absolute;
  left: 9px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, transparent, rgba(202,154,92,0.55) 5%, rgba(202,154,92,0.55) 95%, transparent);
}
.tl2-item { position: relative; padding-left: 3.2rem; padding-bottom: 3rem; }
.tl2-item:last-child { padding-bottom: 0; }
.tl2-dot {
  position: absolute; left: 1px; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: 0 0 0 5px var(--cream), 0 0 0 6px rgba(202,154,92,0.35);
}
.tl2-year {
  font-family: 'Cormorant', serif; font-weight: 600;
  font-size: 1.9rem; line-height: 1; color: var(--gold-dark);
}

/* ---------- Contact ---------- */
.phone-link {
  font-family: 'Cormorant', serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.4s var(--ease), letter-spacing 0.4s var(--ease);
  display: inline-block;
}
.phone-link:hover { color: var(--gold-light); letter-spacing: 0.03em; }

.contact-tile {
  border: 1px solid rgba(202,154,92,0.25);
  border-radius: var(--r-card);
  background: linear-gradient(165deg, rgba(56,41,26,0.4), rgba(30,23,14,0.2));
}

/* Magnetic helper (JS-driven transform) */
.magnetic { transition: transform 0.45s var(--ease); }

/* ---------- Forms ---------- */
.field-label {
  display: block;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--ink-soft);
  margin-bottom: 0.45rem;
}
.field-label .req { color: var(--gold-dark); }
.input {
  width: 100%;
  background: rgba(255, 252, 245, 0.75);
  border: 1px solid rgba(154, 107, 42, 0.25);
  border-radius: var(--r-sm);
  padding: 0.85rem 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.input::placeholder { color: var(--muted); }
.input:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(202, 154, 92, 0.18);
  background: #fffdf8;
}
select.input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239A6B2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  padding-right: 2.6rem;
}
textarea.input { resize: vertical; min-height: 130px; }
.form-success {
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(202, 154, 92, 0.14);
  border: 1px solid rgba(202, 154, 92, 0.35);
  color: var(--gold-dark);
  border-radius: var(--r-sm);
  padding: 0.85rem 1rem; font-size: 0.92rem; font-weight: 500;
  margin-top: 1rem;
}
.map-frame {
  border: 1px solid rgba(154, 107, 42, 0.25);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  filter: saturate(0.92) contrast(1.02);
}
.map-frame iframe { display: block; width: 100%; border: 0; }

/* hairline divider */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, rgba(154,107,42,0.4), transparent); }

/* Scroll progress (CSS scroll-driven, no JS scroll listener) */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px; width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--gold-grad);
  z-index: 101;
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: growProgress linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes growProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Footer */
.footer-link {
  color: var(--muted-on-dark);
  text-decoration: none;
  transition: color 0.3s var(--ease);
  font-size: 0.95rem;
}
.footer-link:hover { color: var(--gold-light); }

/* ---------- Focus accessibility ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, [data-hero] { opacity: 1 !important; transform: none !important; }
  .hero-mesh, .marquee { animation: none !important; }
}
