:root{
  --bg:#F8FAFC;
  --card:#FFFFFF;
  --text:#0B1220;
  --muted:#64748B;
  --border:#E2E8F0;

  --navy:#0F172A;
  --primary:#2563EB;
  --primary-hover:#1D4ED8;

  --shadow: 0 10px 30px rgba(2, 6, 23, .08);
  --radius: 18px;
  --container: 1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(37,99,235,.18), transparent 60%),
    radial-gradient(1000px 500px at 90% 0%, rgba(15,23,42,.12), transparent 55%),
    var(--bg);
}
a{color:inherit;text-decoration:none}
.container{max-width:var(--container); margin:0 auto; padding:0 18px}

.topbar{
  position:sticky; top:0; z-index:10;
  background:rgba(248,250,252,.82);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(226,232,240,.65);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:14px;
}
.brand{
  display:flex; gap:10px; align-items:center; font-weight:700;
  letter-spacing:-.02em;
  white-space:nowrap;
}
.logo{
  width:34px; height:34px; border-radius:10px;
  background:linear-gradient(135deg, var(--primary), #60A5FA);
  box-shadow: 0 8px 18px rgba(37,99,235,.25);
}
.nav{
  display:flex; gap:18px; align-items:center;
  color:var(--muted); font-weight:500; font-size:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.nav a:hover{color:var(--text)}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  height:44px; padding:0 16px;
  border-radius:12px;
  border:1px solid transparent;
  font-weight:600; font-size:14px;
  cursor:pointer;
  white-space:nowrap;

  /* better micro-interaction */
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background:var(--primary);
  color:white;
  box-shadow: 0 10px 20px rgba(37,99,235,.18);
  animation: pulse 3.2s infinite;
}
.btn-primary:hover{background:var(--primary-hover)}

.btn-ghost{
  background:transparent;
  border-color:var(--border);
  color:var(--navy);
}
.btn-ghost:hover{background:#ffffff; box-shadow: 0 8px 16px rgba(2,6,23,.06)}

.hero{padding:56px 0 26px}
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:22px;
  align-items:stretch;
}
.badge{
  display:inline-flex; gap:8px; align-items:center;
  border:1px solid rgba(37,99,235,.22);
  background:rgba(37,99,235,.06);
  color:var(--navy);
  padding:8px 12px;
  border-radius:999px;
  font-weight:600; font-size:13px;
}
.badge-dot{
  width:8px; height:8px; border-radius:999px; background:var(--primary);
  box-shadow:0 0 0 5px rgba(37,99,235,.12);
}
h1{
  margin:14px 0 10px;
  font-size:44px;
  line-height:1.06;
  letter-spacing:-.04em;
  color:var(--navy);
}

/* highlight word in title */
h1 span.highlight{
  background: linear-gradient(90deg, var(--primary), #60A5FA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead{
  margin:0 0 18px;
  font-size:16px;
  line-height:1.6;
  color:var(--muted);
  max-width:52ch;
}
.hero-actions{
  display:flex; gap:12px; align-items:center; flex-wrap:wrap;
  margin-bottom:14px;
}
.micro{
  display:flex; gap:14px; align-items:center; flex-wrap:wrap;
  color:var(--muted); font-size:13px;
}
.micro span{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 10px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.7);
  border-radius:999px;
}
.icon{
  width:16px; height:16px; border-radius:4px;
  background:rgba(15,23,42,.08);
  display:inline-block;
}

.card{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(226,232,240,.9);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}

/* tool card product feel */
#tool.card.tool{
  position:relative;
  transition: transform .25s ease, box-shadow .25s ease;
}
#tool.card.tool:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(2, 6, 23, .12);
}
#tool.card.tool::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:22px;
  background: radial-gradient(circle at top, rgba(37,99,235,.25), transparent 70%);
  z-index:-1;
  filter: blur(18px);
  opacity:.9;
}

.tool{
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.tool-title{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
}
.tool-title h2{
  margin:0;
  font-size:16px;
  letter-spacing:-.02em;
  color:var(--navy);
}
.tool-title small{color:var(--muted); font-weight:500}
.input{
  display:flex; gap:10px; align-items:center;
  border:1px solid var(--border);
  background:#fff;
  border-radius:14px;
  padding:10px 10px;
}
.input input{
  width:100%;
  border:none;
  outline:none;
  font-size:14px;
  color:var(--text);
  background:transparent;
}
.hint{color:var(--muted); font-size:13px; line-height:1.5}

.sizes{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-top:4px;
}
.size{
  border:1px solid rgba(226,232,240,.95);
  background:rgba(248,250,252,.65);
  border-radius:14px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.size strong{font-size:13px; color:var(--navy)}
.size span{font-size:12px; color:var(--muted)}
.size .btn{
  height:34px; padding:0 12px; border-radius:10px; font-size:13px;
}

.section{padding:26px 0}
.section h2{
  margin:0 0 12px;
  font-size:22px;
  letter-spacing:-.03em;
  color:var(--navy);
}
.grid3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}
.feature{
  padding:16px;
  border-radius:var(--radius);
  border:1px solid rgba(226,232,240,.95);
  background:rgba(255,255,255,.78);
}
.feature .k{
  width:38px; height:38px; border-radius:14px;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(37,99,235,.18);
  margin-bottom:10px;
  box-shadow: 0 8px 18px rgba(37,99,235,.10);
}
.feature h3{margin:0 0 6px; font-size:16px; color:var(--navy)}
.feature p{margin:0; color:var(--muted); font-size:14px; line-height:1.6}

.how{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:14px;
  align-items:stretch;
}
.steps{padding:18px}
.step{
  display:flex; gap:12px; padding:12px 0;
  border-bottom:1px dashed rgba(226,232,240,.9);
}
.step:last-child{border-bottom:none}
.num{
  width:30px; height:30px; border-radius:10px;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(37,99,235,.18);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; color:var(--primary);
  flex:0 0 auto;
}
.step b{display:block; color:var(--navy); margin-bottom:4px}
.step p{margin:0; color:var(--muted); font-size:14px; line-height:1.6}

.faq{padding:18px}
details{
  border:1px solid rgba(226,232,240,.95);
  background:rgba(255,255,255,.78);
  border-radius:14px;
  padding:12px 14px;
  margin-bottom:10px;
}
summary{
  cursor:pointer;
  font-weight:600;
  color:var(--navy);
  list-style:none;
}
summary::-webkit-details-marker{display:none}
details p{margin:10px 0 0; color:var(--muted); font-size:14px; line-height:1.6}

.cta{
  padding:20px;
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(15,23,42,.06));
  border:1px solid rgba(226,232,240,.95);
  border-radius:var(--radius);
}
.cta h3{margin:0; color:var(--navy); letter-spacing:-.02em}
.cta p{margin:6px 0 0; color:var(--muted); font-size:14px}

footer{
  padding:22px 0 38px;
  color:var(--muted);
  font-size:13px;
}
.footer-inner{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  border-top:1px solid rgba(226,232,240,.9);
  padding-top:16px;
}

.status-error{color:#B91C1C;}
.status-ok{color:#166534;}
#previewWrap{display:none;}
#previewImg{display:block; width:100%; height:auto;}
#statusMsg{display:none;}

@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr;}
  h1{font-size:38px}
  .how{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr}
  .sizes{grid-template-columns:1fr}
}

@keyframes pulse{
  0%{ box-shadow:0 0 0 0 rgba(37,99,235,.32); }
  70%{ box-shadow:0 0 0 12px rgba(37,99,235,0); }
  100%{ box-shadow:0 0 0 0 rgba(37,99,235,0); }
}
