/* =====================================================================
   VILLICANA TRANSPORTATION
   main.css · tokens, reset, typography, navbar, ticker, footer, utils
   Built around the logo's colors: forest, leaf, gold.
   ===================================================================== */

@import url("https://cdn-uicons.flaticon.com/2.6.0/uicons-regular-straight/css/uicons-regular-straight.css");

/* ---------- TOKENS ---------- */
:root {
  /* Pulled from the logo — green pops */
  --forest:      #4A9F2D;   /* PRIMARY — vivid, popping green */
  --forest-2:    #3D8226;   /* mid green for hover */
  --forest-deep: #234C18;   /* dark forest only for backgrounds */
  --leaf:        #6FB341;   /* lighter accent */
  --leaf-2:      #58932F;   /* mid green */
  --gold:        #E8B530;   /* the wordmark, warm */
  --gold-2:      #C7951A;   /* deeper gold for hover */
  --gold-soft:   #F4D886;   /* tint */

  /* Neutral system — clean white */
  --ink:         #0F140A;   /* near-black, slightly warm-green */
  --ink-2:       #2A2F22;
  --bone:        #FFFFFF;   /* page white */
  --bone-2:      #F4F5F1;   /* very subtle off-white for alternation */
  --field:       #FFFFFF;   /* page white */
  --rule:        rgba(15, 20, 10, 0.10);
  --rule-soft:   rgba(15, 20, 10, 0.05);
  --rule-bone:   rgba(255, 255, 255, 0.18);

  /* Type */
  --f-display:   "Playfair Display", "Times New Roman", serif;
  --f-body:      "DM Sans", system-ui, sans-serif;
  --f-mono:      "DM Mono", ui-monospace, monospace;

  /* Layout */
  --maxw:        min(1320px, 92vw);
  --gutter:      clamp(1.25rem, 3vw, 2.5rem);

  /* Motion */
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 450;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--field);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.01em;
}
p { margin: 0; }

/* ---------- GRAIN OVERLAY (very subtle) ---------- */
.villi-grain-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  opacity: 0.10; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.06  0 0 0 0 0.07  0 0 0 0 0.04  0 0 0 0.85 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- TICKER ---------- */
.villi-ticker {
  position: relative; z-index: 60;
  background: var(--ink);
  color: var(--bone);
  border-bottom: 1px solid var(--rule-bone);
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.villi-ticker-track {
  display: flex; gap: 3.5rem;
  white-space: nowrap;
  padding: 0.65rem 0;
  animation: ticker-slide 42s linear infinite;
  width: max-content;
}
.villi-ticker-track span { display: inline-flex; align-items: center; gap: 0.65rem; }
.villi-ticker-track i { font-size: 8px; color: var(--gold); transform: translateY(1px); }
@keyframes ticker-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- NAVBAR ---------- */
.villi-navbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bone);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.4s var(--ease);
}
.villi-navbar.scrolled { box-shadow: 0 16px 40px -28px rgba(20,24,14,0.4); }
.villi-navbar-container {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 1.5rem;
  padding: 1rem var(--gutter);
}

.villi-navbar-left {
  display: flex; align-items: center; gap: 1.25rem;
  border-right: 1px solid var(--rule);
  padding-right: 1.25rem;
}
.villi-navbar-logo img {
  height: 38px; width: auto;
  filter: contrast(1.05);
}
.villi-navbar-logo-secondary {
  position: relative; padding-left: 1.25rem;
  display: flex; align-items: center;
}
.villi-navbar-logo-secondary::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1px; height: 22px; background: var(--rule); transform: translateY(-50%);
}
.villi-navbar-logo-secondary img { height: 28px; opacity: 0.85; transition: opacity 0.3s var(--ease); }
.villi-navbar-logo-secondary:hover img { opacity: 1; }

.villi-navbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 2rem; }
.villi-navbar-menu {
  display: flex; align-items: center; gap: 1.85rem;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
}
.villi-navbar-link {
  position: relative;
  color: var(--ink);
  padding: 0.4rem 0;
  transition: color 0.3s var(--ease);
}
.villi-navbar-link::before {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1px; background: var(--forest);
  transition: right 0.45s var(--ease);
}
.villi-navbar-link:hover::before,
.villi-navbar-link.active::before { right: 0; }
.villi-navbar-link.active { color: var(--forest); }

/* Buttons (gold-driven) */
.villi-btn-primary,
.villi-navbar-btn,
.villi-hero-btn,
.villi-cta-btn,
.villi-mobile-btn {
  display: inline-flex; align-items: center; gap: 0.65rem;
  background: var(--forest);
  color: var(--bone);
  padding: 0.95rem 1.5rem;
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--forest);
  position: relative;
  overflow: hidden;
  transition: color 0.45s var(--ease), background 0.45s var(--ease), border-color 0.45s var(--ease);
}
.villi-btn-primary::before,
.villi-navbar-btn::before,
.villi-hero-btn::before,
.villi-cta-btn::before,
.villi-mobile-btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease);
  z-index: 0;
}
.villi-btn-primary > *,
.villi-navbar-btn > *,
.villi-hero-btn > *,
.villi-cta-btn > *,
.villi-mobile-btn > * { position: relative; z-index: 1; }
.villi-btn-primary:hover::before,
.villi-navbar-btn:hover::before,
.villi-hero-btn:hover::before,
.villi-cta-btn:hover::before,
.villi-mobile-btn:hover::before { transform: translateY(0); }
.villi-btn-primary:hover,
.villi-navbar-btn:hover,
.villi-hero-btn:hover,
.villi-cta-btn:hover,
.villi-mobile-btn:hover {
  color: var(--ink);
  border-color: var(--gold);
}

