/* ============================================================
   Árbol Communication Group — shared stylesheet
   Tailwind CDN handles utilities; this file holds brand system,
   custom components, and animation that Tailwind can't express.
   ============================================================ */

:root {
  --ink:            #1a1715;
  --ink-deep:        #100e0c;
  --ink-soft:        #2c2622;
  --cream:           #f5efe6;
  --paper:           #faf7f2;
  --sand:            #e8ddc9;
  --sand-deep:       #ddcfb2;
  --terracotta:      #c1502e;
  --terracotta-dark: #96391f;
  --terracotta-pale: #e8b39d;
  --forest:          #1f3d2b;
  --forest-deep:     #142a1d;
  --forest-pale:     #6f8a78;
  --stone:           #6b6259;
  --stone-pale:      #948a7c;
  --line:            #ddd0ba;
  --line-dark:       #3a332d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.display { font-family: 'Bricolage Grotesque', 'Work Sans', sans-serif; }

::selection { background: var(--terracotta); color: var(--cream); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--terracotta-dark); }

a { color: inherit; }

/* ─── reveal-on-load: pure time-based CSS, visible-by-default ───
   (scroll-linked animation-timeline:view() was dropped — full-page
   screenshot capture and some browsers never resolve the timeline,
   leaving content permanently at the 0% opacity keyframe) */
@keyframes revealIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: revealIn 0.7s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none !important; }
}

/* ─── NAV ─── */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  transition: background .4s ease, padding .4s ease, border-color .4s ease;
  padding: 26px 0;
}
#site-nav.scrolled {
  background: rgba(245, 239, 230, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.nav-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { height: 34px; width: auto; transition: filter .4s ease; }
.nav-logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
  color: var(--cream);
  transition: color .4s ease;
}
#site-nav.scrolled .nav-logo-text { color: var(--ink); }
#site-nav:not(.scrolled) .nav-logo img { filter: brightness(0) invert(1); }

.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-tel {
  font-size: 13px; letter-spacing: .04em; font-weight: 600;
  color: var(--cream); text-decoration: none;
  display: flex; align-items: center; gap: 7px;
  transition: color .4s ease;
}
#site-nav.scrolled .nav-tel { color: var(--ink); }
.nav-tel svg { width: 15px; height: 15px; stroke: var(--terracotta); }

.menu-btn {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cream);
  transition: color .4s ease;
  padding: 6px 0;
}
#site-nav.scrolled .menu-btn { color: var(--ink); }
.menu-lines { display: flex; flex-direction: column; gap: 4px; width: 22px; }
.menu-lines span {
  display: block; height: 2px; width: 100%; background: currentColor;
  transition: transform .35s ease, opacity .35s ease;
}
.menu-btn.open .menu-lines span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn.open .menu-lines span:nth-child(2) { opacity: 0; }
.menu-btn.open .menu-lines span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── FULLSCREEN OVERLAY MENU ─── */
#menu-overlay {
  position: fixed; inset: 0; z-index: 290;
  background: var(--forest-deep);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 120px 6vw 50px;
  opacity: 0; visibility: hidden;
  transform: translateY(-2%);
  transition: opacity .5s ease, visibility .5s ease, transform .5s ease;
}
#menu-overlay.active { opacity: 1; visibility: visible; transform: translateY(0); }
.menu-links { display: flex; flex-direction: column; gap: 6px; }
.menu-links a {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(40px, 8vw, 92px);
  font-weight: 600; line-height: 1.05;
  color: var(--cream); text-decoration: none;
  display: flex; align-items: baseline; gap: 22px;
  transition: color .3s ease, transform .3s ease;
  width: fit-content;
}
.menu-links a span.num {
  font-family: 'Work Sans', sans-serif;
  font-size: 15px; font-weight: 600; color: var(--terracotta);
  letter-spacing: .05em;
}
.menu-links a:hover { color: var(--terracotta); transform: translateX(14px); }
.menu-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-end; gap: 24px;
  border-top: 1px solid rgba(245,239,230,0.14); padding-top: 28px;
}
.menu-foot-col { color: var(--sand); font-size: 13px; line-height: 1.9; }
.menu-foot-col a { text-decoration: none; color: var(--cream); }
.menu-foot-col a:hover { color: var(--terracotta); }
.menu-social { display: flex; gap: 16px; }
.menu-social a svg { width: 18px; height: 18px; stroke: var(--cream); transition: stroke .3s; }
.menu-social a:hover svg { stroke: var(--terracotta); }

/* ─── MARQUEE ─── */
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 32s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  display: flex; align-items: center; gap: 20px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(20px, 2.6vw, 34px); font-weight: 600;
  padding: 0 20px; white-space: nowrap; color: var(--stone);
}
.marquee-item svg { width: 16px; height: 16px; stroke: var(--terracotta); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; font-size: 13px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; border-radius: 999px;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}
.btn-solid { background: var(--terracotta); color: var(--cream); }
.btn-solid:hover { background: var(--terracotta-dark); transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: var(--ink-deep); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1.5px solid currentColor; }
.btn-outline:hover { background: currentColor; }
.btn-outline.on-dark:hover { color: var(--forest-deep); }
.btn-outline.on-light:hover { color: var(--cream); }

/* ─── SECTION EYEBROW ─── */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--terracotta);
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--terracotta); }

