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

[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f5;
  --bg-dark: #111111;
  --bg-dark-card: #1a1a1a;
  --bg-dark-card-hover: #222222;
  --bg-muted: #f5f5f5;
  --bg-nav: rgba(255,255,255,0.92);
  --bg-mobile-menu: rgba(255,255,255,0.98);
  --text-primary: #111111;
  --text-secondary: #444444;
  --text-muted: #777777;
  --accent: #111111;
  --accent-subtle: rgba(0,0,0,0.06);
  --accent-border: rgba(0,0,0,0.12);
  --cta: #333333;
  --cta-hover: #111111;
  --border-subtle: #e5e5e5;
  --border-hover: #cccccc;
  --icon-bg: rgba(0,0,0,0.05);
  --icon-fg: #333333;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 6px 20px rgba(0,0,0,0.08);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg-primary: #111111;
  --bg-secondary: #181818;
  --bg-card: #1e1e1e;
  --bg-card-hover: #262626;
  --bg-dark: #0a0a0a;
  --bg-dark-card: #171717;
  --bg-dark-card-hover: #1e1e1e;
  --bg-muted: #181818;
  --bg-nav: rgba(17,17,17,0.92);
  --bg-mobile-menu: rgba(17,17,17,0.98);
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --accent: #f0f0f0;
  --accent-subtle: rgba(255,255,255,0.08);
  --accent-border: rgba(255,255,255,0.14);
  --cta: #e0e0e0;
  --cta-hover: #ffffff;
  --border-subtle: #2c2c2c;
  --border-hover: #404040;
  --icon-bg: rgba(255,255,255,0.08);
  --icon-fg: #cccccc;
  --card-shadow: 0 1px 4px rgba(0,0,0,0.3);
  --card-shadow-hover: 0 6px 20px rgba(0,0,0,0.4);
  color-scheme: dark;
}

:root {
  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 1080px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font); background: var(--bg-primary); color: var(--text-primary);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden; width: 100%; transition: background 0.3s, color 0.3s;
}

/* scroll offset for fixed nav */
section[id] { scroll-margin-top: 80px; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg-nav); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle); transition: background 0.3s;
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-primary); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-links { display: flex; gap: 1.75rem; align-items: center; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-primary); }
.btn-nav { background: var(--cta); color: var(--bg-primary); border: none; padding: 0.5rem 1.2rem; border-radius: 6px; font-weight: 600; font-size: 0.82rem; cursor: pointer; transition: background 0.2s; }
.btn-nav:hover { background: var(--cta-hover); }

.theme-toggle { background: var(--accent-subtle); border: none; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.theme-toggle svg { width: 16px; height: 16px; fill: var(--text-secondary); }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.hamburger { display: none; background: none; border: none; cursor: pointer; width: 34px; height: 34px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── SLIDE-IN PANEL ── */
.slide-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 85vw;
  background: var(--bg-secondary); z-index: 200;
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border-subtle);
  box-shadow: -8px 0 30px rgba(0,0,0,0.08);
}
.slide-panel.active { transform: translateX(0); }
[data-theme="dark"] .slide-panel { box-shadow: -8px 0 30px rgba(0,0,0,0.3); }
.slide-panel-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3); z-index: 199;
  opacity: 0; pointer-events: none; transition: opacity 0.35s;
}
.slide-panel-overlay.active { opacity: 1; pointer-events: auto; }
.slide-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-subtle);
}
.slide-panel-header .logo { font-size: 1.15rem; }
.slide-panel-close {
  background: none; border: none; cursor: pointer; width: 34px; height: 34px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 1.2rem; transition: color 0.2s, background 0.2s;
}
.slide-panel-close:hover { color: var(--text-primary); background: var(--accent-subtle); }
.slide-panel-nav { flex: 1; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.slide-panel-nav a {
  display: block; padding: 0.75rem 0.75rem; border-radius: 8px;
  color: var(--text-primary); text-decoration: none;
  font-size: 1.05rem; font-weight: 500; transition: background 0.2s;
}
.slide-panel-nav a:hover { background: var(--accent-subtle); }
.slide-panel-nav .panel-divider { height: 1px; background: var(--border-subtle); margin: 0.75rem 0; }
.slide-panel-nav .panel-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 0.5rem 0.75rem 0.25rem; }
.slide-panel-nav .btn-primary { margin-top: 0.5rem; justify-content: center; width: 100%; }
.panel-columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
.panel-col .panel-label { padding: 0.25rem 0.5rem 0.15rem; font-size: 0.62rem; }
.panel-col a { font-size: 0.82rem; padding: 0.4rem 0.5rem; color: var(--text-secondary); }
.panel-col a:hover { color: var(--text-primary); }
.slide-panel-footer {
  padding: 1.25rem 1.5rem; border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.slide-panel-footer .footer-partner { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: 0.72rem; font-weight: 500; }
.slide-panel-footer .footer-partner svg { width: 13px; height: 13px; fill: var(--text-muted); }

@media (max-width: 768px) { .hamburger { display: flex; } .nav-links { display: none; } }

/* ── HERO ── */
.hero { min-height: 80vh; display: flex; align-items: center; padding: 6rem 1.5rem 4rem; background: var(--bg-secondary); }
.hero-content { max-width: var(--max-width); margin: 0 auto; position: relative; }
.hero-content h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.25rem; max-width: 680px; }
.hero-sub { font-size: 1.1rem; color: var(--text-secondary); max-width: 540px; line-height: 1.7; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-primary { background: var(--cta); color: var(--bg-primary); border: none; padding: 0.75rem 1.6rem; border-radius: 8px; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: all 0.2s; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font); }
.btn-primary:hover { background: var(--cta-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-subtle); padding: 0.75rem 1.6rem; border-radius: 8px; font-weight: 500; font-size: 0.92rem; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-outline:hover { border-color: var(--border-hover); }
.partner-badge { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 2rem; padding: 0.5rem 1rem; background: var(--accent-subtle); border-radius: 6px; font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.partner-badge svg { width: 16px; height: 16px; fill: var(--text-muted); }

/* ── SECTIONS ── */
section { padding: 5rem 1.5rem; transition: background 0.3s; }
.container { max-width: var(--max-width); margin: 0 auto; }
.section-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 0.75rem; }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.75rem; line-height: 1.15; }
.section-sub { color: var(--text-secondary); font-size: 1rem; max-width: 520px; margin-bottom: 3rem; }

