/* ═══════════════════════════════════════════════
   KNL PROJECT — Global Stylesheet
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,700&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --cream:      #FAF6EF;
  --cream-mid:  #F3EDE1;
  --parchment:  #E8DCC8;
  --tan:        #D4C4A8;
  --latte:      #C8A97E;
  --espresso:   #5C2D0E;
  --roast:      #7A3B18;
  --dark:       #2A1208;
  --foam:       #FDF9F4;
  --sage:       #7D9478;
  --rust:       #B5501E;
  --mist:       #F5F0E6;

  /* Text */
  --t-ink:   #1E0E06;
  --t-mid:   #7A5C44;
  --t-light: #B09278;

  /* Fonts */
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --section-v: 6rem;
  --gutter: clamp(1.5rem, 5vw, 5rem);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--t-ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ── GRAIN OVERLAY ── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ── CONTAINER ── */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── TYPOGRAPHY ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--rust);
}
.eyebrow::before {
  content: ''; width: 22px; height: 1.5px;
  background: currentColor; display: block; flex-shrink: 0;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; }

.display-xl {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700; letter-spacing: -0.01em;
}
.display-lg {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 700; letter-spacing: -0.01em;
}
.display-md {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 400;
}
em.accent { font-style: italic; color: var(--roast); }

.lead {
  font-size: 1.05rem; color: var(--t-mid);
  line-height: 1.85; font-weight: 300;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 0.88rem;
  font-weight: 600; letter-spacing: 0.04em;
  border-radius: 60px; padding: 0.82rem 1.9rem;
  border: none; cursor: pointer;
  transition: transform 0.18s ease, background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-espresso {
  background: var(--espresso); color: var(--cream);
  box-shadow: 0 4px 20px rgba(92,45,14,0.25);
}
.btn-espresso:hover { background: var(--dark); box-shadow: 0 8px 28px rgba(42,18,8,0.3); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--espresso);
  color: var(--espresso);
}
.btn-outline:hover { background: var(--espresso); color: var(--cream); }

.btn-latte {
  background: var(--latte); color: var(--dark);
  box-shadow: 0 4px 20px rgba(200,169,126,0.35);
}
.btn-latte:hover { background: var(--cream); color: var(--espresso); }

.btn-ghost {
  background: transparent; color: var(--cream);
  border: 1.5px solid rgba(249,244,236,0.35);
}
.btn-ghost:hover { background: rgba(249,244,236,0.1); border-color: rgba(249,244,236,0.6); }

/* ── TAGS / PILLS ── */
.pill {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 40px;
}
.pill-rust  { color: var(--rust);  background: rgba(181,80,30,0.09); }
.pill-sage  { color: var(--sage);  background: rgba(125,148,120,0.12); }
.pill-latte { color: var(--roast); background: rgba(200,169,126,0.18); }

/* ══════════════════
   NAVIGATION
══════════════════ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem var(--gutter);
  background: rgba(250,246,239,0.88);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, padding 0.3s;
}
#nav.scrolled {
  border-color: var(--parchment);
  box-shadow: 0 2px 32px rgba(42,18,8,0.08);
  padding-top: 0.9rem; padding-bottom: 0.9rem;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.55rem; font-weight: 700;
  color: var(--espresso); letter-spacing: 0.01em;
}
.nav-logo .dot { color: var(--latte); font-style: italic; }

.nav-links {
  display: flex; align-items: center;
  gap: 2.5rem; list-style: none;
}
.nav-links a {
  font-size: 0.84rem; font-weight: 500;
  color: var(--t-mid); letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0; right: 100%;
  height: 1px; background: var(--espresso);
  transition: right 0.2s ease;
}
.nav-links a:hover { color: var(--espresso); }
.nav-links a:hover::after { right: 0; }
.nav-links a.active { color: var(--espresso); }
.nav-links a.active::after { right: 0; }

.nav-cta {
  background: var(--espresso) !important;
  color: var(--cream) !important;
  padding: 0.52rem 1.35rem !important;
  border-radius: 50px !important;
  font-size: 0.82rem !important; font-weight: 600 !important;
  transition: background 0.2s, transform 0.18s !important;
}
.nav-cta:hover { background: var(--dark) !important; transform: translateY(-1px) !important; }
.nav-cta::after { display: none !important; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 1.5px;
  background: var(--espresso); border-radius: 2px;
  transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--parchment);
    padding: 1rem 0 1.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 0.75rem var(--gutter);
    font-size: 1rem;
  }
  .nav-links a::after { display: none; }
  .nav-cta { margin: 0.5rem var(--gutter) 0 !important; display: inline-block !important; }
}

/* ══════════════════
   FOOTER
══════════════════ */
#footer {
  background: var(--dark);
  padding: 4rem var(--gutter) 2rem;
  position: relative; overflow: hidden;
}
#footer::before {
  content: 'knlproject';
  position: absolute; bottom: -1rem; right: -1rem;
  font-family: var(--serif); font-size: 8rem; font-weight: 700;
  color: rgba(200,169,126,0.04); white-space: nowrap;
  pointer-events: none; user-select: none;
  line-height: 1;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid rgba(200,169,126,0.12);
}
.footer-brand .nav-logo { display: inline-block; margin-bottom: 1rem; color: var(--cream); }
.footer-brand p { font-size: 0.85rem; color: rgba(249,244,236,0.45); line-height: 1.8; font-weight: 300; max-width: 260px; }
.footer-col h4 {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--latte);
  margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a { font-size: 0.85rem; color: rgba(249,244,236,0.5); transition: color 0.2s; }
.footer-col a:hover { color: var(--latte); }
.footer-bottom {
  max-width: 1200px; margin: 2rem auto 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(249,244,236,0.28); }
.footer-bottom a { font-size: 0.78rem; color: rgba(249,244,236,0.35); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--latte); }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ══════════════════
   REVEAL ANIMATIONS
══════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-left {
  opacity: 0; transform: translateX(-30px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal-left.visible { opacity: 1; transform: none; }
.reveal-right {
  opacity: 0; transform: translateX(30px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal-right.visible { opacity: 1; transform: none; }

/* delay helpers */
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }
.d5 { transition-delay: 0.5s; }