/* ============================================================================
   AD Keukens & Living Design: custom styles
   ----------------------------------------------------------------------------
   Tailwind (loaded via CDN in index.html) handles most layout & spacing.
   This file holds only the brand touches Tailwind can't express cleanly:
   the signature divider, the gold line-art motif, animations, and the
   accessibility floor (focus + reduced motion).
   Brand colours are mirrored here as CSS variables so custom rules can use them.
   ========================================================================== */

:root {
  --noir: #0A0908;
  --noir-soft: #16130E;
  --gold: #C6A15B;
  --gold-bright: #E3C786;
  --cream: #F5F1E8;
  --stone: #9A9489;
}

/* Smooth in-page anchor scrolling, offset so the sticky header doesn't cover
   section titles when you jump to them. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background-color: var(--noir);
  color: var(--cream);
  /* Crisper text on the dark background */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------------------------------------------
   SIGNATURE: the flanked-label divider (eyebrow)
   Echoes the "──── & LIVING DESIGN ────" line from Amra's logo.
   Used above every section title. The thin gold rules grow from the label.
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  display: block;
  width: clamp(1.5rem, 6vw, 3.5rem);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* Wide-tracked uppercase utility (tagline style from the logo) */
.tracked {
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* Hairline gold rule used between some blocks */
.rule-gold {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(198, 161, 91, 0.5), transparent);
}

/* ----------------------------------------------------------------------------
   GOLD LINE-ART MOTIF
   A faint architectural kitchen line-drawing (inline SVG in the HTML) sits
   behind the hero and contact section as quiet atmosphere, never loud.
   -------------------------------------------------------------------------- */
.motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.motif svg {
  position: absolute;
  right: -4%;
  bottom: -6%;
  width: min(60%, 720px);
  height: auto;
  stroke: var(--gold);
  opacity: 0.12;
}

/* Soft gold glow used to lift the hero focal point */
.gold-glow {
  background: radial-gradient(
    ellipse at center,
    rgba(198, 161, 91, 0.16) 0%,
    rgba(198, 161, 91, 0) 60%
  );
}

/* ----------------------------------------------------------------------------
   AD monogram wordmark (header/footer): typographic stand-in for the logo
   image, crisp at any size. Swap for assets/logo.png once preferred.
   -------------------------------------------------------------------------- */
.monogram {
  font-family: "DM Serif Display", serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  line-height: 1;
}

/* ----------------------------------------------------------------------------
   LANGUAGE TOGGLE (NL / EN)
   Colour alone (gold vs stone) was a weak "which is selected?" cue, so the
   active language also gets a thin gold underline. Driven off aria-pressed,
   which script.js already keeps in sync, no extra JS needed.
   -------------------------------------------------------------------------- */
