/* ============================================================
   PhoneLink — shared design system
   Dark, high-contrast, single cyan accent (Scorper-style)
   ============================================================ */

:root {
  /* Palette */
  --bg:        #08090b;
  --bg-soft:   #0d0f13;
  --surface:   #111419;
  --surface-2: #161a21;
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.14);

  --text:      #f4f6fa;
  --muted:     #99a0ac;
  --muted-2:   #6c727e;

  --accent:      #5fd2f0;
  --accent-2:    #3b9edb;
  --accent-soft: rgba(95, 210, 240, 0.12);
  --accent-glow: rgba(95, 210, 240, 0.35);

  --good:  #4ade80;
  --warn:  #fbbf24;

  /* Type */
  --display: "Sora", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 11px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient glow behind the top of every page */
body::before {
  content: "";
  position: fixed;
  top: -340px; left: 50%;
  width: 1100px; height: 760px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
              rgba(95, 210, 240, 0.16), rgba(59, 158, 219, 0.05) 42%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 9, 11, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent-glow);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  font-size: .94rem;
  color: var(--muted);
  font-weight: 500;
  transition: color .18s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-cta .login { font-size: .94rem; color: var(--muted); font-weight: 500; }
.nav-cta .login:hover { color: var(--text); }

.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text); padding: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--body);
  font-weight: 600;
  font-size: .96rem;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: 0 0 0 rgba(95,210,240,0), 0 8px 30px -8px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 34px -4px var(--accent-glow), 0 10px 36px -10px var(--accent-glow);
}
.btn-lg { padding: 16px 34px; font-size: 1.06rem; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.24); }
.btn-block { width: 100%; }

/* ---------- Pill / eyebrow ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.02);
  font-size: .88rem;
  color: var(--muted);
}
.pill .ping {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: ping 2.4s ease-out infinite;
}
.pill.green .ping { background: var(--good); box-shadow: 0 0 0 0 rgba(74,222,128,.4); animation: pingg 2.4s ease-out infinite; }
@keyframes ping { 0%{box-shadow:0 0 0 0 var(--accent-glow);} 70%{box-shadow:0 0 0 8px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }
@keyframes pingg { 0%{box-shadow:0 0 0 0 rgba(74,222,128,.4);} 70%{box-shadow:0 0 0 8px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }

.eyebrow {
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 86px 0 64px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.7rem, 7.2vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 28px auto 0;
  max-width: 16ch;
  background: linear-gradient(180deg, #ffffff 38%, #aeb6c2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 26px auto 0;
}
.hero-actions { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.social-proof {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  color: var(--muted); font-size: .95rem;
}
.avatars { display: flex; }
.avatars span {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; color: #07121a;
  border: 2px solid var(--bg);
  margin-left: -9px;
}
.avatars span:first-child { margin-left: 0; }
.stars { color: var(--warn); letter-spacing: 2px; }

/* ---------- Section scaffold ---------- */
.section { padding: 84px 0; position: relative; z-index: 1; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  letter-spacing: -0.015em;
  line-height: 1.06;
  margin-top: 14px;
}
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.06rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color .25s ease, transform .25s ease;
}
.step:hover { border-color: var(--border-2); transform: translateY(-3px); }
.step .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent);
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  border-radius: 12px;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.18rem; font-weight: 650; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .98rem; }

