/* ============================================================
   BO Enterprise — Frontend Stylesheet
   Palette: deep navy, charcoal, warm beige, off-white, royal purple
   Type:    Sora (display) + Archivo (body/UI)
   ============================================================ */

:root {
  --navy:        #0E1C2B;
  --navy-2:      #16283B;
  --charcoal:    #262B31;
  --offwhite:    #F7F4ED;
  --beige:       #EAE2D2;
  --accent:      #6D3FA8;
  --accent-dark: #542E86;
  --ink:         #1B2530;
  --muted:       #5D6772;
  --line:        rgba(27, 37, 48, 0.14);
  --line-dark:   rgba(230, 222, 203, 0.16);

  --font-display: "Sora", "Archivo", sans-serif;
  --font-body:    "Archivo", -apple-system, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 3px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Typography ---------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.22rem; line-height: 1.3; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow a { border-bottom: 1px solid transparent; }
.eyebrow a:hover { border-bottom-color: var(--accent); }

.lead { font-size: 1.12rem; color: var(--muted); margin-top: 14px; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------------- Buttons & links ---------------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(230,222,203,0.4); color: var(--beige); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.btn-navy { background: var(--navy); color: var(--offwhite); }
.btn-navy:hover { background: var(--navy-2); }
.btn-block { display: block; text-align: center; margin-top: 22px; }

.link-arrow {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent-dark);
  white-space: nowrap;
}
.link-arrow::after { content: " →"; }
.link-arrow:hover { color: var(--accent); }

/* ---------------- Header ---------------- */
.site-header {
  background: var(--navy);
  border-bottom: 1px solid var(--line-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { max-height: 44px; width: auto; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy);
  background: var(--accent);
  padding: 6px 10px;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--offwhite);
  letter-spacing: 0.02em;
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  color: rgba(247, 244, 237, 0.85);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: #fff; border-bottom-color: var(--accent); }
.site-nav .nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  border-bottom: none;
}
.site-nav .nav-cta:hover { background: var(--accent-dark); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--offwhite);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------------- Hero (home) ---------------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(169, 131, 78, 0.14), transparent 60%),
    var(--navy);
  color: var(--offwhite);
  padding: 84px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero-sub {
  margin-top: 22px;
  max-width: 56ch;
  font-size: 1.08rem;
  color: rgba(247, 244, 237, 0.78);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-map svg { width: 100%; height: auto; border: 1px solid var(--line-dark); border-radius: var(--radius); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  margin-top: 70px;
  overflow: hidden;
}
.stat { background: var(--navy-2); padding: 26px 24px; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}
.stat-label { display: block; margin-top: 8px; font-size: 0.86rem; color: rgba(247,244,237,0.72); }

/* ---------------- Page hero (inner pages) ---------------- */
.page-hero {
  background: var(--navy);
  color: var(--offwhite);
  padding: 72px 0 60px;
}
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero .hero-sub { color: rgba(247,244,237,0.78); margin-top: 18px; max-width: 62ch; font-size: 1.06rem; }
.page-hero .eyebrow a { color: var(--accent); }

/* ---------------- Sections ---------------- */
.section { padding: 84px 0; }
.section-light { background: var(--offwhite); }
.section-beige { background: var(--beige); }
.section-navy  { background: var(--navy); color: var(--offwhite); }
.section-navy h2 { color: #fff; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.section-navy .link-arrow { color: var(--accent); }

/* ---------------- Cards ---------------- */
.card-grid { display: grid; gap: 26px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: 0.95rem; }
.card-more {
  margin-top: auto;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.03em;
}
.card-more::after { content: " →"; }

.card-media { padding: 0; overflow: hidden; }
.card-media .card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(400px 200px at 30% 0%, rgba(109,63,168,0.25), transparent 65%),
    var(--navy);
}
.card-img-placeholder span {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--accent);
}
.card-meta {
  font-size: 0.78rem !important;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark) !important;
}
.team-card .card-img { aspect-ratio: 4 / 3; }