/* ── VALUES / NUMBERS ── */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding-top: 1rem; }
.value-item { text-align: center; }
.value-number { font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; margin-bottom: 0.25rem; }
.value-label { color: var(--text-muted); font-size: 0.82rem; font-weight: 500; }

/* ── SERVICES ── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.services-grid .service-card:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.service-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 1.75rem; transition: all 0.3s; box-shadow: var(--card-shadow); }
.service-card:hover { border-color: var(--border-hover); box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.service-icon { width: 40px; height: 40px; background: var(--icon-bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.service-icon svg { width: 20px; height: 20px; stroke: var(--icon-fg); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.service-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ── PORTFOLIO (always-dark section) ── */
.portfolio-section { background: var(--bg-dark); color: #f0f0f0; }
[data-theme="dark"] .portfolio-section { background: #080808; }
.portfolio-section .section-label { color: #999999; }
.portfolio-section .section-title { color: #f0f0f0; }
.portfolio-section .section-sub { color: #999999; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.portfolio-card { background: var(--bg-dark-card); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius); padding: 1.75rem; transition: all 0.3s; text-decoration: none; display: block; }
.portfolio-card:hover { border-color: rgba(255,255,255,0.14); transform: translateY(-1px); }
.portfolio-card .card-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #999999; margin-bottom: 0.6rem; }
.portfolio-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; color: #f0f0f0; }
.portfolio-card p { color: #aaaaaa; font-size: 0.88rem; line-height: 1.6; }
.portfolio-card .card-link { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.75rem; font-size: 0.8rem; font-weight: 500; color: #888888; transition: color 0.2s; }
.portfolio-card:hover .card-link { color: #cccccc; }

/* ── APPROACH ── */
.approach-section { background: var(--bg-muted); }
.approach-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step-number { font-size: 2.2rem; font-weight: 800; color: var(--border-subtle); line-height: 1; margin-bottom: 0.6rem; }
[data-theme="dark"] .step-number { color: rgba(255,255,255,0.12); }
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.step p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }
.approach-cta { margin-top: 3rem; }

/* ── INDUSTRIES ── */
.industries-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.industry-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 1.5rem; transition: all 0.3s; box-shadow: var(--card-shadow); }
.industry-card:hover { border-color: var(--border-hover); box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.industry-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.industry-card p { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.5; }

/* ── SOCIAL PROOF ── */
.proof-section { background: var(--bg-muted); }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.proof-card { padding: 1.5rem; border-left: 2px solid var(--border-subtle); }
.proof-card p { color: var(--text-secondary); font-size: 0.9rem; font-style: italic; line-height: 1.6; margin-bottom: 0.75rem; }
.proof-card .proof-source { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── CONTACT ── */
.contact-section { background: var(--bg-secondary); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.contact-detail { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.25rem; }
.contact-detail-icon { width: 36px; height: 36px; background: var(--icon-bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-detail-icon svg { width: 16px; height: 16px; stroke: var(--icon-fg); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.contact-detail .detail-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.15rem; }
.contact-detail .detail-value { font-size: 0.92rem; color: var(--text-primary); font-weight: 500; }

/* ── CTA (always-dark section) ── */
.cta-section { background: var(--bg-dark); color: #f0f0f0; text-align: center; }
[data-theme="dark"] .cta-section { background: #080808; }
.cta-section h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 700; margin-bottom: 0.6rem; color: #f0f0f0; }
.cta-section p { color: #999999; margin-bottom: 2rem; font-size: 0.95rem; }
.cta-section .btn-primary { background: #fff; color: #111; }
.cta-section .btn-primary:hover { background: #eee; }

/* ── FOOTER ── */
footer { background: var(--bg-dark); border-top: 1px solid rgba(255,255,255,0.06); padding: 3rem 1.5rem; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; margin-bottom: 2rem; }
.footer-brand-block .footer-brand { font-weight: 700; font-size: 1.1rem; color: #f0f0f0; margin-bottom: 0.5rem; }
.footer-brand-block .footer-tagline { color: #777; font-size: 0.82rem; max-width: 280px; line-height: 1.5; }
.footer-col-title { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #777; margin-bottom: 0.75rem; }
.footer-col a { display: block; color: #999; text-decoration: none; font-size: 0.85rem; padding: 0.2rem 0; transition: color 0.2s; }
.footer-col a:hover { color: #ddd; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.06); }
.footer-copy { color: #666; font-size: 0.75rem; }
.footer-partner { display: inline-flex; align-items: center; gap: 0.35rem; color: #666; font-size: 0.72rem; font-weight: 500; }
.footer-partner svg { width: 13px; height: 13px; fill: #666; }

/* ── MAERAK ADDITIONS ── */
.portfolio-grid { grid-template-columns: repeat(3, 1fr); }
.portfolio-card { cursor: default; }
.nav-links a.btn-nav, .nav-links a.btn-nav:hover { color: var(--bg-primary); }
.slide-panel-nav a.btn-primary { display: flex; color: var(--bg-primary); }
.slide-panel-nav a.btn-primary:hover { background: var(--cta-hover); }
.outcomes-grid { grid-template-columns: repeat(2, 1fr); }
.outcomes-grid .service-card:last-child:nth-child(3n+1) { grid-column: auto; }
.contact-detail a { color: var(--text-primary); }
.contact-lead { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; }
@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .services-grid, .outcomes-grid, .approach-steps { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .industries-grid { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.9rem; }
  .section-title { font-size: 1.5rem; }
}

/* ── MAERAK-346: classes that replace the inline style attributes, so the policy can refuse inline styles ── */
.noscript-note { padding: 2rem; text-align: center; font-family: sans-serif; background: #111; color: #f0f0f0; }
.theme-toggle.theme-toggle-small { width: 30px; height: 30px; }

/* ── MAERAK-346: the contact form, in the Integra site's form style ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.form-group label .required { color: #cc0000; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.7rem 0.9rem; background: var(--bg-primary);
  border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-primary);
  font-family: var(--font); font-size: 0.92rem; transition: border-color 0.2s; outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--text-muted); }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-submit {
  width: 100%; padding: 0.85rem; background: var(--cta); color: var(--bg-primary);
  border: none; border-radius: 8px; font-weight: 600; font-size: 1rem;
  font-family: var(--font); cursor: pointer; transition: all 0.2s; margin-top: 0.5rem;
}
.form-submit:hover { background: var(--cta-hover); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-success { text-align: center; padding: 2rem 0; }
.form-success-icon {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  background: rgba(34,197,94,0.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.form-success-icon svg { width: 28px; height: 28px; stroke: #22c55e; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form-success h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.form-success p { color: var(--text-secondary); font-size: 0.92rem; }
.form-error {
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px; padding: 0.65rem 0.9rem; color: #ef4444; font-size: 0.85rem;
  margin-bottom: 1rem; display: none;
}
.form-error.active { display: block; }
.ohnohoney { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-note { color: var(--text-muted); font-size: 0.8rem; line-height: 1.6; margin-top: 0.9rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
