/* ============================================================
   AGENCY-V3 — STYLES.CSS — Vertex Consulting
   Clean light · Emerald + Black · DM Sans + Playfair Display
   ============================================================ */

:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #ecfdf5;
  --primary-rgb: 5, 150, 105;
  --accent: #0f172a;
  --accent-rgb: 15, 23, 42;

  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --canvas: var(--white);
  --canvas-alt: var(--gray-50);
  --ink: var(--gray-900);
  --ink-soft: var(--gray-700);
  --muted: var(--gray-500);
  --border: var(--gray-200);

  --font-main: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.78rem);
  --fs-sm: clamp(0.82rem, 0.76rem + 0.3vw, 0.9rem);
  --fs-base: clamp(0.92rem, 0.86rem + 0.3vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
  --fs-xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --fs-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.6rem);
  --fs-4xl: clamp(2.8rem, 1.8rem + 5vw, 4.5rem);

  --section-py: clamp(60px, 8vw, 110px);
  --container-max: 1140px;
  --container-px: clamp(16px, 4vw, 32px);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.09);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.35s;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-preloader: 500;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; }
body { font-family: var(--font-main); font-size: var(--fs-base); color: var(--ink); background: var(--canvas); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 13px 16px; background: var(--white); width: 100%; transition: border-color var(--duration), box-shadow var(--duration); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
::selection { background: rgba(var(--primary-rgb), 0.12); }

/* UTILITIES */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); }
.kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.section-title { font-family: var(--font-main); font-size: var(--fs-3xl); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 14px; }
.section-title em { font-family: var(--font-display); font-style: italic; font-weight: 600; color: var(--primary); }
.section-lead { font-size: var(--fs-md); color: var(--muted); max-width: 560px; line-height: 1.8; }
.section-header { margin-bottom: 48px; }
.section-header--center { text-align: center; }
.section-header--center .section-lead { margin: 0 auto; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); border-radius: var(--radius-full); padding: 12px 28px; transition: all var(--duration) var(--ease); border: 2px solid transparent; white-space: nowrap; }
.btn .material-icons { font-size: 18px; }
.btn--primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25); }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.35); }
.btn--outline { border-color: var(--border); color: var(--ink); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--sm { padding: 8px 20px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 36px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

/* PRELOADER */
.preloader { position: fixed; inset: 0; z-index: var(--z-preloader); background: var(--white); display: flex; align-items: center; justify-content: center; transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease); }
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__inner { text-align: center; }
.preloader__ring { width: 36px; height: 36px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 14px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preloader__text { font-size: var(--fs-sm); font-weight: 800; color: var(--ink); letter-spacing: 0.1em; }

/* SCROLL PROGRESS */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: calc(var(--z-sticky) + 1); background: var(--primary); transform-origin: left; transform: scaleX(0); }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(0,0,0,0.04); transition: box-shadow var(--duration); }
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.navbar__brand { font-size: var(--fs-lg); font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.navbar__brand-icon { color: var(--primary); font-size: 0.9em; }
.navbar__list { display: flex; gap: 4px; }
.navbar__link { padding: 6px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); border-radius: var(--radius-md); transition: color var(--duration), background var(--duration); }
.navbar__link:hover, .navbar__link.active { color: var(--primary); background: var(--primary-light); }
.navbar__actions { display: flex; align-items: center; gap: 12px; }
.navbar__burger { display: none; flex-direction: column; gap: 5px; width: 24px; }
.navbar__burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: all var(--duration); }
.navbar__burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.active span:nth-child(2) { opacity: 0; }
.navbar__burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO — SPLIT */
.hero { padding: clamp(80px, 10vw, 130px) 0 var(--section-py); }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero__tag { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; display: block; }
.hero__title { font-size: var(--fs-4xl); font-weight: 900; line-height: 1.06; letter-spacing: -0.04em; color: var(--ink); margin-bottom: 18px; }
.hero__title em { font-family: var(--font-display); font-style: italic; font-weight: 600; color: var(--primary); }
.hero__lead { font-size: var(--fs-md); color: var(--muted); line-height: 1.8; margin-bottom: 32px; max-width: 480px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero__trust { display: flex; align-items: center; gap: 14px; }
.hero__trust-avatars { display: flex; }
.hero__trust-avatars img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--white); margin-left: -8px; object-fit: cover; }
.hero__trust-avatars img:first-child { margin-left: 0; }
.hero__trust span { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }

