/* ================================================================
   RIVER VIBES — Design System
   Organic Coastal Editorial · CTE Digital LLC
   ================================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS ── */
:root {
  /* Palette */
  --ink:      #1a2820;
  --forest:   #1f4035;
  --moss:     #2d6048;
  --sage:     #4a8a6a;
  --mist:     #d4e8dc;
  --foam:     #eef5f0;
  --cream:    #f8f4ec;
  --parchment:#f2ece0;
  --amber:    #c47c2e;
  --gold:     #e09840;
  --sand:     #e8dcc8;
  --white:    #ffffff;
  --muted:    #6a7e76;
  --border:   rgba(31,64,53,0.12);
  --border-l: rgba(255,255,255,0.1);

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --nav-h:  68px;
  --pad:    60px;
  --pad-sm: 24px;
  --r:      12px;
  --r-lg:   20px;

  /* Easing */
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ── BASE ── */
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* grain texture overlay on body */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.032'/%3E%3C/svg%3E");
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }
img { display: none !important; } /* No images in this build */

/* ── TYPE SCALE ── */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.0;
}
.display-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 28px; height: 1.5px;
  background: currentColor;
  flex-shrink: 0;
}
.eyebrow-light { color: rgba(255,255,255,0.45); }
.eyebrow-light::before { background: rgba(255,255,255,0.45); }
.eyebrow-amber { color: var(--amber); }
.eyebrow-amber::before { background: var(--amber); }

.h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--ink);
}
.h2 em { font-style: italic; font-weight: 400; color: var(--moss); }
.h2-light { color: var(--white); }
.h2-light em { color: var(--mist); }

.body-text {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 520px;
}
.body-text-light { color: rgba(255,255,255,0.55); }

/* ── SECTION ── */
.section { padding: 96px var(--pad); }
.section-sm { padding: 72px var(--pad); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 13px 28px;
  border-radius: 100px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
              transform 0.16s var(--ease), box-shadow 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(31,64,53,0.25);
}
.btn-primary:hover {
  background: var(--ink);
  box-shadow: 0 8px 28px rgba(31,64,53,0.32);
}

.btn-amber {
  background: var(--amber);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(196,124,46,0.3);
}
.btn-amber:hover {
  background: #a86628;
  box-shadow: 0 8px 24px rgba(196,124,46,0.35);
}

.btn-white {
  background: var(--white);
  color: var(--forest);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.btn-white:hover { background: var(--foam); }

.btn-ghost {
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.6); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--forest);
  color: var(--forest);
}
.btn-outline:hover { background: var(--forest); color: var(--white); }

.btn-outline-sand {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.35);
  color: var(--white);
}
.btn-outline-sand:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); }

.btn-sm  { padding: 9px 20px; font-size: 13px; }
.btn-lg  { padding: 16px 36px; font-size: 15px; }
.btn-full { width: 100%; }

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  transition: background 0.35s var(--ease), border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
  /* Default: transparent (hero top state) */
}

/* Solid nav: triggered by .scrolled class (JS adds this on scroll OR immediately for page-mode) */
#nav.scrolled {
  background: rgba(248,244,236,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--white); /* default: white on dark hero */
  text-decoration: none; letter-spacing: -0.01em;
  transition: color 0.25s; flex-shrink: 0;
}
.nav-logo .dot { color: var(--gold); }

/* When nav is solid, logo goes dark */
#nav.scrolled .nav-logo { color: var(--ink); }
#nav.scrolled .nav-logo .dot { color: var(--amber); }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.78); /* default: white-ish on hero */
  text-decoration: none; transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1.5px; background: var(--amber);
  transform: scaleX(0); transition: transform 0.2s var(--ease);
  transform-origin: left;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--white); }
.nav-links a.active::after { transform: scaleX(1); }

/* Solid nav: links go dark */
#nav.scrolled .nav-links a { color: var(--muted); }
#nav.scrolled .nav-links a:hover { color: var(--ink); }
#nav.scrolled .nav-links a.active { color: var(--ink); }

/* Burger lines: white on hero, dark on solid */
#nav.scrolled .burger span { background: var(--ink); }

.nav-cta-wrap { opacity: 1 !important; }

