:root {
  --bg: #F9FAFB;
  --surface: #ffffff;
  --elev: #E1E5EA;
  --text: #1C1C1C;
  --muted: #6B7280;
  --primary: #00B5E2;
  --secondary: #003B73;
  --accent: #00B5E2;
  --ring: color-mix(in oklab, var(--primary), white 20%);
  --grad: linear-gradient(135deg, #00B5E2, #003B73 70%);
  --radius: 16px;
  --shadow-1: 0 10px 30px -10px rgba(0,181,226,.35);
  --shadow-2: 0 20px 60px -20px rgba(0,59,115,.25);
  --maxw: 1200px;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"], html[data-theme="dark"] {
    --bg: #0a0f1a;
    --surface: #1a1f2e;
    --elev: #2a2f3e;
    --text: #F9FAFB;
    --muted: #9CA3AF;
    --ring: color-mix(in oklab, var(--primary), black 10%);
  }
}

html[data-theme="light"] {
  --bg: #F9FAFB;
  --surface: #ffffff;
  --elev: #E1E5EA;
  --text: #1C1C1C;
  --muted: #6B7280;
}

* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 80% -10%, rgba(0,181,226,.08), transparent 40%),
              radial-gradient(900px 600px at -10% 30%, rgba(0,59,115,.06), transparent 45%),
              var(--bg);
  line-height: 1.5;
}

/* A11y */
.skip { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { position: fixed; left: 1rem; top: 1rem; width: auto; height: auto; padding: .75rem 1rem; background: var(--surface); color: var(--text); border-radius: 8px; box-shadow: var(--shadow-1) }

/* Containers */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem }
.section { padding: 80px 0 }
@media (min-width: 992px) { .section { padding: 110px 0 } }

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--surface), transparent 10%);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid color-mix(in oklab, var(--elev), transparent 30%);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: .7rem 0 }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit }
.brand svg { width: 34px; height: 34px }
.brand .name { font-family: "Space Grotesk", Inter, sans-serif; font-weight: 800; letter-spacing: .2px; font-size: 1.15rem }
.navlinks { display: flex; align-items: center; gap: 1rem; font-weight: 600 }
.navlinks a { color: var(--muted); text-decoration: none }
.navlinks a:hover { color: var(--text) }
.theme-toggle {
  border: 1px solid color-mix(in oklab, var(--muted), transparent 60%);
  background: color-mix(in oklab, var(--surface), transparent 10%);
  color: var(--text); width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
}
.burger { display: none; background: none; border: none; color: var(--text); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }

@media (max-width: 860px) {
  .navlinks { display: none }
  .burger { display: grid; place-items: center }
  .mobile { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid color-mix(in oklab, var(--muted), transparent 75%) }
  .mobile.open { display: block; animation: dropdown .25s ease-out both }
  .mobile a { display: block; padding: 14px 20px; color: var(--muted); text-decoration: none }
  .mobile a:hover { background: color-mix(in oklab, var(--elev), transparent 30%); color: var(--text) }
}

@keyframes dropdown { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: translateY(0) } }

/* Hero */
.hero { display: grid; gap: 28px; grid-template-columns: 1.15fr 1fr; align-items: center }
.badge {
  display: inline-flex; align-items: center; gap: .6rem; padding: .35rem .6rem; border-radius: 999px; font-weight: 700; font-size: .8rem;
  color: var(--text); background: color-mix(in oklab, var(--elev), transparent 25%); border: 1px solid color-mix(in oklab, var(--muted), transparent 60%)
}
.h1 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2rem, 3.6vw + .5rem, 4rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 10px 0 8px;
  text-wrap: balance;
}
.h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent }
.lede { color: var(--muted); font-size: clamp(1rem, 1.3vw + .5rem, 1.25rem); max-width: 60ch }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.1rem; border-radius: 12px; font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; box-shadow: var(--shadow-1) }
.btn-ghost { background: var(--surface); color: var(--text); border-color: color-mix(in oklab, var(--elev), transparent 30%) }

