/* ───── reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #0f172a;
  background: #fff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Honour notched devices — pads content away from the home indicator. */
  padding-left:  env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Form controls — keep font-size ≥16 px so iOS Safari doesn't auto-zoom
   when you focus an input. This is the single biggest UX fix for
   mobile web forms. */
input, select, textarea, button { font: inherit; }
input[type=text], input[type=email], input[type=url], input[type=password],
input[type=number], input[type=date], input[type=tel], input[type=search],
input[type=color], select, textarea { font-size: 16px; }
button, a, label, summary { touch-action: manipulation; }

/* Tap targets — minimum 40 px tall feels right for thumbs. */
.btn { min-height: 40px; }
.btn-sm { min-height: 32px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand, #6366f1); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 12px; color: #0b1220; font-weight: 700; }
h1 { font-size: clamp(28px, 5vw, 44px); }
h2 { font-size: clamp(24px, 3.5vw, 32px); }
h3 { font-size: 20px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
.muted { color: #64748b; }
.small { font-size: 13px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hide { display: none !important; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-32 { margin-top: 32px; }
.w-100 { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-2 .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } .grid-2 .span-2 { grid-column: auto; } }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }

/* ───── header / nav ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef2f7;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 20px; color: #0b1220; text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo { max-height: 36px; width: auto; }
.brand-name { background: linear-gradient(135deg, var(--brand,#6366f1), #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: #334155; font-weight: 500; }
.nav a:hover { color: var(--brand); text-decoration: none; }
.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  box-shadow: 0 14px 40px -16px rgba(15,23,42,0.18);
  padding: 8px; display: none; flex-direction: column; z-index: 60;
}
.dropdown-menu a { padding: 8px 12px; border-radius: 8px; color: #0f172a; }
.dropdown-menu a:hover { background: #f1f5f9; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: flex; }
.dropdown-empty { padding: 8px 12px; color: #94a3b8; font-size: 14px; }
.auth-buttons { display: flex; gap: 10px; }
.mobile-toggle { display: none; background: none; border: 0; width: 36px; height: 36px; cursor: pointer; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: #0f172a; margin: 4px auto; transition: .2s; }
.mobile-toggle.dark span { background: #fff; }

@media (max-width: 920px) {
  .nav, .auth-buttons { display: none; }
  .mobile-toggle { display: block; }
  body.nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; inset: 70px 0 0 0; background: #fff; padding: 24px;
    border-top: 1px solid #eef2f7; z-index: 40;
  }
  body.nav-open .auth-buttons {
    display: flex; flex-direction: column; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; background: #fff; padding: 20px;
    border-top: 1px solid #eef2f7; z-index: 40;
  }
  body.nav-open .dropdown-menu { position: static; box-shadow: none; border: 0; display: flex; padding-left: 12px; }
}

/* ───── buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none; transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  background: #fff; color: #0f172a;
}
/* Hover effects gated to devices that actually have a hovering cursor.
   Without this, taps on touch screens leave buttons stuck in the
   :hover state until the next tap. */
@media (hover: hover) {
  .btn:hover { text-decoration: none; transform: translateY(-1px); }
  .btn-primary:hover { box-shadow: 0 10px 28px -10px rgba(99,102,241,0.7); }
  .btn-ghost:hover { background: #f8fafc; }
}
.btn-primary { background: linear-gradient(135deg, var(--brand,#6366f1), #8b5cf6); color: #fff; box-shadow: 0 6px 24px -10px rgba(99,102,241,0.55); }
.btn-ghost { background: #fff; border-color: #e2e8f0; color: #0f172a; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-success { background: #10b981; color: #fff; }

/* ───── hero ───────────────────────────────────────────────────── */
.hero {
  padding: clamp(40px, 8vw, 96px) 0 clamp(28px, 5vw, 64px);
  background:
    radial-gradient(900px 500px at 80% -20%, rgba(139,92,246,0.20), transparent 60%),
    radial-gradient(700px 400px at 0% 20%, rgba(236,72,153,0.16), transparent 60%),
    #fff;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-text .lead { font-size: 18px; color: #475569; margin-top: 8px; }
.hero-cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hero-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.hero-trust > div { background: #fff; border: 1px solid #eef2f7; padding: 14px; border-radius: 14px; text-align: center; }
.hero-trust strong { display: block; font-size: 18px; color: #0b1220; }
.hero-trust span { font-size: 12px; color: #64748b; }
.hero-art { position: relative; height: 360px; }
.float-card {
  position: absolute; background: #fff; border: 1px solid #eef2f7;
  border-radius: 12px; padding: 12px 16px; font-weight: 600; font-size: 14px;
  box-shadow: 0 18px 42px -16px rgba(15,23,42,0.18);
  animation: floaty 6s ease-in-out infinite;
}
.float-card.c1 { top: 0; left: 10%; background: #ecfeff; color: #0e7490; animation-delay: 0s; }
.float-card.c2 { top: 25%; right: 5%; background: #fef3c7; color: #92400e; animation-delay: .7s; }
.float-card.c3 { top: 55%; left: 0; background: #fce7f3; color: #be185d; animation-delay: 1.4s; }
.float-card.c4 { top: 80%; right: 12%; background: #ddd6fe; color: #5b21b6; animation-delay: 2.1s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero-trust { grid-template-columns: repeat(2, 1fr); }
}

/* ───── sections ───────────────────────────────────────────────── */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section-alt { background: #f8fafc; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head h2 { margin-bottom: 8px; }
.page-hero { padding: clamp(40px, 6vw, 80px) 0 0; }
.page-hero h1 { margin-bottom: 8px; }
.page-hero .lead { color: #475569; font-size: 17px; max-width: 720px; }
.breadcrumbs { color: #94a3b8; font-size: 13px; margin-bottom: 12px; }
.breadcrumbs a { color: #64748b; }

/* ───── features ───────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: #fff; border: 1px solid #eef2f7; padding: 26px; border-radius: 16px; }
.feature-icon { font-size: 28px; margin-bottom: 8px; }
@media (max-width: 920px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

/* ───── categories grid ────────────────────────────────────────── */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.category-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 22px;
  display: flex; flex-direction: column; gap: 6px; color: #0f172a;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.category-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 18px 38px -22px rgba(99,102,241,0.45); text-decoration: none; }
.category-icon { font-size: 28px; }
.category-card .from { color: #0b1220; font-size: 14px; }
@media (max-width: 920px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .category-grid { grid-template-columns: 1fr; } }

/* ───── service grid ───────────────────────────────────────────── */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 22px;
  color: #0f172a; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.service-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 18px 38px -22px rgba(99,102,241,0.45); text-decoration: none; }
.service-pill { display: inline-block; padding: 3px 9px; background: #eef2ff; color: #4338ca; border-radius: 999px; font-size: 11px; font-weight: 600; align-self: flex-start; }
.service-meta { display: flex; align-items: center; justify-content: space-between; }
.service-meta strong { font-size: 17px; }
.service-cta { color: var(--brand); font-weight: 600; }
@media (max-width: 920px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .service-grid { grid-template-columns: 1fr; } }

/* ───── tables ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid #eef2f7; border-radius: 14px; }
.services-table { width: 100%; border-collapse: collapse; background: #fff; }
.services-table th, .services-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.services-table th { background: #f8fafc; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; }
.services-table td.num, .services-table th.num { text-align: right; }
.category-block { margin-bottom: 36px; }
.category-block-head { margin-bottom: 12px; }
.category-block-head h2 { margin-bottom: 4px; }

.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; margin-right: 4px; }
.chip-ok { background: #ecfdf5; color: #047857; }
.chip-info { background: #eff6ff; color: #1d4ed8; }
.chip-warn { background: #fff7ed; color: #b45309; }
.chip-err { background: #fef2f2; color: #b91c1c; }

/* ───── service detail ────────────────────────────────────────── */
.service-detail { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.service-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.summary-item { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 14px; }
.summary-item .big { font-size: 22px; color: var(--brand); }
.summary-item span { display: block; font-size: 12px; }
.service-description ul.checklist { list-style: none; padding: 0; }
.service-description ul.checklist li { padding-left: 24px; position: relative; margin-bottom: 6px; }
.service-description ul.checklist li::before { content: '✓'; position: absolute; left: 0; color: #10b981; font-weight: 700; }
.service-order { position: relative; }
.service-order .sticky { position: sticky; top: 90px; }
.card { background: #fff; border: 1px solid #eef2f7; border-radius: 16px; padding: 22px; }
.card h2 { margin-top: 0; font-size: 20px; }
.card form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 12px; }
.card form input[type=text], .card form input[type=email], .card form input[type=url], .card form input[type=password], .card form input[type=number], .card form input[type=color], .card form select, .card form textarea {
  padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; font: inherit; background: #fff; color: #0f172a;
}
.card form input:focus, .card form select:focus, .card form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,0.16);
}
.hint { font-weight: 400; color: #94a3b8; }
.estimate { background: #f1f5f9; padding: 10px 14px; border-radius: 10px; margin: 12px 0; }
@media (max-width: 920px) { .service-detail { grid-template-columns: 1fr; } .service-summary { grid-template-columns: repeat(2, 1fr); } .service-order .sticky { position: static; } }

/* ───── how-it-works steps ─────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: #fff; border: 1px solid #eef2f7; border-radius: 16px; padding: 26px; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand,#6366f1), #8b5cf6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 10px;
}
@media (max-width: 920px) { .steps { grid-template-columns: 1fr; } }

/* ───── blog ───────────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-grid-3 { grid-template-columns: repeat(3, 1fr); }
.blog-card { background: #fff; border: 1px solid #eef2f7; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.blog-cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.blog-body h2, .blog-body h3 { margin: 0; font-size: 18px; }
.blog-body h2 a, .blog-body h3 a { color: #0b1220; }
.blog-body h2 a:hover, .blog-body h3 a:hover { color: var(--brand); text-decoration: none; }
.link { color: var(--brand); font-weight: 600; }
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; gap: 12px; flex-wrap: wrap; }
@media (max-width: 920px) { .blog-grid, .blog-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .blog-grid, .blog-grid-3 { grid-template-columns: 1fr; } }

.post-hero { padding: clamp(40px, 6vw, 80px) 0 24px; background: #f8fafc; }
.post-cover { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: 16px; margin: 24px 0; }
.post-body { font-size: 17px; line-height: 1.7; }
.post-body h2, .post-body h3 { margin-top: 32px; }
.post-body img { border-radius: 10px; margin: 12px 0; }
.post-body code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }
.post-body pre { background: #0b1220; color: #e2e8f0; padding: 16px; border-radius: 10px; overflow-x: auto; }
.prose { font-size: 16px; line-height: 1.7; }

/* ───── empty / CTA ────────────────────────────────────────────── */
.empty { text-align: center; padding: 80px 20px; }
.cta-band {
  background: linear-gradient(135deg, var(--brand,#6366f1), #8b5cf6);
  color: #fff;
}
.cta-band h2 { color: #fff; }
.cta-band .muted { color: rgba(255,255,255,0.85); }

/* ───── footer ─────────────────────────────────────────────────── */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 56px 0 24px; margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.footer-col a { color: #cbd5e1; display: block; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-col .brand-name { background: linear-gradient(135deg, #c4b5fd, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-col .muted { color: #94a3b8; }
.footer-col .socials { display: flex; gap: 12px; margin-top: 12px; }
.footer-col .socials a { display: inline; }
.footer-bottom { padding-top: 18px; color: #94a3b8; font-size: 13px; text-align: center; }
@media (max-width: 920px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }

/* ───── auth pages ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(700px 380px at 100% 0%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(600px 320px at 0% 100%, rgba(236,72,153,0.16), transparent 60%),
    #f8fafc;
}
.auth-shell { width: 100%; max-width: 440px; padding: 24px; }
.auth-brand {
  display: block; text-align: center; margin-bottom: 20px;
  font-weight: 800; font-size: 22px; text-decoration: none;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 28px; box-shadow: 0 22px 60px -32px rgba(15,23,42,0.18); }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-footer { text-align: center; margin-top: 18px; color: #64748b; font-size: 14px; }
.form-row { display: flex; justify-content: flex-end; margin-top: -6px; margin-bottom: 12px; }
.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 10px; border-radius: 10px; font-size: 14px; margin-top: 8px; }
.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 10px; border-radius: 10px; font-size: 14px; margin-top: 8px; }

/* ───── PWA install card ───────────────────────────────────────────
   Bottom-right toast on desktop, full-width sheet on mobile. Slide-up
   animation triggered by the .pwa-visible class set in JS after the
   element is appended (so the transition actually runs). */
#pwaInstallCard {
  position: fixed; z-index: 1000;
  right: 16px; bottom: 16px; width: 360px; max-width: calc(100vw - 32px);
  background: #fff; color: #0f172a;
  border: 1px solid #e5e7eb; border-radius: 16px;
  box-shadow: 0 22px 60px -20px rgba(15,23,42,0.28);
  padding: 16px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 280ms cubic-bezier(.16,1,.3,1), opacity 280ms;
  /* Stay clear of the iOS home indicator. */
  margin-bottom: env(safe-area-inset-bottom);
}
#pwaInstallCard.pwa-visible { transform: translateY(0); opacity: 1; }
.pwa-card-inner { display: grid; grid-template-columns: 36px 1fr; row-gap: 4px; column-gap: 12px; align-items: start; }
.pwa-card-icon { font-size: 26px; line-height: 1; padding-top: 2px; }
.pwa-card-title { font-weight: 700; font-size: 15px; }
.pwa-card-text  { font-size: 13px; color: #475569; line-height: 1.5; }
.pwa-card-actions {
  grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 10px;
}
.pwa-btn {
  border: 0; padding: 9px 16px; border-radius: 9px; font-weight: 600; font-size: 13px;
  cursor: pointer; font-family: inherit; min-height: 36px;
}
.pwa-btn-primary { background: linear-gradient(135deg, var(--brand,#6366f1), #8b5cf6); color: #fff; }
.pwa-btn-ghost   { background: #f1f5f9; color: #0f172a; }
@media (max-width: 480px) {
  #pwaInstallCard {
    right: 0; left: 0; bottom: 0; width: auto; max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
}

/* ───── small-screen polish ──────────────────────────────────────── */
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .section { padding: 36px 0; }
  .section-head { margin-bottom: 22px; }
  .page-hero { padding: 32px 0 0; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; }
  /* Stack the long footer columns evenly */
  .footer-inner { padding-bottom: 22px; }
  .footer-col h4 { margin-top: 14px; }
}
/* Cards on tiny screens: less padding so headings don't wrap awkwardly */
@media (max-width: 480px) {
  .card { padding: 16px; }
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
}
