:root {
  --bg: #eef4fa;
  --bg-2: #e4edf6;
  --card: #ffffff;
  --ink: #0b2340;
  --muted: #5b7089;
  --line: #e2ebf4;
  --brand: #0ea5e9;
  --brand-2: #0891b2;
  --brand-deep: #075985;
  --accent: #f59e0b;
  --ok: #059669;
  --star: #f59e0b;
  --hero1: #071f34;
  --hero2: #0c3e5f;
  --hero3: #0e6d8a;
  --shadow: 0 10px 30px -14px rgba(6, 45, 80, .28);
  --shadow-lg: 0 30px 70px -28px rgba(6, 45, 80, .40);
  --radius: 18px;
  --wrap: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 44px); }
.hidden { display: none !important; }

/* ================= NAV ================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--ink); }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 8px 18px -6px rgba(8, 145, 178, .8);
}
.brand .logo .icon { width: 23px; height: 23px; }
.brand .wm { letter-spacing: -.03em; }
.brand .wm b { color: var(--brand); font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 9px 15px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: 15px; display: inline-flex; gap: 7px; align-items: center; transition: background .12s, color .12s; }
.nav-links a:hover { background: var(--bg-2); color: var(--ink); }
.nav-links a.cta { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 18px -8px rgba(8, 145, 178, .85); }
.nav-links a.cta:hover { color: #fff; filter: brightness(1.05); }
.nav-user { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; color: var(--brand-deep); font-weight: 700; font-size: 15px; }
.nav-user .icon { width: 17px; height: 17px; color: var(--brand); }

/* nav over dark hero (home) */
.home .nav { position: absolute; background: transparent; border-bottom: 0; backdrop-filter: none; }
.home .nav .brand { color: #fff; }
.home .nav .brand .wm b { color: #7dd3fc; }
.home .nav-links a { color: rgba(255, 255, 255, .82); }
.home .nav-links a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.home .nav-user { color: #fff; }
.home .nav-user .icon { color: #7dd3fc; }

/* ================= HERO ================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px clamp(16px, 4vw, 40px) 90px; overflow: hidden;
  background:
    radial-gradient(1000px 520px at 78% -6%, rgba(56, 189, 248, .30), transparent 60%),
    radial-gradient(760px 460px at 10% 108%, rgba(6, 182, 212, .26), transparent 60%),
    linear-gradient(160deg, var(--hero1) 0%, var(--hero2) 52%, var(--hero3) 100%);
  color: #eaf6ff;
}
/* blueprint pipe grid overlay */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M44 0H0V44' fill='none' stroke='%23ffffff' stroke-opacity='0.05'/%3E%3Ccircle cx='0' cy='0' r='1.5' fill='%23ffffff' fill-opacity='0.06'/%3E%3C/svg%3E");
}
/* light wave divider at bottom */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; pointer-events: none;
  background: var(--bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 70V26c180 34 360 34 540 8s360-52 540-26 300 34 360 26v36z' fill='black'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 70V26c180 34 360 34 540 8s360-52 540-26 300 34 360 26v36z' fill='black'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
.hero-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-decor svg { position: absolute; opacity: .07; color: #fff; }
.hero-decor .w1 { width: 380px; height: 380px; top: -60px; right: -70px; transform: rotate(18deg); }
.hero-decor .w2 { width: 260px; height: 260px; bottom: 10px; left: -60px; transform: rotate(-12deg); }

.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 900px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #d8f1ff;
  padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; backdrop-filter: blur(6px);
}
.pill .icon { width: 15px; height: 15px; color: #7dd3fc; }
.hero h1 {
  font-size: clamp(36px, 6.6vw, 68px); line-height: 1.02; letter-spacing: -.035em;
  margin: 22px auto 16px; font-weight: 800; max-width: 15ch;
}
.hero h1 .grad { background: linear-gradient(100deg, #7dd3fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: rgba(226, 244, 255, .82); font-size: clamp(16px, 2.1vw, 21px); max-width: 640px; margin: 0 auto 36px; line-height: 1.5; }

/* search */
.searchbar {
  display: flex; align-items: stretch; gap: 8px;
  background: #fff; border-radius: 999px; padding: 9px; width: 100%; max-width: 860px; margin: 0 auto;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .5);
}
.field { flex: 1; display: flex; align-items: center; gap: 11px; padding: 6px 18px; min-width: 0; }
.field + .field { border-left: 1px solid var(--line); }
.field .icon { color: var(--brand); }
.field input { border: 0; outline: 0; width: 100%; font-size: 16px; color: var(--ink); background: transparent; font-family: inherit; }
.field input::placeholder { color: #9fb2c6; }
.btn-search {
  border: 0; cursor: pointer; color: #fff; font-weight: 700; font-size: 16px;
  padding: 0 30px; border-radius: 999px; display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 22px -10px rgba(8, 145, 178, .95); transition: transform .12s, filter .12s;
}
.btn-search:hover { filter: brightness(1.06); }
.btn-search:active { transform: scale(.98); }

.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 24px auto 0; max-width: 680px; }
.chip {
  cursor: pointer; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #e6f6ff;
  padding: 8px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  display: inline-flex; gap: 7px; align-items: center; transition: all .12s; backdrop-filter: blur(4px);
}
.chip:hover { background: #fff; color: var(--brand-deep); border-color: #fff; }
.chip .icon { width: 15px; height: 15px; }
.chip:hover .icon { color: var(--brand); }

.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 56px); justify-content: center; margin-top: 46px; }
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.hero-stats span { font-size: 13px; color: rgba(226, 244, 255, .72); font-weight: 600; }

/* trust row (kept for compatibility) */
.trust { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; margin-top: 30px; color: rgba(226,244,255,.8); font-size: 14px; font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust .icon { width: 18px; height: 18px; color: #6ee7b7; }

/* ================= RESULTS ================= */
.results-wrap { padding-top: 10px; padding-bottom: 40px; }
.results-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 34px 0 4px; }
.results-head h2 { font-size: clamp(20px, 3vw, 26px); margin: 0; letter-spacing: -.02em; }
.source-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px; }
.source-tag.local { background: #e7f7ef; color: var(--ok); }
.source-tag.web { background: #e6f3ff; color: var(--brand-deep); }
.source-tag.ai { background: #fff7ed; color: #9a3412; }
.source-tag .icon { width: 15px; height: 15px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 20px 0 40px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfe3f4; }
.card-top { display: flex; align-items: flex-start; gap: 13px; }
.avatar {
  width: 52px; height: 52px; border-radius: 14px; flex: none; color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 16px -8px rgba(8, 145, 178, .7);
}
.avatar .icon { width: 24px; height: 24px; }
.card h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; line-height: 1.25; }
.verified { color: var(--brand); display: inline-flex; }
.verified .icon { width: 17px; height: 17px; }
.contact-name { color: var(--muted); font-size: 13px; margin-top: 3px; display: inline-flex; align-items: center; gap: 6px; }
.contact-name .icon { width: 14px; height: 14px; }
.rating { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 14px; color: var(--ink); }
.rating .icon { width: 16px; height: 16px; color: var(--star); fill: var(--star); }
.meta { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 14px; }
.meta div { display: flex; align-items: flex-start; gap: 9px; }
.meta .icon { width: 16px; height: 16px; color: var(--brand); margin-top: 1px; }
.services { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--bg-2); color: var(--brand-deep); font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 8px; }
.about { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 0; }
.card-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.btn {
  flex: 1; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 11px; border-radius: 12px; font-weight: 700; font-size: 14px; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all .12s; min-width: 0;
}
.btn:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; box-shadow: 0 8px 18px -10px rgba(8, 145, 178, .95); }
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn .icon { width: 16px; height: 16px; }

/* states */
.state { text-align: center; padding: 64px 20px; color: var(--muted); grid-column: 1 / -1; }
.state .spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--bg-2); border-top-color: var(--brand); margin: 0 auto 18px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state .icon-lg { width: 54px; height: 54px; color: var(--brand); margin-bottom: 12px; opacity: .85; }

/* ================= SERVICES BAND ================= */
.band { padding: clamp(46px, 7vw, 84px) 0; }
.band.alt { background: linear-gradient(180deg, #fff, var(--bg-2)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band h2 { text-align: center; font-size: clamp(24px, 4vw, 36px); letter-spacing: -.03em; margin: 0 0 8px; }
.band .band-sub { text-align: center; color: var(--muted); font-size: 17px; margin: 0 auto 42px; max-width: 560px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.svc {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow);
  transition: transform .14s, box-shadow .14s; cursor: pointer;
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.svc .ic { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 15px;
  background: linear-gradient(135deg, rgba(14,165,233,.14), rgba(8,145,178,.14)); color: var(--brand-2); }
.svc .ic .icon { width: 26px; height: 26px; }
.svc h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; }
.svc p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.step { text-align: center; padding: 10px; }
.step .num { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 10px 22px -10px rgba(8,145,178,.8); }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* ================= PANELS / FORMS ================= */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(22px, 4vw, 38px); }
.panel h2 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.panel h2 .icon { color: var(--brand); width: 24px; height: 24px; }
.panel .lead { color: var(--muted); margin: 0 0 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; color: var(--ink); }
label .req { color: #e11d48; }
input.in, textarea.in, select.in {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fbfdff; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input.in:focus, textarea.in:focus, select.in:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14, 165, 233, .13); background: #fff; }
textarea.in { resize: vertical; min-height: 92px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.form-actions { margin-top: 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 13px; flex: none; }

.tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px; box-shadow: var(--shadow); margin-bottom: 26px; }
.tab { border: 0; background: transparent; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 14.5px; color: var(--muted); padding: 10px 20px; border-radius: 999px; display: inline-flex; gap: 8px; align-items: center; transition: all .12s; }
.tab.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 18px -10px rgba(8, 145, 178, .85); }
.tab .icon { width: 17px; height: 17px; }

.page-head { padding: clamp(28px, 5vw, 48px) 0 8px; }
.page-head h1 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -.03em; margin: 0 0 8px; }
.page-head p { color: var(--muted); font-size: 17px; margin: 0; max-width: 600px; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; margin-bottom: 20px; font-size: 14.5px; }
.notice.success { background: #e7f7ef; color: #065f46; border: 1px solid #b8ebd2; }
.notice.error { background: #fdecef; color: #9f1239; border: 1px solid #f8c9d4; }
.notice .icon { flex: none; }

/* ================= AUTH ================= */
.auth-shell { min-height: calc(100vh - 71px); display: grid; place-items: center; padding: 40px 20px;
  background: radial-gradient(900px 500px at 50% -10%, #fff, var(--bg) 60%); }
.auth-wrap { width: 100%; max-width: 440px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: clamp(26px, 5vw, 40px); }
.auth-card h1 { font-size: 26px; letter-spacing: -.02em; margin: 6px 0 4px; }
.auth-card .lead { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.field-group { margin-bottom: 16px; }
.auth-switch { text-align: center; margin-top: 20px; color: var(--muted); font-size: 14.5px; }
.auth-switch a { color: var(--brand); font-weight: 700; }
.btn-block { width: 100%; justify-content: center; }
.logo-badge { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 12px 24px -8px rgba(8, 145, 178, .75); margin-bottom: 18px; }
.logo-badge .icon { width: 30px; height: 30px; }

/* ================= FOOTER ================= */
.footer { background: var(--hero1); color: rgba(226, 244, 255, .7); padding: 40px clamp(16px, 4vw, 44px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 14px; }
.footer .brand { font-size: 18px; color: #fff; }
.footer .brand .logo { width: 32px; height: 32px; border-radius: 9px; }
.footer .brand .logo .icon { width: 19px; height: 19px; }
.footer .brand .wm b { color: #7dd3fc; }

/* ================= RESPONSIVE ================= */
@media (max-width: 640px) {
  .searchbar { flex-direction: column; border-radius: 24px; }
  .field + .field { border-left: 0; border-top: 1px solid var(--line); }
  .btn-search { padding: 14px; justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-links a span.lbl { display: none; }
  .hero { min-height: 92svh; }
}
