/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:    #25D366;
  --green-dk: #128C7E;
  --dark:     #0d1117;
  --dark2:    #161b22;
  --dark3:    #21262d;
  --border:   #30363d;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --radius:   12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

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

.green { color: var(--green); }

/* ===========================
   NAVBAR
=========================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.logo strong { color: var(--green); }

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  font-size: .9rem;
  color: var(--muted);
  transition: color .2s;
}
nav a:hover { color: var(--text); }

.btn-nav {
  background: var(--green);
  color: #000 !important;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 8px;
  font-size: .85rem !important;
  transition: background .2s;
}
.btn-nav:hover { background: var(--green-dk); color: #fff !important; }

/* ===========================
   BUTTONS
=========================== */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: .95rem;
  transition: background .2s, transform .15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--green-dk); color: #fff; transform: translateY(-1px); }

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: .95rem;
  border: 1px solid var(--border);
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--green); background: rgba(37,211,102,.08); }

.full { width: 100%; text-align: center; }

/* ===========================
   HERO
=========================== */
.hero {
  padding: 96px 0 80px;
  background: radial-gradient(ellipse at 70% 0%, rgba(37,211,102,.12) 0%, transparent 60%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
}

.badge {
  display: inline-block;
  background: rgba(37,211,102,.15);
  color: var(--green);
  border: 1px solid rgba(37,211,102,.3);
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-text p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.stat strong { display: block; font-size: 1.6rem; color: var(--green); }
.stat span   { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Phone mockup */
.phone {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

.phone-header {
  background: var(--green-dk);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}

.phone-name  { font-weight: 700; font-size: .9rem; color: #fff; }
.phone-status { font-size: .75rem; color: rgba(255,255,255,.7); }

.phone-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2325d366' fill-opacity='0.03'%3E%3Cpath d='M20 20c0 11-9 20-20 20V0c11 0 20 9 20 20z'/%3E%3C/g%3E%3C/svg%3E");
}

.msg {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: .87rem;
  line-height: 1.45;
}

.msg.recv {
  background: var(--dark3);
  border-bottom-left-radius: 3px;
  align-self: flex-start;
}

.msg.sent {
  background: #005c4b;
  border-bottom-right-radius: 3px;
  align-self: flex-end;
  color: #e9fbe5;
}

.phone-input {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.phone-input span { color: var(--muted); font-size: .85rem; flex: 1; }

.phone-input button {
  background: var(--green);
  color: #000;
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===========================
   SECTIONS COMMON
=========================== */
section { padding: 88px 0; }

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 52px;
}

/* ===========================
   FEATURES
=========================== */
.features { background: var(--dark2); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--green); transform: translateY(-3px); }

.feat-icon {
  font-size: 1.6rem;
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.green-bg { background: rgba(37,211,102,.12); }

.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p  { font-size: .88rem; color: var(--muted); }

/* ===========================
   HOW IT WORKS
=========================== */
.how { background: var(--dark); }

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  text-align: center;
  padding: 28px 20px;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 { font-size: 1rem; margin-bottom: 8px; }
.step p   { font-size: .85rem; color: var(--muted); }

.step-arrow {
  font-size: 1.8rem;
  color: var(--green);
  padding-top: 36px;
  flex-shrink: 0;
}

/* ===========================
   CODE SECTION
=========================== */
.code-section {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.code-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.code-text h2 { text-align: left; }

.code-text p {
  color: var(--muted);
  margin: 16px 0 24px;
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.check-list li {
  font-size: .92rem;
  color: var(--text);
}

.check-list code {
  background: rgba(37,211,102,.1);
  color: var(--green);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .85rem;
}

.code-block {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.tab {
  padding: 10px 16px;
  font-size: .82rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--green); border-bottom-color: var(--green); }

pre {
  padding: 24px;
  overflow-x: auto;
  font-size: .83rem;
  line-height: 1.7;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
}

code { font-family: inherit; }

.c { color: #6e7681; }
.s { color: #a5d6ff; }
.k { color: var(--green); }

/* ===========================
   PRICING
=========================== */
.pricing { background: var(--dark); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.plan {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  transition: transform .2s;
}
.plan:hover { transform: translateY(-4px); }

.plan.featured {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green), 0 8px 32px rgba(37,211,102,.15);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: .75rem;
  padding: 3px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

.plan h3 { font-size: 1.1rem; margin-bottom: 12px; }

.price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 6px;
}
.price span { font-size: 1rem; color: var(--muted); font-weight: 400; }

.plan-desc { font-size: .85rem; color: var(--muted); margin-bottom: 24px; }

.plan ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.plan ul li { font-size: .88rem; color: var(--text); }

/* ===========================
   DOCS
=========================== */
.docs { background: var(--dark2); }

.endpoints {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  transition: border-color .2s;
}
.endpoint:hover { border-color: var(--green); }

.method {
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  min-width: 64px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.method.get    { background: rgba(56,189,248,.12); color: #38bdf8; }
.method.post   { background: rgba(37,211,102,.12); color: var(--green); }
.method.delete { background: rgba(248,113,113,.12); color: #f87171; }

.endpoint code {
  font-family: monospace;
  color: var(--text);
  font-size: .88rem;
  flex: 1;
}

.ep-desc { font-size: .83rem; color: var(--muted); }

/* ===========================
   CONTACT
=========================== */
.contact {
  background: radial-gradient(ellipse at 30% 50%, rgba(37,211,102,.1) 0%, transparent 60%),
              var(--dark);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-text h2 { text-align: left; }
.contact-text p  { color: var(--muted); margin: 16px 0 32px; }

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--text);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--green);
}

.contact-form select option { background: var(--dark2); }

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy { font-size: .82rem; color: var(--muted); }

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a { font-size: .82rem; color: var(--muted); }
.footer-links a:hover { color: var(--green); }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .hero-inner         { grid-template-columns: 1fr; }
  .hero-mockup        { display: none; }
  .features-grid      { grid-template-columns: 1fr 1fr; }
  .pricing-grid       { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .code-inner         { grid-template-columns: 1fr; }
  .contact-inner      { grid-template-columns: 1fr; }
  .steps              { flex-direction: column; align-items: center; }
  .step-arrow         { transform: rotate(90deg); padding: 0 10px; }
  nav                 { display: none; }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-stats    { gap: 24px; flex-wrap: wrap; }
  .footer-inner  { flex-direction: column; text-align: center; }
}
