/* =============================================
   IBA SERVICES — SHARED DESIGN SYSTEM
   ============================================= */

:root {
  --bg: #f8f7f3;
  --bg-alt: #f1efe7;
  --surface: #ffffff;
  --ink: #0d1117;
  --ink-soft: #363c45;
  --muted: #6b7280;
  --line: #e8e6de;
  --accent: #0b3b2e;
  --accent-dark: #072a20;
  --gold: #c9a96e;
  --gold-light: rgba(201,169,110,0.12);
  --radius: 8px;
  --shadow: 0 4px 20px rgba(13,17,23,0.06);
  --shadow-lg: 0 20px 60px rgba(13,17,23,0.12);

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:target {
  scroll-margin-top: 120px;
}
/* FIX: prevent section titles from hiding behind sticky navbar */
section { scroll-margin-top: 120px; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0 0 16px;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; margin: 0 0 8px; font-family: var(--font-body); }
p  { color: var(--ink-soft); margin: 0 0 14px; }
a  { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.section {
  padding: 96px 0;
}

.section-head {
  max-width: 700px;
  margin-bottom: 60px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

/* ——— NAVBAR ——— */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 243, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  height: 65px;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.2;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.nav-menu {
  display: flex;
  gap: 36px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-menu a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--ink); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ——— BUTTONS ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.btn i { font-size: 0.82rem; transition: transform 0.25s ease; }
.btn:hover i { transform: translateX(3px); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 8px 24px rgba(11,59,46,0.25);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  font-weight: 600;
}
.btn-gold:hover {
  background: #b8934c;
  border-color: #b8934c;
  box-shadow: 0 8px 24px rgba(201,169,110,0.3);
}

.btn-ghost-dark {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost-dark:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.btn-outline-dark {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline-dark:hover {
  background: var(--ink);
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

/* ——— PAGE HERO (inner pages) ——— */
.page-hero {
  background: var(--ink);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,169,110,0.1) 0%, transparent 70%);
}
.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
.page-hero h1 {
  color: #fff;
  max-width: 900px;
  margin: 0 auto 16px;
  text-align: center;
}
.page-hero p {
  color: rgba(255,255,255,0.55);
  font-size: 1.1rem;
  max-width: 560px;
  line-height: 1.8;
  margin: 0 auto;
  text-align: center;
}

/* FIX: Homepage hero alignment (hero-inner container override) */
.hero-inner { padding-left: 20px; padding-right: 20px; }

.hero-inner h1,
.hero-inner p {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ——— FOOTER ——— */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 72px 0 32px;
  margin-top: 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.foot-desc {
  color: rgba(255,255,255,0.45);
  font-size: 0.88rem;
  line-height: 1.75;
  max-width: 300px;
  margin-top: 16px;
  margin-bottom: 20px;
}
footer h5 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li {
  padding: 7px 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
}
footer ul li a {
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
footer ul li a:hover { color: var(--gold); }
footer ul li i { color: rgba(255,255,255,0.3); font-size: 0.8rem; }
footer .brand {
  gap: 12px;
  align-items: center;
}
footer .brand-mark {
  height: 40px;
  width: 120px;
  flex-shrink: 0;
}
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 12px;
}
.socials {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.socials a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  transition: all 0.2s;
}
.socials a:hover {
  background: var(--gold);
  color: var(--ink);
}

/* ——— MOBILE STICKY CTA ——— */
.mobile-cta { display: none; }
@media (max-width: 640px) {
  .mobile-cta {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 10px 16px;
    display: flex;
    gap: 10px;
    z-index: 200;
  }
  .mobile-cta a {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 0.88rem;
    border-radius: 6px;
    font-weight: 600;
  }
  .mobile-cta .primary { background: var(--accent); color: #fff; }
  .mobile-cta .secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); }
  body { padding-bottom: 68px; }
}

/* ——— MENU TOGGLE ——— */
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

/* ——— ANIMATIONS ——— */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal-section { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-section.in-view { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-32px); transition: opacity 0.8s 0.2s ease, transform 0.8s 0.2s ease; }
.reveal-right { opacity: 0; transform: translateX(32px); transition: opacity 0.8s 0.3s ease, transform 0.8s 0.3s ease; }
.reveal-left.in-view, .reveal-right.in-view { opacity: 1; transform: translateX(0); }

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
}
.card:hover {
  border-color: rgba(11,59,46,0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card .card-icon {
  width: 40px; height: 40px;
  border-radius: 6px;
  background: var(--gold-light);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 18px;
}
.card h4 { margin-bottom: 8px; font-size: 1rem; }
.card p { font-size: 0.9rem; color: var(--muted); margin: 0; line-height: 1.7; }

/* ——— DARK CARD ——— */
.card.dark {
  background: #161c24;
  border-color: #222830;
}
.card.dark h4 { color: #fff; }
.card.dark p { color: rgba(255,255,255,0.5); }
.card.dark:hover { border-color: rgba(201,169,110,0.3); }

/* ——— RESPONSIVE ——— */
@media (max-width: 960px) {
  .nav-menu { gap: 24px; }
  .card-grid.cols-4, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 72px 0; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 60px 0; }
  h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
  h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
  .card { padding: 24px; }
  .nav-inner { padding: 14px 20px; }
}

@media (max-width: 640px) {
  .nav-menu, .nav-cta .btn-ghost-dark { display: none; }
  .menu-toggle { display: block; }
  .card-grid.cols-4, .card-grid.cols-3, .card-grid.cols-2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .container {
    padding-left: 16px;
    padding-right: 16px;
    margin-left: auto;
    margin-right: auto;
  }
  .section-head { margin-bottom: 40px; }
  .section-head p { font-size: 0.95rem; }
  
  /* Navbar mobile */
  .nav-inner { padding: 14px 16px; gap: 12px; }
  .brand { gap: 8px; }
  .brand-mark { height: 50px; width: 155px; }
  .brand-name { font-size: 0.95rem; }
  .brand-name small { font-size: 0.6rem; }
  
  /* Typography */
  h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
  h2 { font-size: clamp(1.1rem, 2.8vw, 1.8rem); }
  h3 { font-size: 1.1rem; }
  h4 { font-size: 0.9rem; }
  p { font-size: 0.95rem; }
  
  /* Cards */
  .card { padding: 20px; }
  .card h4 { font-size: 0.95rem; margin-bottom: 6px; }
  .card p { font-size: 0.85rem; }
  .card .card-icon { width: 36px; height: 36px; font-size: 0.9rem; }
  
  /* Footer */
  .foot-grid { gap: 32px; }
  footer h5 { margin-bottom: 14px; font-size: 0.75rem; }
  footer ul li { padding: 6px 0; font-size: 0.85rem; }
  .foot-bottom { font-size: 0.75rem; }
  .socials a { width: 30px; height: 30px; font-size: 0.75rem; }
  
  /* Buttons */
  .btn { padding: 10px 18px; font-size: 0.85rem; }
  .btn-sm { padding: 8px 14px; font-size: 0.8rem; }
  
  /* Page hero */
  .page-hero {
    padding: 70px 0 40px;
    text-align: center;
  }
  .page-hero-content {
    padding: 0 16px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .page-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    line-height: 1.25;
    margin-left: auto;
    margin-right: auto;
  }
  .page-hero p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Eyebrow */
  .eyebrow { font-size: 0.65rem; letter-spacing: 0.15em; margin-bottom: 12px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .section { padding: 36px 0; }
  .nav-inner { padding: 12px 14px; }
  
  h1 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); }
  h2 { font-size: clamp(1rem, 2.5vw, 1.6rem); }
  h3 { font-size: 1rem; }
  
  .page-hero { padding: 50px 0 35px; }
  .section-head { margin-bottom: 32px; }
  
  .card { padding: 16px; gap: 12px; }
  .card .card-icon { width: 32px; height: 32px; margin-bottom: 12px; }
  
  .btn { padding: 9px 16px; font-size: 0.83rem; min-height: 40px; }
  
  footer { padding: 48px 0 24px; }
  .socials a { width: 28px; height: 28px; }
}