.lang-btn {
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.lang-btn[aria-pressed="true"] {
  border-bottom-color: var(--gold);
  font-weight: 500;
}

/* ----------------------------------------------------------------------------
   CARDS: services & process. Quiet by default, gold edge on hover.
   -------------------------------------------------------------------------- */
.card {
  background-color: var(--noir-soft);
  border: 1px solid rgba(198, 161, 91, 0.14);
  transition: border-color 0.4s ease, transform 0.4s ease;
}
.card:hover {
  border-color: rgba(198, 161, 91, 0.5);
  transform: translateY(-4px);
}

/* Portfolio placeholder tiles: deliberate, premium-looking stand-ins.
   Replace the inner markup with <img> tags when real photos arrive. */
.tile {
  background:
    linear-gradient(135deg, var(--noir-soft) 0%, #0d0b08 100%);
  border: 1px solid rgba(198, 161, 91, 0.14);
  transition: border-color 0.4s ease;
}
.tile:hover {
  border-color: rgba(198, 161, 91, 0.45);
}
.tile .tile-line {
  stroke: var(--gold);
  opacity: 0.28;
  transition: transform 0.6s ease, opacity 0.6s ease;
}
/* Animation #5: internal zoom + caption shift on portfolio tile hover.
   The image/SVG scales up inside the tile (overflow: hidden clips it)
   while the caption slides up. More cinematic than lifting the card. */
.tile:hover .tile-line {
  transform: scale(1.08);
  opacity: 0.4;
}
.tile figcaption {
  transition: transform 0.4s ease;
}
.tile:hover figcaption {
  transform: translateY(-4px);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.tile:hover img {
  transform: scale(1.05);
}

/* ----------------------------------------------------------------------------
   PORTFOLIO SLIDER
   The photos sit in a horizontal scroll area; CSS scroll-snap makes each
   photo click into place, which is what gives the "slide" feel. script.js
   only adds the arrows and the dots, the scrolling itself is native.
   -------------------------------------------------------------------------- */
.werk-slider {
  /* Hide the scrollbar in every browser; swiping/arrows replace it */
  scrollbar-width: none;           /* Firefox */
  -webkit-overflow-scrolling: touch; /* momentum swiping on iOS */
}
.werk-slider::-webkit-scrollbar {
  display: none;                   /* Chrome, Safari, Edge */
}

/* Arrow buttons: dark glass circles with a gold ring, matching the brand */
.werk-arrow {
  background: rgba(10, 9, 8, 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(198, 161, 91, 0.4);
  color: var(--gold);
  transition: border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.werk-arrow:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}
/* On the first/last photo the arrow that leads nowhere fades out */
.werk-arrow.is-disabled {
  opacity: 0.25;
  pointer-events: none;
}

/* Dots under the slider: stone by default, gold for the current photo */
.werk-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(154, 148, 137, 0.4);
  transition: background 0.3s ease, transform 0.3s ease;
}
.werk-dot.is-active {
  background: var(--gold);
  transform: scale(1.2);
}

/* ----------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn-gold {
  background-color: var(--gold);
  color: var(--noir);
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-gold:hover {
  background-color: var(--gold-bright);
  transform: translateY(-2px);
}
.btn-ghost {
  border: 1px solid rgba(198, 161, 91, 0.5);
  color: var(--cream);
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ----------------------------------------------------------------------------
   FORM FIELDS
   -------------------------------------------------------------------------- */
.field {
  background-color: var(--noir);
  border: 1px solid rgba(198, 161, 91, 0.2);
  color: var(--cream);
  transition: border-color 0.3s ease;
}
.field::placeholder { color: rgba(154, 148, 137, 0.7); }
.field:focus {
  outline: none;
  border-color: var(--gold);
  /* Crisp gold ring + faint halo so the active field reads clearly "live".
     Keyboard users still get the separate :focus-visible outline below. */
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 4px rgba(198, 161, 91, 0.12);
}
.field.invalid {
  border-color: #b4593f; /* warm error tone, not a jarring red */
}
.field-error {
  color: #d08a72;
  font-size: 0.8rem;
  min-height: 1rem;
}

/* ----------------------------------------------------------------------------
   ANIMATION
   Page-load wordmark reveal + scroll-triggered reveals. JS adds .is-visible.
   -------------------------------------------------------------------------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-reveal {
  opacity: 0;
  animation: riseIn 1s ease forwards;
}
.hero-reveal.delay-1 { animation-delay: 0.15s; }
.hero-reveal.delay-2 { animation-delay: 0.3s; }
.hero-reveal.delay-3 { animation-delay: 0.45s; }
.hero-reveal.delay-4 { animation-delay: 0.6s; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Animation #1: Gold shimmer sweep on hero headline ---
   A single sweep of light across the gold italic text, 1.3s after
   the hero-reveal finishes. Uses background-clip: text for the effect. */
@keyframes goldShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.hero-shimmer {
  background: linear-gradient(
    120deg,
    var(--gold) 0%,
    var(--gold) 35%,
    var(--gold-bright) 48%,
    #fff 50%,
    var(--gold-bright) 52%,
    var(--gold) 65%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldShimmer 1.2s ease-in-out 1.3s 1 forwards;
}

/* --- Animation #2: Staggered directional card entrance (services) ---
   Left and right variants of the scroll-reveal. Cards slide inward
   from opposing sides to create a "triptych opening" effect. */
.reveal-left {
  opacity: 0;
  transform: translateX(-20px) translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right {
  opacity: 0;
  transform: translateX(20px) translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* --- Animation #4: Process section connecting line ---
   A thin gold gradient line that draws itself left-to-right behind
   the four process steps. Only visible at lg: (4-column layout). */
.process-line {
  position: absolute;
  top: 4.5rem;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(198, 161, 91, 0.4), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s ease;
  display: none;
}
@media (min-width: 1024px) {
  .process-line { display: block; }
}
.process-line.is-visible {
  transform: scaleX(1);
}

/* --- Animation #6: Mid-page CTA ambient glow pulse ---
   A slow-breathing gold glow behind the CTA button. Uses a ::after
   pseudo-element with opacity animation for GPU compositing. */
.cta-glow {
  position: relative;
}
.cta-glow::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: transparent;
  box-shadow: 0 0 28px rgba(198, 161, 91, 0.3);
  opacity: 0;
  animation: glowFade 3s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes glowFade {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* --- Animation #7: Eyebrow divider line-grow on scroll ---
   The flanking lines grow outward from the label text using
   GPU-safe scaleX instead of width animation. */
.eyebrow::before,
.eyebrow::after {
  transform: scaleX(0);
  transition: transform 0.5s ease 0.1s;
}
.eyebrow::before { transform-origin: right; }
.eyebrow::after  { transform-origin: left; }

/* Grow lines when parent section becomes visible via IntersectionObserver */
.is-visible .eyebrow::before,
.is-visible .eyebrow::after {
  transform: scaleX(1);
}
/* Hero eyebrow uses hero-reveal (CSS animation), not .reveal/.is-visible.
   The lines grow once the hero-reveal animation has played. */
.hero-reveal.eyebrow::before,
.hero-reveal.eyebrow::after {
  transform: scaleX(1);
  transition-delay: 0.4s;
}

/* ----------------------------------------------------------------------------
   LIQUID GOLD: WebGL canvas behind the hero, renders flowing metallic gold
   -------------------------------------------------------------------------- */
#liquid-gold {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Dial back canvas brightness so it reads as atmosphere, not foreground.
     The effect stays clearly visible but no longer competes with text. */
  opacity: 0.55;
}

/* Dark overlay between the canvas and hero text. A top-to-bottom gradient
   that's strongest at the top (where the headline sits) and eases off
   toward the bottom. This creates a reliable contrast floor for text. */
.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* Radial vignette: dark edges, lighter center so the gold peeks through */
    radial-gradient(ellipse at 50% 60%, transparent 20%, rgba(10, 9, 8, 0.5) 80%),
    /* Top-down gradient to darken the headline area most */
    linear-gradient(
      to bottom,
      rgba(10, 9, 8, 0.6) 0%,
      rgba(10, 9, 8, 0.35) 40%,
      rgba(10, 9, 8, 0.2) 70%,
      rgba(10, 9, 8, 0.5) 100%
    );
}

/* Text contrast helpers: applied to hero text elements to guarantee
   readability regardless of what the liquid gold is doing underneath. */
.hero-text-shadow {
  text-shadow:
    0 2px 12px rgba(10, 9, 8, 0.8),
    0 1px 3px rgba(10, 9, 8, 0.6);
}
/* The gold italic line needs its own shadow that doesn't muddy the shimmer */
.hero-text-shadow-gold {
  text-shadow:
    0 2px 16px rgba(10, 9, 8, 0.9),
    0 0 30px rgba(10, 9, 8, 0.5);
}

/* ----------------------------------------------------------------------------
   3D TILT CARDS: gold-tinted glare overlay from vanilla-tilt.js
   -------------------------------------------------------------------------- */
.js-tilt-glare-inner {
  background: linear-gradient(
    0deg,
    rgba(198, 161, 91, 0) 0%,
    rgba(198, 161, 91, 0.35) 100%
  ) !important;
}

/* ----------------------------------------------------------------------------
   ACCESSIBILITY FLOOR
   -------------------------------------------------------------------------- */
/* Visible keyboard focus everywhere interactive */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* Respect users who prefer less motion: drop transitions & reveals entirely.
   The blanket * rule kills all CSS animation/transition durations, which
   handles goldShimmer, glowFade, and all transition-based reveals.
   We still need to reset initial opacity/transform so elements are visible. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-reveal { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .reveal-left,
  .reveal-right { opacity: 1; transform: none; }
  /* Show eyebrow lines immediately */
  .eyebrow::before,
  .eyebrow::after { transform: scaleX(1); }
  /* Show hero shimmer text as plain gold */
  .hero-shimmer {
    background: none;
    color: var(--gold);
  }
  /* Show process line immediately */
  .process-line { transform: scaleX(1); }
  /* Hide liquid gold canvas + its overlay (JS won't start it, gold-glow gradient stays) */
  #liquid-gold,
  .hero-overlay { display: none; }
}
