/* ==========================================================================
   HaDo Solution — developer website
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #5b6475;
  --border: #e4e7ef;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --accent: #06b6d4;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --radius: 18px;
  --container: 1120px;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --bg-alt: #10162a;
    --surface: #141b31;
    --text: #e8ebf5;
    --text-muted: #9aa3b8;
    --border: #232c46;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-soft: #1d2348;
    --accent: #22d3ee;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --bg-alt: #10162a;
  --surface: #141b31;
  --text: #e8ebf5;
  --text-muted: #9aa3b8;
  --border: #232c46;
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-soft: #1d2348;
  --accent: #22d3ee;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

/* Base ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.gradient {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }

.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.nav-menu a:hover { color: var(--text); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Hero ------------------------------------------------------------------- */

.hero { padding: 80px 0 96px; overflow: hidden; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.stats { display: flex; flex-wrap: wrap; gap: 36px; margin: 40px 0 0; }
.stats dt { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.stats dd { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 440px; }

.phone {
  position: relative;
  z-index: 2;
  width: 220px;
  height: 440px;
  border-radius: 38px;
  padding: 12px;
  background: #0f172a;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.45);
  transform: rotate(-6deg);
  animation: float 6s ease-in-out infinite;
}
.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 70px;
  height: 18px;
  border-radius: 12px;
  background: #0f172a;
  transform: translateX(-50%);
  z-index: 2;
}
.phone-screen {
  height: 100%;
  border-radius: 28px;
  padding: 44px 16px 16px;
  background: linear-gradient(160deg, var(--primary-soft), var(--bg));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mock-bar { height: 12px; width: 60%; border-radius: 6px; background: var(--border); }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-grid img,
.mock-grid span {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  box-shadow: 0 4px 10px -4px rgba(15, 23, 42, 0.35);
}
.mock-grid span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.35;
}
.mock-card { height: 54px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.mock-card.short { width: 70%; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  z-index: 1;
}
.blob-1 { width: 280px; height: 280px; background: var(--primary); top: 10%; left: 5%; }
.blob-2 { width: 220px; height: 220px; background: var(--accent); bottom: 5%; right: 5%; }

@keyframes float {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(-6deg) translateY(-12px); }
}

/* Sections --------------------------------------------------------------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-sub { color: var(--text-muted); }

/* Apps ------------------------------------------------------------------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.app-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.app-card p { color: var(--text-muted); flex-grow: 1; }

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px -8px rgba(15, 23, 42, 0.35);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.tags li {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.store-links { display: flex; flex-wrap: wrap; gap: 10px; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  transition: opacity 0.2s;
}
.store-btn:hover { color: var(--bg); opacity: 0.85; }
.store-btn.is-disabled {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  cursor: default;
}

/* Features --------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.feature p { color: var(--text-muted); margin: 0; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  margin-bottom: 16px;
  color: var(--primary);
  background: var(--primary-soft);
}

/* Contact ---------------------------------------------------------------- */

.contact-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 48px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 55%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
}
.contact-card .section-sub { margin: 0; }
.contact-actions { display: flex; flex-direction: column; gap: 12px; }

/* Footer ----------------------------------------------------------------- */

.site-footer { padding: 32px 0; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* Legal pages ------------------------------------------------------------ */

.legal { padding: 64px 0 96px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2.2em; }
.legal p, .legal li { color: var(--text-muted); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.legal strong { color: var(--text); }
.legal .updated { font-size: 0.9rem; }

.not-found { min-height: calc(100vh - var(--header-h) - 100px); display: grid; place-items: center; text-align: center; }
.not-found h1 { font-size: clamp(4rem, 14vw, 8rem); margin: 0; }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero { padding: 48px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .stats { justify-content: center; }
  .hero-visual { min-height: 380px; }
  .phone { width: 180px; height: 360px; }

  .contact-card { grid-template-columns: 1fr; padding: 32px 24px; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav-menu a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-menu .theme-toggle { margin-top: 12px; }
  .nav-open .nav-menu { opacity: 1; transform: none; pointer-events: auto; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone { animation: none; }
  * { transition: none !important; }
}