/* HERO VISUAL — DASHBOARD MOCK */
.hero__visual { position: relative; }
.hero__card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.hero__card--main { padding: 28px; }
.hero__card-header { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.hero__card-header .material-icons { font-size: 20px; color: var(--primary); }
.hero__card-value { font-size: var(--fs-2xl); font-weight: 900; color: var(--ink); letter-spacing: -0.03em; margin-bottom: 20px; }
.hero__card-badge { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: var(--fs-xs); font-weight: 800; padding: 3px 10px; border-radius: var(--radius-full); margin-left: 8px; }
.hero__card-chart { display: flex; align-items: flex-end; gap: 6px; height: 100px; }
.hero__bar { flex: 1; background: var(--gray-200); border-radius: 4px 4px 0 0; transition: background var(--duration); }
.hero__bar--active { background: var(--primary); }
.hero__card--small { position: absolute; display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.hero__card--small .material-icons { font-size: 22px; color: var(--primary); }
.hero__card--small strong { display: block; font-size: var(--fs-lg); font-weight: 900; color: var(--ink); }
.hero__card--small span { font-size: var(--fs-xs); color: var(--muted); }
.hero__card--top { top: -20px; right: -20px; }
.hero__card--bottom { bottom: -20px; left: -20px; }

/* LOGOS */
.logos { padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.logos__label { text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.logos__grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.logos__grid span { font-size: var(--fs-lg); font-weight: 900; color: var(--gray-300); letter-spacing: -0.02em; }

/* SERVICES */
.services { padding: var(--section-py) 0; }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--white); transition: all var(--duration); }
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(var(--primary-rgb), 0.15); }
.svc-card__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--primary-light); color: var(--primary); margin-bottom: 16px; }
.svc-card__icon .material-icons { font-size: 24px; }
.svc-card h3 { font-size: var(--fs-md); font-weight: 800; margin-bottom: 8px; }
.svc-card p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.svc-card__link { font-size: var(--fs-xs); font-weight: 700; color: var(--primary); transition: letter-spacing var(--duration); }
.svc-card__link:hover { letter-spacing: 0.03em; }

/* METHOD */
.method { padding: var(--section-py) 0; background: var(--canvas-alt); }
.method__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.method__step { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--white); text-align: center; transition: all var(--duration); }
.method__step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(var(--primary-rgb), 0.15); }
.method__step-num { font-size: var(--fs-2xl); font-weight: 900; color: rgba(var(--primary-rgb), 0.12); line-height: 1; margin-bottom: 12px; }
.method__step h3 { font-size: var(--fs-base); font-weight: 800; margin-bottom: 8px; }
.method__step p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.method__step-time { font-size: var(--fs-xs); font-weight: 700; color: var(--primary); }

/* STATS */
.stats { padding: 48px 0; border-bottom: 1px solid var(--border); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat strong { font-size: var(--fs-3xl); font-weight: 900; color: var(--ink); letter-spacing: -0.04em; display: inline; }
.stat span { font-size: var(--fs-xl); font-weight: 800; color: var(--primary); }
.stat p { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }

/* CASES — ROW STYLE */
.cases { padding: var(--section-py) 0; }
.cases__list { display: grid; gap: 0; }
.case-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border); transition: all var(--duration); }
.case-row:first-child { border-top: 1px solid var(--border); }
.case-row:hover { padding-left: 12px; background: var(--canvas-alt); }
.case-row__client { display: flex; align-items: center; gap: 16px; }
.case-row__client img { width: 56px; height: 56px; border-radius: var(--radius-md); object-fit: cover; }
.case-row__client strong { display: block; font-size: var(--fs-base); font-weight: 800; }
.case-row__client span { font-size: var(--fs-xs); color: var(--muted); }
.case-row__metrics { display: flex; gap: 24px; }
.case-row__metrics div { text-align: center; }
.case-row__metrics strong { display: block; font-size: var(--fs-lg); font-weight: 900; color: var(--primary); }
.case-row__metrics span { font-size: var(--fs-xs); color: var(--muted); }
.case-row__link { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); transition: all var(--duration); }
.case-row:hover .case-row__link { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* TEAM */
.team { padding: var(--section-py) 0; background: var(--canvas-alt); }
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card { text-align: center; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--white); transition: all var(--duration); }
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; }
.team-card h4 { font-size: var(--fs-base); font-weight: 800; margin-bottom: 2px; }
.team-card span { font-size: var(--fs-xs); color: var(--primary); font-weight: 600; }

