/* =========================
   Mobile-first Design System (Pro)
   ========================= */
:root{
  /* Palette */
  --bg: radial-gradient(circle at 20% -20%, #0c1224 0%, #080c15 30%, #0b0d12 100%);
  --card: #1c2438a6;
  --muted: #b8c2d4;
  --text: #eaf0ff;
  --brand: #3aaaff;
  --brand-2: #7ae1ff;
  --stroke: #1e2430;
  --ok: #34d399;

  /* Elevation & Radius */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(0,0,0,.28);

  /* Fluid Type (mobile-first) */
  --fs-xs: clamp(12px, 0.72rem + 0.1vw, 13px);
  --fs-sm: clamp(13px, 0.78rem + 0.2vw, 14px);
  --fs-md: clamp(14px, 0.85rem + 0.3vw, 16px);
  --fs-lg: clamp(18px, 1.05rem + 0.5vw, 22px);
  --fs-xl: clamp(24px, 1.4rem + 1vw, 34px);
  --fs-2xl: clamp(28px, 1.6rem + 1.6vw, 44px);

  /* Spacing */
  --s-1: 4px;
  --s0: 8px;
  --s1: 12px;
  --s2: 16px;
  --s3: 20px;
  --s4: 24px;
  --s5: 32px;
  --s6: 40px;
  --s7: clamp(40px, 6vw, 56px);
  --s8: clamp(56px, 8vw, 72px);

  /* Layout */
  --container-max: 1160px;

  /* Safe area */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
  --speed-1: 120ms;
  --speed-2: 220ms;
}

/* Light mode (auto) */
@media (prefers-color-scheme: light){
  :root{
    --bg: #f6f8fb;
    --card: #ffffff;
    --muted: #586174;
    --text: #0b0f19;
    --brand: #1769ff;
    --brand-2: #5fb6ff;
    --stroke: #e6e9f0;
    --ok: #0f9d58;
    --shadow: 0 8px 28px rgba(18, 22, 28, .08);
  }
}

/* Reset + base */
*{ box-sizing:border-box; }
html,body{
  margin:0; padding:0;
  background:var(--bg); color:var(--text);
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
button,input,select,textarea{ font:inherit; color:inherit; }
p{ line-height:1.65; margin: var(--s1) 0 var(--s3); font-size: var(--fs-md); }
h1,h2,h3{ line-height:1.2; margin:0 0 var(--s2); }
h1{ font-size: var(--fs-2xl); font-weight: 800; letter-spacing:.2px; }
h2{ font-size: var(--fs-xl); font-weight: 800; }
h3{ font-size: var(--fs-lg); font-weight: 700; }
small{ color: var(--muted); font-size: var(--fs-xs); }

/* Focus visible accesible */
:focus-visible{
  outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Container */
.container{
  width:min(var(--container-max), 94%);
  margin-inline:auto;
  padding-inline: max(var(--s1), var(--safe-left));
}

/* Header / Navigation */
.site-header{
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-top);
  backdrop-filter: saturate(140%) blur(8px);
  background: linear-gradient(180deg, color-mix(in srgb, #0b0d12 92%, transparent), color-mix(in srgb, #0b0d12 65%, transparent) 60%, transparent);
  border-bottom: 1px solid var(--stroke);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding-block: var(--s2);
  gap: var(--s2);
}
.brand{ display:flex; align-items:center; gap: var(--s1); min-height:44px; }
.logo{
  width:40px; height:40px; border-radius:9px; background:#fff; padding:6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.brand-text{ display:flex; flex-direction:column; line-height:1; }
.brand-text strong{ font-weight:800; letter-spacing:.2px; font-size: var(--fs-md); }
.brand-text span{ color:var(--muted); font-size: var(--fs-sm); }

.nav{ display:none; flex-direction:column; position:absolute; right:12px; top:calc(56px + var(--safe-top)); background: #0c1a32; border:1px solid var(--stroke); padding:12px; border-radius:12px; gap:8px; width: min(90vw, 320px); box-shadow: var(--shadow); }
.nav a{ opacity:.92; padding:12px; border-radius:10px; transition: background var(--speed-1) var(--ease), opacity var(--speed-1) var(--ease); }
.nav a:hover{ opacity:1; background: #0f1626; }
.nav .btn-sm{ padding:10px 12px; border:1px solid var(--stroke); border-radius:var(--radius-sm); }
.nav.open{ display:flex; }
.nav a[aria-current="page"]{ outline:2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-radius:10px; }

.nav-toggle{
  display:flex; background:none; border:0; flex-direction:column; gap:4px; padding:8px;
  border-radius:10px; min-width:44px; min-height:44px; align-items:center; justify-content:center;
}
.nav-toggle span{ display:block; width:22px; height:2px; background:var(--text); border-radius:1px; }

/* Section rhythm */
main > section{ padding-block: var(--s6); }
main > section + section{ border-top:1px solid var(--stroke); }
:target{ scroll-margin-top: 84px; }

/* Hero */
.hero{
  display:grid; grid-template-columns:1fr; gap: var(--s4); align-items:start;
  padding-top: var(--s7);
}
.hero h1{ font-size: var(--fs-2xl); margin-bottom: var(--s2); }
.accent{
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero p{ color: var(--muted); max-width: 68ch; margin-bottom: var(--s3); }
.hero-cta{ display:flex; gap: var(--s2); margin-top: var(--s2); flex-wrap:wrap; }
.badges{ display:flex; gap:6px; flex-wrap:wrap; margin: var(--s2) 0 0; padding:0; list-style:none; }
.badges li{
  border:1px solid var(--stroke); padding:6px 10px; border-radius:999px; color:var(--muted);
  font-size: var(--fs-sm);
}

/* Hero card */
.hero-card{
  background: radial-gradient(900px 60% at 100% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent), var(--card);
  border:1px solid var(--stroke); padding: var(--s3); border-radius: var(--radius);
  display:grid; gap: var(--s2); align-self:stretch; box-shadow: var(--shadow);
}
.kpi{ display:flex; flex-direction:column; background: #0e131d; border:1px solid var(--stroke); padding: var(--s3); border-radius: 12px; }
.kpi-value{ font-size: clamp(22px, 6vw, 32px); font-weight:800; color: var(--brand); }
.kpi-label{ color: var(--muted); font-size: var(--fs-sm); }

/* Cards & Grids */
.grid-3{ display:grid; grid-template-columns:1fr; gap: var(--s3); }
.card{
  background:var(--card); border:1px solid var(--stroke); border-radius:var(--radius);
  padding: clamp(var(--s3), 4vw, var(--s4));
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display:flex; flex-direction:column; min-height: 100%;
}
.card h3{ margin-top:0; margin-bottom: var(--s2); }
.bullet{ margin: var(--s2) 0 0; padding:0 0 0 var(--s4); color: var(--muted); font-size: var(--fs-md); }
.bullet li{ margin:8px 0; }

/* Sectors / Stack */
.sectors h2{ margin-bottom: var(--s3); }
.chips{ display:flex; flex-wrap:wrap; gap:8px; margin: var(--s2) 0 var(--s4); }
.chips span{ border:1px solid var(--stroke); border-radius:999px; padding:8px 12px; color:var(--muted); font-size: var(--fs-sm); }
.tech ul{ display:grid; grid-template-columns:1fr; gap:6px; color:var(--muted); padding-left: calc(var(--s3) + 6px); font-size: var(--fs-md); }

/* Process / Value */
.value{ display:grid; grid-template-columns:1fr; gap: var(--s4); align-items:start; }
.value-left p{ margin-bottom: var(--s3); }
.value-right{ display:grid; gap: var(--s2); }
.stat{ padding: var(--s3); border:1px dashed var(--stroke); border-radius:12px; background:#0f1420; }
.stat-title{ font-weight:700; }
.stat-desc{ display:block; color:var(--muted); margin-top:4px; font-size: var(--fs-sm); }

/* Cases */
.cases h2{ margin-bottom: var(--s3); }
.cases .grid-3{ gap: var(--s3); }
.case{
  background: linear-gradient(180deg, #101725, #0c121d);
  border:1px solid var(--stroke); padding: var(--s4);
  border-radius:14px; box-shadow: 0 10px 28px rgba(0,0,0,.2);
}
.case-kpi{ font-size: clamp(20px, 5.5vw, 28px); font-weight:800; color: var(--ok); margin-bottom: var(--s1); }
.note{ color:#9aa6bc; display:block; margin-top: var(--s2); font-size: var(--fs-sm); }

/* Contact */
.contact{ display:grid; grid-template-columns:1fr; gap: var(--s4); align-items:start; }
.contact-text p{ color:var(--muted); }
.contact-cards{ display:flex; gap: var(--s2); flex-wrap:wrap; margin-top: var(--s2); }
.contact-card{
  display:flex; align-items:center; gap:8px; border:1px solid var(--stroke);
  border-radius: var(--radius-sm); padding:10px 12px; color:var(--muted);
  transition: background var(--speed-1) var(--ease), transform var(--speed-1) var(--ease);
  min-height: 44px;
}
.contact-card:hover{ background:#0e1420; transform: translateY(-1px); }
.contact-card svg{ width:18px; height:18px; }

/* Form */
.form label{ display:block; font-size:.95rem; color:var(--muted); margin-top: var(--s2); }
.form input,.form textarea,.form select{
  width:100%; margin-top:6px; background:#0d121b; border:1px solid var(--stroke);
  color:var(--text); border-radius: var(--radius-sm); padding:14px 12px; outline:none;
  transition: border-color var(--speed-1) var(--ease), box-shadow var(--speed-1) var(--ease);
  line-height:1.25; min-height:44px;
}
.form textarea{ min-height: 120px; resize: vertical; }
.form input:focus,.form textarea:focus,.form select:focus{
  border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.form .btn{ margin-top: var(--s3); width:100%; }

/* Buttons */
.btn{
  display:inline-block; background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color:#001018; border:0; border-radius:12px; padding:14px 16px; font-weight:800;
  transition: transform 60ms var(--ease), filter var(--speed-1) var(--ease);
  min-height:44px; text-align:center;
}
.btn:hover{ filter:saturate(1.1) brightness(1.05); }
.btn:active{ transform: translateY(1px); }
.btn-ghost{
  border:1px solid var(--stroke); background:transparent; color:var(--text);
  padding:12px 14px; border-radius:12px; min-height:44px; font-weight:700;
}
.btn-sm{ font-size: var(--fs-sm); padding: 10px 12px; border-radius: 10px; }

/* Footer */
.site-footer{
  border-top:1px solid var(--stroke); padding: var(--s4) 0; background:#0a0e16;
  margin-top: var(--s6); padding-bottom: calc(var(--s4) + var(--safe-bottom));
}
.footer-inner{ display:flex; flex-direction:column; gap: var(--s2); align-items:flex-start; }
.logo-sm{ width:28px; height:28px; border-radius:6px; background:#fff; padding:4px; margin-right:8px; box-shadow:0 2px 10px rgba(0,0,0,.25); }
.footer-left{ display:flex; align-items:center; gap:8px; color:var(--muted); }
.footer-right{ display:flex; gap: var(--s3); flex-wrap:wrap; }
.footer-right a{ color:var(--muted); opacity:.9; }
.footer-right a:hover{ opacity:1; }

/* Floating action */
.floating-wa{
  position:fixed; right:16px; bottom:calc(16px + var(--safe-bottom));
  background:#25D366; color:#041b10; border-radius:999px;
  padding:12px 16px; font-weight:800; border:0; box-shadow:var(--shadow);
  min-height:44px;
}

/* Utilities */
.flex{ display:flex; }
.center{ display:grid; place-items:center; }
.hide{ display:none !important; }
.max-w-prose{ max-width: 68ch; }
.mt-0{ margin-top:0; } .mt-1{ margin-top:var(--s1); } .mt-2{ margin-top:var(--s2); } .mt-3{ margin-top:var(--s3); } .mt-4{ margin-top:var(--s4); }
.mb-0{ margin-bottom:0; } .mb-1{ margin-bottom:var(--s1); } .mb-2{ margin-bottom:var(--s2); } .mb-3{ margin-bottom:var(--s3); } .mb-4{ margin-bottom:var(--s4); }
.pad-inline{ padding-inline: var(--s2); }

/* Screen-reader only */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Responsive Upscales */
@media (min-width: 700px){
  .grid-3{ grid-template-columns: repeat(2, 1fr); }
  .tech ul{ grid-template-columns: repeat(2, 1fr); }
  .footer-inner{ flex-direction:row; justify-content:space-between; align-items:center; }
}

@media (min-width: 860px){

  /* Align Contact button to the right */
  .nav .btn-sm{
    margin-left: auto;
  }

  main > section{ padding-block: var(--s7); }
  .hero{ grid-template-columns: 1.15fr .85fr; gap: var(--s6); padding-top: var(--s8); }
  .nav{ position:static; display:flex; flex-direction:row; gap: var(--s4); background:transparent; border:0; padding:0; width:auto; box-shadow:none; }
  .nav a{ padding: 0; border-radius:0; }
  .nav-toggle{ display:none; }
  .value{ grid-template-columns: 1.1fr .9fr; gap: var(--s5); }
  .contact{ grid-template-columns: 1.1fr .9fr; gap: var(--s5); }
  .grid-3{ grid-template-columns: repeat(3, 1fr); }
  .tech ul{ grid-template-columns: repeat(3, 1fr); }
}

/* Print */
@media print{
  .site-header, .site-footer, .floating-wa, .nav-toggle{ display:none !important; }
  body{ background:#fff; color:#000; }
  .card, .case, .hero-card{ border:1px solid #999; box-shadow:none; }
}