/* ─── SERVICE ROWS (numbered accordion) ─── */
.service-row {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  display: grid; grid-template-columns: 90px 1fr auto; align-items: center;
  gap: 32px; cursor: pointer;
  transition: background .3s ease;
  position: relative;
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-row:hover { background: rgba(193,80,46,0.045); }
.service-num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px; font-weight: 700; color: var(--stone-pale);
}
.service-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(24px, 3.4vw, 42px); font-weight: 600;
  transition: color .3s ease;
}
.service-row:hover .service-title { color: var(--terracotta); }
.service-arrow svg { width: 26px; height: 26px; stroke: var(--ink); transition: transform .35s ease; }
.service-row:hover .service-arrow svg { transform: rotate(45deg); stroke: var(--terracotta); }
.service-desc {
  grid-column: 2 / 3; max-width: 640px; overflow: hidden;
  max-height: 0; opacity: 0; transition: max-height .45s ease, opacity .4s ease, margin .4s ease;
  color: var(--stone); font-size: 15.5px; line-height: 1.75;
}
.service-row.open .service-desc { max-height: 260px; opacity: 1; margin-top: 14px; }
.service-row.open .service-arrow svg { transform: rotate(90deg); stroke: var(--terracotta); }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.service-tag {
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
  background: var(--sand); color: var(--ink-soft);
}

/* ─── CASE / WORK CARDS ─── */
.case-card {
  position: relative; overflow: hidden; border-radius: 4px;
  cursor: pointer; display: block; text-decoration: none; color: inherit;
  background: var(--ink);
}
.case-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.case-card:hover img { transform: scale(1.06); }
.case-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,14,12,0) 35%, rgba(16,14,12,.92) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px;
}
.case-tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: var(--terracotta-pale);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 12px;
}
.case-card h3 { font-family: 'Bricolage Grotesque', sans-serif; color: var(--cream); font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.case-card p { color: var(--sand); font-size: 13.5px; }
.case-card .case-result { color: var(--terracotta-pale); font-weight: 600; font-size: 13px; margin-top: 8px; }

/* filter pills (work page) */
.filter-pill {
  font-size: 13px; font-weight: 600; letter-spacing: .03em;
  padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: transparent; color: var(--stone); cursor: pointer;
  transition: all .25s ease;
}
.filter-pill.active, .filter-pill:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ─── TEAM (monogram cards — no stock headshots as named staff) ─── */
.team-card { padding: 34px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 84px 1fr; gap: 26px; }
.team-mono {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--forest); color: var(--sand);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 19px;
}
.team-name { font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 600; }
.team-role { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta); margin: 4px 0 12px; }
.team-bio { color: var(--stone); font-size: 14.5px; line-height: 1.75; max-width: 480px; }

/* ─── STAT CARD ─── */
.stat-card { border-top: 2px solid var(--ink); padding-top: 14px; }
.stat-num { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(30px,4vw,46px); font-weight: 700; color: var(--terracotta); line-height: 1; }
.stat-label { font-size: 13px; color: var(--stone); margin-top: 8px; }

/* ─── QUOTE / TESTIMONIAL ─── */
.quote-mark { font-family: 'Bricolage Grotesque', sans-serif; font-size: 90px; line-height: 0.4; color: var(--terracotta); }

/* ─── FOOTER ─── */
footer { background: var(--ink); color: var(--sand); }
.footer-col h4 { font-family: 'Bricolage Grotesque', sans-serif; color: var(--cream); font-size: 15px; margin-bottom: 18px; }
.footer-col a { display: block; color: var(--stone-pale); text-decoration: none; font-size: 14px; margin-bottom: 11px; transition: color .2s; }
.footer-col a:hover { color: var(--terracotta-pale); }
.footer-bottom { border-top: 1px solid var(--line-dark); }

/* ─── MODAL (work case study detail) ─── */
#case-modal {
  position: fixed; inset: 0; z-index: 400; background: rgba(16,14,12,.88);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease;
}
#case-modal.active { opacity: 1; visibility: visible; }
.modal-panel {
  background: var(--paper); max-width: 880px; width: 100%; max-height: 88vh;
  overflow-y: auto; border-radius: 6px; position: relative;
  transform: translateY(16px); transition: transform .35s ease;
}
#case-modal.active .modal-panel { transform: translateY(0); }
.modal-close { position: absolute; top: 18px; right: 18px; z-index: 5; background: var(--cream); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid var(--line); }
.modal-close svg { width: 18px; height: 18px; }

/* form */
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); margin-bottom: 9px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--paper); border: 1.5px solid var(--line);
  padding: 14px 16px; font-family: 'Work Sans', sans-serif; font-size: 15px; color: var(--ink);
  border-radius: 3px; transition: border-color .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--terracotta); }
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--cream); padding: 16px 26px; border-radius: 6px;
  font-size: 14px; display: flex; align-items: center; gap: 10px;
  opacity: 0; visibility: hidden; transition: all .35s ease; z-index: 500;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.toast svg { width: 18px; height: 18px; stroke: var(--terracotta-pale); }

@media (max-width: 860px) {
  .service-row { grid-template-columns: 50px 1fr auto; gap: 18px; }
  .team-card { grid-template-columns: 56px 1fr; }
  .nav-tel span.tel-text { display: none; }
}

/* ─── HERO SCRIM (light touch-up: gradient overlays Tailwind can't
   express reliably against CSS custom-property colors) ─── */
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,14,12,0) 0%, rgba(16,14,12,.32) 55%, rgba(16,14,12,.93) 100%);
}
.hero-scrim-solid { position: absolute; inset: 0; background: rgba(16,14,12,.74); }

/* ─── MAP PANEL (contact page) ─── */
.map-pin {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50% 50% 50% 0;
  background: var(--terracotta); transform-origin: bottom center;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(16,14,12,.35);
}
.map-pin svg { transform: rotate(45deg); width: 20px; height: 20px; stroke: var(--cream); }
.map-pin i { transform: rotate(45deg); }