/* TESTIMONIALS */
.testimonials { padding: var(--section-py) 0; }
.testi-card { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--white); }
.testi-card blockquote { font-size: var(--fs-md); color: var(--ink-soft); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
.testi-card__author { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.testi-card__author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.testi-card__author strong { display: block; font-size: var(--fs-sm); font-weight: 800; }
.testi-card__author span { font-size: var(--fs-xs); color: var(--muted); }

/* CTA */
.cta { padding: var(--section-py) 0; background: var(--gray-900); text-align: center; }
.cta .section-title { color: var(--white); }
.cta .section-title em { color: #34d399; }
.cta p { font-size: var(--fs-md); color: rgba(255,255,255,0.6); margin-bottom: 28px; }
.cta .btn--primary { background: var(--white); color: var(--gray-900); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.cta .btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }

/* FAQ */
.faq { padding: var(--section-py) 0; }
.faq__layout { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: 48px; align-items: start; }
.faq__list { display: grid; gap: 10px; }
.faq__item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--duration); }
.faq__item[open] { border-color: rgba(var(--primary-rgb), 0.2); box-shadow: var(--shadow-sm); }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; cursor: pointer; font-size: var(--fs-base); font-weight: 700; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q .material-icons { color: var(--primary); font-size: 20px; transition: transform var(--duration); flex-shrink: 0; }
.faq__item[open] .faq__q .material-icons { transform: rotate(180deg); }
.faq__a { padding: 0 22px 18px; }
.faq__a p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.8; }

/* CONTACT */
.contact { padding: var(--section-py) 0; background: var(--canvas-alt); }
.contact__grid { display: grid; grid-template-columns: 0.45fr 0.55fr; gap: 48px; align-items: start; }
.contact__details { display: grid; gap: 14px; margin-top: 24px; }
.contact__details > div { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--muted); }
.contact__details .material-icons { font-size: 20px; color: var(--primary); }
.contact__details a { color: var(--primary); font-weight: 600; }
.contact__form { padding: 32px; border-radius: var(--radius-2xl); background: var(--white); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: var(--fs-xs); font-weight: 700; margin-bottom: 5px; color: var(--ink-soft); }
.form-group--checkbox { display: flex; align-items: flex-start; gap: 8px; }
.form-group--checkbox input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--primary); }
.form-group--checkbox label { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 0; }
.form-group--checkbox a { color: var(--primary); font-weight: 600; }

/* FOOTER */
.footer { padding: 48px 0 0; border-top: 1px solid var(--border); }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; padding-bottom: 36px; }
.footer__logo { font-size: var(--fs-lg); font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer__logo span { color: var(--primary); }
.footer__brand p { font-size: var(--fs-sm); color: var(--gray-400); line-height: 1.6; }
.footer__cols { display: contents; }
.footer__cols > div h5 { font-size: var(--fs-sm); font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.footer__cols > div a { display: block; font-size: var(--fs-sm); color: var(--gray-400); padding: 3px 0; transition: color var(--duration); }
.footer__cols > div a:hover { color: var(--primary); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--gray-400); flex-wrap: wrap; gap: 10px; }
.footer__bottom div { display: flex; gap: 16px; }
.footer__bottom a { color: var(--gray-400); transition: color var(--duration); }
.footer__bottom a:hover { color: var(--primary); }

/* BACK TO TOP */
.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: var(--z-overlay); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all var(--duration); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .method__grid { grid-template-columns: repeat(2, 1fr); }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .case-row { grid-template-columns: 1fr auto; }
  .case-row__metrics { display: none; }
  .faq__layout { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .navbar__menu { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: var(--white); z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; }
  .navbar__menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s var(--ease); }
  .navbar__list { flex-direction: column; gap: 8px; }
  .navbar__link { font-size: var(--fs-lg); padding: 12px 24px; }
  .navbar__burger { display: flex; position: relative; z-index: calc(var(--z-overlay) + 1); }
}
@media (max-width: 768px) {
  .services__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero__title { font-size: var(--fs-2xl); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .method__grid { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