/* Burger */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; cursor: pointer; }
.burger span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.22s;
}
#nav.scrolled .burger span,

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer */
.drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--cream); z-index: 299;
  padding: 20px 24px 32px;
  display: none; /* shown via .open below */
  flex-direction: column;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.drawer.open {
  display: flex; /* override display:none */
}
.drawer a {
  font-size: 17px; font-weight: 500;
  color: var(--ink); opacity: 0.65;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  display: block; transition: opacity 0.2s, color 0.2s;
}
.drawer a:last-of-type { border-bottom: none; }
.drawer a:hover { opacity: 1; color: var(--forest); }
.drawer .d-cta {
  margin-top: 16px; display: block; text-align: center;
  padding: 14px; border-radius: 100px;
  background: var(--forest); color: var(--white);
  font-weight: 600; font-size: 15px; opacity: 1; border: none;
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: calc(var(--nav-h) + 56px) var(--pad) 72px;
  background: var(--forest);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(196,124,46,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(74,138,106,0.2) 0%, transparent 55%);
  pointer-events: none;
}
/* large decorative letter */
.page-hero::after {
  content: attr(data-letter);
  position: absolute; right: var(--pad); top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(180px, 22vw, 320px);
  color: rgba(255,255,255,0.035);
  line-height: 1; pointer-events: none;
  letter-spacing: -0.04em;
}
.page-hero-inner { position: relative; z-index: 1; max-width: 680px; }
.page-hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(42px, 7vw, 76px);
  color: var(--white); line-height: 1.02;
  letter-spacing: -0.025em; margin-bottom: 16px;
}
.page-hero h1 em { font-style: italic; font-weight: 400; color: var(--mist); }
.page-hero p { font-size: 16px; color: rgba(255,255,255,0.5); line-height: 1.75; max-width: 440px; }

/* ── CARDS — always aligned buttons ── */
/* Any card that needs bottom-aligned button must use these */
.card-flex {
  display: flex;
  flex-direction: column;
}
.card-flex .card-body { flex: 1; } /* spacer that grows */
/* Button in card-flex always gets margin-top: auto via .card-flex .btn */
.card-flex > .btn,
.card-flex > a.btn { margin-top: auto; }

/* ── BADGE ── */
.badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 100px;
}
.b-fruit     { background: #dff0e8; color: #236040; }
.b-wellness  { background: #dde8f0; color: #234a60; }
.b-specialty { background: #f5ead8; color: #7a4a14; }
.b-coffee    { background: #ede4d8; color: #5a3018; }
.b-refresher { background: #d8eaee; color: #185a68; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 7px;
}
.form-ctrl {
  width: 100%; padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font-body); font-size: 15px;
  outline: none; appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-ctrl:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(45,96,72,0.1);
}
.form-ctrl::placeholder { color: var(--muted); opacity: 0.5; }
select.form-ctrl {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236a7e76' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
textarea.form-ctrl { resize: vertical; min-height: 108px; }

.form-success {
  display: none;
  padding: 16px 20px; margin-top: 12px;
  background: #dff0e8; border: 1px solid #a3d4b8;
  border-radius: 10px; color: #236040;
  font-size: 14px; font-weight: 500; text-align: center;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  /* Hard fallback: show after 1.5s regardless of JS */
  animation: revealFallback 0s 1.5s forwards;
}
@keyframes revealFallback { to { opacity: 1; transform: none; } }
.reveal.in {
  opacity: 1 !important;
  transform: none !important;
  animation: none;
}
.d1 { transition-delay: 0.07s; }
.d2 { transition-delay: 0.14s; }
.d3 { transition-delay: 0.21s; }
.d4 { transition-delay: 0.28s; }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  padding: 60px var(--pad) 32px;
}
.foot-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 48px; flex-wrap: wrap;
  padding-bottom: 40px; margin-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.foot-logo-wrap a {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--white); display: block; margin-bottom: 10px;
}
.foot-logo-wrap a .dot { color: var(--gold); }
.foot-logo-wrap p {
  font-size: 13px; color: rgba(255,255,255,0.3);
  line-height: 1.75; max-width: 210px;
}
.foot-socials { display: flex; gap: 8px; margin-top: 18px; }
.foot-soc {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.38); font-size: 12px; font-weight: 700;
  text-decoration: none; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.foot-soc:hover { border-color: var(--gold); color: var(--gold); background: rgba(196,124,46,0.08); }

.foot-nav { display: flex; gap: 52px; flex-wrap: wrap; }
.foot-col h4 {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.22); margin-bottom: 16px;
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a {
  font-size: 14px; color: rgba(255,255,255,0.38);
  text-decoration: none; transition: color 0.2s;
}
.foot-col a:hover { color: rgba(255,255,255,0.85); }
.foot-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 6px; font-size: 12px; color: rgba(255,255,255,0.18);
}
.foot-bottom a { color: rgba(255,255,255,0.22); transition: color 0.2s; }
.foot-bottom a:hover { color: rgba(255,255,255,0.5); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  :root { --nav-h: 62px; --pad: 20px; }
  .nav-links { display: none; }
  .burger { display: flex; } /* show hamburger */
  /* .drawer is display:none by default, display:flex when .open is added by JS */
  .section { padding: 64px var(--pad); }
  .section-sm { padding: 48px var(--pad); }
  .page-hero { padding: calc(var(--nav-h) + 36px) var(--pad) 52px; }
  .page-hero::after { display: none; }
  footer { padding: 48px var(--pad) 28px; }
  .foot-nav { gap: 28px; }
}