/* ---------------- Case study rows (home) ---------------- */
.cs-list { border-top: 1px solid var(--line-dark); }
.cs-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 24px 6px;
  border-bottom: 1px solid var(--line-dark);
  transition: background 0.15s ease;
}
.cs-row:hover { background: rgba(169, 131, 78, 0.08); }
.cs-year { font-family: var(--font-display); color: var(--accent); font-size: 1.05rem; }
.cs-title { font-family: var(--font-display); font-size: 1.3rem; color: #fff; }
.cs-meta { font-size: 0.84rem; color: rgba(247,244,237,0.6); white-space: nowrap; }

/* ---------------- Why grid ---------------- */
.why-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: start; }
.why-items { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 40px; }
.why-item h3 { margin-bottom: 8px; }
.why-item h3::before {
  content: "";
  display: block;
  width: 34px; height: 2px;
  background: var(--accent);
  margin-bottom: 14px;
}
.why-item p { color: var(--muted); font-size: 0.95rem; }

/* ---------------- CTA band ---------------- */
.cta-band {
  background: var(--charcoal);
  color: var(--offwhite);
  padding: 62px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(247,244,237,0.7); margin-top: 8px; }

/* ---------------- Prose (CMS body content) ---------------- */
.prose { max-width: 74ch; }
.prose p { margin-bottom: 1.2em; }
.prose h2 { margin: 1.6em 0 0.6em; }
.prose h3 { margin: 1.4em 0 0.5em; }
.prose ul, .prose ol { margin: 0 0 1.2em 1.4em; }
.prose a { color: var(--accent-dark); border-bottom: 1px solid rgba(109,63,168,0.4); }
.prose a:hover { color: var(--accent); }
.detail-img { border-radius: var(--radius); margin-bottom: 30px; }

/* ---------------- Detail layout (content + aside) ---------------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}
.detail-aside {
  position: sticky;
  top: 100px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.detail-aside h3 { font-size: 1.02rem; margin-bottom: 14px; }
.detail-aside h3:not(:first-child) { margin-top: 26px; }
.aside-list { list-style: none; }
.aside-list li { border-bottom: 1px solid var(--line); }
.aside-list a { display: block; padding: 9px 0; font-size: 0.92rem; color: var(--muted); }
.aside-list a:hover, .aside-list a.is-current { color: var(--accent-dark); }
.fact-list dt {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-top: 14px;
}
.fact-list dt:first-child { margin-top: 0; }
.fact-list dd { font-size: 0.95rem; }
.fact-list dd a { color: var(--accent-dark); text-decoration: underline; }

/* ---------------- Gallery ---------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---------------- Timeline ---------------- */
.timeline { border-left: 2px solid var(--accent); padding-left: 34px; max-width: 720px; margin-top: 40px; }
.timeline-item { position: relative; padding-bottom: 36px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -41px; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--beige);
}
.timeline-year {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-dark);
  display: block;
  margin-bottom: 4px;
}
.timeline-item p { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }

/* ---------------- Forms ---------------- */
.form { max-width: 680px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.96rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.notice { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 24px; font-size: 0.95rem; }
.notice ul { margin-left: 18px; }
.notice-success { background: #e8f2e6; border: 1px solid #b8d6b2; color: #2c5626; }
.notice-error { background: #f7e9e6; border: 1px solid #e0b8ae; color: #7a2e1d; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--navy);
  color: rgba(247,244,237,0.75);
  padding: 64px 0 0;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.footer-col a { display: block; padding: 4px 0; color: rgba(247,244,237,0.75); }
.footer-col a:hover { color: #fff; }
.footer-tag { margin-top: 16px; line-height: 1.7; }
.footer-social { display: flex; gap: 14px; margin-top: 12px; }
.footer-social a { display: inline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 24px;
  font-size: 0.82rem;
  color: rgba(247,244,237,0.5);
}
.footer-est { font-family: var(--font-display); font-weight: 600; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-map { max-width: 420px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .detail-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 74px; left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 26px;
    gap: 4px;
    border-bottom: 1px solid var(--line-dark);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line-dark); }
  .site-nav .nav-cta { margin-top: 12px; text-align: center; }

  .cols-3, .cols-2, .why-items, .form-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .cs-row { grid-template-columns: 1fr; gap: 4px; }
  .section { padding: 60px 0; }
  .hero { padding: 60px 0 48px; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
