/* Modern theme for Nanofoldr */
:root {
  --bg: #0b1020;
  --bg-elev: #0f1630;
  --surface: #121a3a;
  --text: #e8ecf6;
  --muted: #a6b0c3;
  --primary: #6aa8ff;
  --primary-2: #7c6cff;
  --accent: #22d3ee;
  --border: rgba(255,255,255,0.08);
  --card: rgba(255,255,255,0.06);
  --line-mobile: 22px; /* center of timeline line on mobile */
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #17305d66, transparent 60%),
              radial-gradient(1000px 500px at 90% 10%, #402f8066, transparent 60%),
              linear-gradient(180deg, #0a0f22 0%, #0b1126 100%);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header (glass) */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  background: linear-gradient(180deg, rgba(10,16,34,0.85), rgba(10,16,34,0.65));
  border-bottom: 1px solid var(--border);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  transition: color .2s ease;
}
nav a:hover { color: var(--text); }

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 72px;
}
.hero .eyebrow {
  display: inline-block;
  color: var(--accent);
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.25);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1, .hero h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  background: linear-gradient(90deg, var(--text), #b8c4ff 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .subhead, .hero p {
  max-width: 760px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 18px;
}
.cta-group { display: flex; gap: 12px; justify-content: center; margin-top: 12px; }

/* Buttons */
.btn { 
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 10px; text-decoration: none; font-weight: 600;
  border: 1px solid var(--border); transition: all .2s ease; backdrop-filter: blur(6px);
}
.btn-primary { background: linear-gradient(90deg, var(--primary), var(--primary-2)); color: #0b1020; border: none; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.badge { font-size: 12px; color: var(--muted); padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,0.04); }

/* Sections */
.section { padding: 72px 0; }
.section-title { text-align: center; margin: 0 auto 36px; font-size: 36px; }
.section-title span { background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1000px) { .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  border-color: rgba(122, 162, 255, 0.45);
}
.feature-card h3 { margin-top: 0; color: #dfe7ff; }
.feature-card p { color: var(--muted); }

/* How it works (timeline) */
.how-it-works { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); }
.timeline {
  position: relative; max-width: 900px; margin: 0 auto;
}
.timeline::after {
  content: ""; position: absolute; width: 2px; background: linear-gradient(180deg, var(--primary), var(--accent)); top: 0; bottom: 0; left: calc(50% - 1px); /* exact center */
}
.timeline-item { position: relative; width: 50%; padding: 16px 24px; opacity: 0; transform: translateY(40px); transition: opacity .5s ease-out, transform .5s ease-out; }
.timeline-item.in-view { opacity: 1; transform: translateY(0); }
.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }
.timeline-item::after { content: ""; position: absolute; width: 14px; height: 14px; background: linear-gradient(90deg, var(--primary), var(--accent)); border: 3px solid #0b1020; top: 28px; border-radius: 50%; z-index: 1; right: -10px; /* center equals parent's edge */ }
.right::after { left: -10px; right: auto; }
.timeline-content { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; }
.timeline-content h3 { margin: 0 0 6px; color: #dfe7ff; }
.timeline-content p { margin: 0; color: var(--muted); }

@media (max-width: 900px) {
  .timeline::after { left: calc(var(--line-mobile) - 1px); }
  .timeline-item, .timeline-item.left, .timeline-item.right { width: 100%; left: 0; padding-left: 46px; }
  .timeline-item::after, .right::after { left: calc(var(--line-mobile) - 10px); right: auto; }
}

/* Contact */
.contact { text-align: center; }
.contact-form { max-width: 620px; margin: 0 auto; display: grid; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,0.04); color: var(--text); outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: rgba(122,162,255,0.5); box-shadow: 0 0 0 4px rgba(122,162,255,0.15); }
.btn-primary { cursor: pointer; }

/* Footer */
footer { background: rgba(255,255,255,0.03); border-top: 1px solid var(--border); text-align: center; padding: 28px 0; color: var(--muted); }