/* Mobile toggle */
.villi-navbar-mobile-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--rule);
  align-items: center; justify-content: center;
  font-size: 16px;
  transition: background 0.3s var(--ease);
}
.villi-navbar-mobile-toggle:hover { background: var(--bone-2); }

.villi-navbar-mobile-menu {
  position: fixed; top: 0; right: 0;
  width: min(420px, 100vw); height: 100vh;
  background: var(--ink);
  color: var(--bone);
  padding: 5rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.55s var(--ease);
  z-index: 55;
  display: flex; flex-direction: column; justify-content: space-between;
}
.villi-navbar-mobile-menu.active { transform: translateX(0); }
.villi-mobile-nav { display: flex; flex-direction: column; gap: 0.4rem; }
.villi-mobile-link {
  font-family: var(--f-display);
  font-size: 2.1rem; font-weight: 500;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule-bone);
  transition: padding 0.4s var(--ease), color 0.4s var(--ease);
}
.villi-mobile-link::before { content: "→ "; opacity: 0; transition: opacity 0.3s var(--ease); color: var(--gold); }
.villi-mobile-link:hover { padding-left: 0.5rem; color: var(--gold); }
.villi-mobile-link:hover::before { opacity: 1; }

.villi-mobile-cta { padding-top: 2rem; }
.villi-mobile-btn { width: 100%; justify-content: center; background: var(--gold); color: var(--ink); border-color: var(--gold); }
.villi-mobile-btn::before { background: var(--bone); }
.villi-mobile-btn:hover { color: var(--ink); border-color: var(--bone); }

/* ---------- FOOTER ---------- */
.villi-footer {
  background: var(--ink);
  color: var(--bone);
  padding: 5rem 0 2rem;
  position: relative;
}
.villi-footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 24px, transparent 24px 48px);
  opacity: 0.55;
}
.villi-footer-container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.villi-footer-manifest {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 2rem; margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule-bone);
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bone-2); opacity: 0.8;
  flex-wrap: wrap; gap: 1rem;
}
.villi-footer-manifest strong { color: var(--gold); font-weight: 500; }

.villi-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 3rem;
}
.villi-footer-column { display: flex; flex-direction: column; gap: 1.2rem; }
.villi-footer-logo img { height: 44px; width: auto; }
.villi-footer-description {
  font-family: var(--f-display);
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--bone);
  max-width: 30ch;
  font-style: italic;
  font-weight: 400;
}
.villi-footer-description em {
  display: block;
  font-size: 0.95rem;
  color: var(--gold-soft);
  font-style: italic;
  font-weight: 400;
  margin-top: 0.25rem;
  letter-spacing: 0.01em;
}
.villi-footer-title {
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule-bone);
  margin-bottom: 0.4rem;
}
.villi-footer-links { display: flex; flex-direction: column; gap: 0.55rem; }
.villi-footer-links a {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 14.5px;
  color: var(--bone-2);
  transition: color 0.3s var(--ease), padding 0.3s var(--ease);
}
.villi-footer-links a i { font-size: 9px; color: var(--leaf); transform: translateY(-1px); }
.villi-footer-links a:hover { color: var(--gold); padding-left: 0.4rem; }

.villi-contact-info { display: flex; flex-direction: column; gap: 0.85rem; }
.villi-contact-item {
  display: grid; grid-template-columns: 18px 1fr; gap: 0.75rem;
  align-items: start;
  font-size: 14px; color: var(--bone-2); line-height: 1.45;
}
.villi-contact-item i { color: var(--gold); font-size: 13px; margin-top: 4px; }

.villi-footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--rule-bone);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-2); opacity: 0.7;
}
.villi-footer-links-bottom span { color: var(--gold); transition: color 0.3s var(--ease); }
.villi-footer-links-bottom a:hover span { color: var(--bone); }

/* ---------- SCROLL TO TOP ---------- */
.villi-scroll-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 48px; height: 48px;
  background: var(--ink); color: var(--gold);
  border: 1px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  z-index: 40;
  opacity: 0; pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s var(--ease);
}
.villi-scroll-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.villi-scroll-to-top:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* ---------- UTILITY ANIMATIONS ---------- */
.anim-fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.anim-fade-up.animate { opacity: 1; transform: translateY(0); }

/* ---------- SHARED MOTIFS ---------- */
.villi-section-mark {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--leaf-2);
}
.villi-section-mark::before {
  content: ""; width: 28px; height: 1px; background: currentColor;
}
.villi-section-mark em {
  font-style: normal;
  color: var(--ink-2); opacity: 0.6;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .villi-navbar-menu, .villi-navbar-cta { display: none; }
  .villi-navbar-mobile-toggle { display: inline-flex; }
  .villi-navbar-container { grid-template-columns: 1fr auto; }
  .villi-footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .villi-footer-grid { grid-template-columns: 1fr; }
  .villi-footer-bottom { justify-content: center; text-align: center; }
  .villi-footer-manifest { font-size: 10px; }
  .villi-navbar-left { padding-right: 0.75rem; gap: 0.75rem; }
  .villi-navbar-logo img { height: 32px; }
  .villi-navbar-logo-secondary img { height: 22px; }
  .villi-scroll-to-top { bottom: 1rem; right: 1rem; }
}