/* ---------- Feature / service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex; flex-direction: column;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.card:hover { border-color: var(--border-2); transform: translateY(-3px); background: var(--surface-2); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 20px;
}
.card h3 { font-size: 1.3rem; font-weight: 650; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; flex: 1; }
.card .card-link {
  margin-top: 22px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 7px;
}
.card .card-link svg { transition: transform .2s ease; }
.card:hover .card-link svg { transform: translateX(4px); }

/* ---------- Trust row ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.trust .stat { padding: 24px 16px; }
.trust .stat .big {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  background: linear-gradient(180deg, #fff, #9fa7b3);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trust .stat .lbl { color: var(--muted); font-size: .92rem; margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 4px 22px;
  margin-bottom: 12px;
  transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--border-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.04rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform .25s ease; color: var(--muted); flex-shrink: 0; }
.faq details[open] summary .chev { transform: rotate(45deg); color: var(--accent); }
.faq details p { color: var(--muted); padding: 0 0 20px; font-size: .99rem; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  border: 1px solid var(--border-2);
  border-radius: 24px;
  padding: 60px 30px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(95,210,240,0.14), transparent 60%),
    var(--bg-soft);
}
.cta-band h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.015em;
}
.cta-band p { color: var(--muted); margin: 14px auto 30px; max-width: 44ch; }

/* ---------- Page header (sub-pages) ---------- */
.page-head { padding: 70px 0 30px; text-align: center; }
.page-head h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  letter-spacing: -.02em; line-height: 1.02; margin-top: 18px;
  background: linear-gradient(180deg, #fff 45%, #aeb6c2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head p { color: var(--muted); max-width: 50ch; margin: 18px auto 0; font-size: 1.1rem; }

/* ---------- Forms ---------- */
.form-wrap {
  max-width: 640px; margin: 30px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 600; color: var(--text); }
.field label .opt { color: var(--muted-2); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: .98rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2399a0ac' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.form-foot { margin-top: 24px; }
.form-note { color: var(--muted-2); font-size: .86rem; margin-top: 16px; text-align: center; }

.form-success {
  display: none;
  text-align: center;
  padding: 20px 10px;
}
.form-success .check {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%; display: grid; place-items: center;
  background: rgba(74,222,128,.12); color: var(--good);
}
.form-success h3 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; }
.form-success p { color: var(--muted); margin-top: 10px; max-width: 38ch; margin-inline: auto; }
.form-wrap.sent form { display: none; }
.form-wrap.sent .form-success { display: block; }

/* ---------- Marketplace (Buy) ---------- */
.market-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: center; margin-bottom: 38px;
}
.chip {
  font-size: .92rem; font-weight: 500;
  padding: 9px 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-2); background: var(--surface);
  color: var(--muted); cursor: pointer;
  transition: all .18s ease;
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.26); }
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.listings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.listing {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .25s ease, transform .25s ease;
}
.listing:hover { border-color: var(--border-2); transform: translateY(-3px); }
.listing .thumb {
  height: 168px;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(95,210,240,.10), transparent 70%),
    var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--muted-2);
}
.listing .thumb svg { opacity: .55; }
.listing .body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.listing .row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.listing h3 { font-size: 1.1rem; font-weight: 650; }
.listing .price { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--text); white-space: nowrap; }
.listing .meta { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.badge {
  display: inline-block; font-size: .76rem; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-pill);
  margin-top: 12px; align-self: flex-start;
}
.badge.new { background: rgba(95,210,240,.12); color: var(--accent); }
.badge.good { background: rgba(74,222,128,.12); color: var(--good); }
.badge.fair { background: rgba(251,191,36,.12); color: var(--warn); }
.listing .trader {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.listing .trader .who { font-size: .86rem; color: var(--muted); }
.listing .trader .who b { color: var(--text); font-weight: 600; }
.listing .trader a { font-size: .88rem; font-weight: 600; color: var(--accent); }

/* ---------- Repair price list ---------- */
.repairs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 50px; }
.repair-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 22px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color .2s ease;
}
.repair-item:hover { border-color: var(--border-2); }
.repair-item .ico { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.repair-item h4 { font-size: 1rem; font-weight: 600; }
.repair-item .from { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.repair-item .from b { color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  margin-top: 40px;
  position: relative; z-index: 1;
}
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer .brand { margin-bottom: 14px; }
.footer .blurb { color: var(--muted); max-width: 34ch; font-size: .95rem; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h5 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: .94rem; margin-bottom: 10px; transition: color .15s ease; }
.footer-col a:hover { color: var(--text); }
.footer-legal {
  margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start;
}
.footer-legal .disclaimer { color: var(--muted-2); font-size: .82rem; max-width: 70ch; line-height: 1.6; }
.footer-legal .copy { color: var(--muted-2); font-size: .82rem; white-space: nowrap; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .steps, .cards, .listings, .repairs { grid-template-columns: 1fr 1fr; }
  .trust { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 18px 24px; gap: 18px;
  }
  .menu-toggle { display: block; }
  .nav-cta .login { display: none; }
  .steps, .cards, .listings, .repairs { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .section { padding: 60px 0; }
  .footer-cols { gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