.hero-media {
  position: relative; isolation: isolate; min-height: 360px; border-radius: var(--radius);
  background: radial-gradient(650px 300px at 70% 20%, rgba(0,181,226,.12), transparent 50%), 
              linear-gradient(180deg, color-mix(in oklab, var(--elev), transparent 20%), transparent 60%);
  border: 1px solid color-mix(in oklab, var(--elev), transparent 50%);
  overflow: hidden; box-shadow: var(--shadow-2);
}

@media (max-width: 980px) { 
  .hero { grid-template-columns: 1fr } 
  .hero-media { min-height: 300px } 
}

/* Services Grid */
.title { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(1.6rem, 1.6vw + 1rem, 2.4rem); margin: 0 0 10px }
.sub { color: var(--muted); max-width: 70ch }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 26px }
.card {
  background: var(--surface); 
  border: 1px solid color-mix(in oklab, var(--elev), transparent 40%); 
  border-radius: 16px; padding: 18px; transition: transform .2s ease, border-color .2s ease;
  box-shadow: 0 4px 20px -8px rgba(0,181,226,.15);
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--primary), transparent 40%); box-shadow: 0 8px 30px -8px rgba(0,181,226,.25) }
.icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; box-shadow: var(--shadow-1); margin-bottom: 8px
}
.card h3 { margin: 8px 0 6px }
.card p { color: var(--muted); font-size: .95rem }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease }
.reveal.in { opacity: 1; transform: translateY(0) }

/* Footer */
footer { border-top: 1px solid color-mix(in oklab, var(--muted), transparent 75%); padding: 20px 0; color: var(--muted) }
.foot { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap }
.foot a { color: var(--muted); text-decoration: none }
.foot a:hover { color: var(--text) }

/* Contact Form */
.contact { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; max-width: 1200px; margin: 0 auto }
.form { display: grid; gap: 12px; flex: 1 1 340px; min-width: 280px; max-width: 500px }
.contact-info { flex: 1 1 320px; min-width: 260px; max-width: 400px }

.form { display: grid; gap: 12px }
.input, textarea {
  width: 100%; padding: .85rem 1rem; border-radius: 12px; border: 1px solid color-mix(in oklab, var(--elev), transparent 20%);
  background: var(--surface); color: var(--text); outline: none; font-family: inherit;
}
.input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary), transparent 80%) }
textarea { min-height: 140px; resize: vertical }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(10px); background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--elev), transparent 30%); color: var(--text); padding: .75rem 1rem; border-radius: 12px;
  box-shadow: var(--shadow-1); opacity: 0; transition: .25s ease; z-index: 60
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) }

/* Back to top */
.top {
  position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; border: none; box-shadow: var(--shadow-1);
  display: grid; place-items: center; opacity: 0; visibility: hidden; transition: .25s ease; z-index: 55; cursor: pointer;
}
.top.show { opacity: 1; visibility: visible }

/* Phone Input Component */
.phone-input-container {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.country-select {
  min-width: 100px;
  max-width: 120px;
  padding: .85rem .5rem;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--elev), transparent 20%);
  background: var(--surface);
  color: var(--text);
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
}

.country-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary), transparent 80%);
}

.phone-number {
  flex: 1;
  min-width: 0;
}

.phone-input-container .input {
  margin: 0;
}

/* Country select dropdown styling */
.country-select option {
  padding: 8px;
  font-size: 0.9rem;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.country-select {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", Inter, system-ui, sans-serif;
}

@media (max-width: 480px) {
  .phone-input-container {
    flex-direction: column;
    gap: 12px;
  }
  
  .country-select {
    min-width: 100%;
    max-width: 100%;
  }
}

/* intl-tel-input tweaks */
.iti { width: 100%; }
.iti__flag { box-shadow: none; }
.iti__country-list { max-height: 300px; overflow: auto; z-index: 1000; }
.iti input { padding-left: 54px; } /* keep spacing for flag in some themes */
