/* ==========================================================================
   quickDNS — website styles
   Palette extracted from the quickDNS logo (images/quickDNS-on.png)
   - brand teal    #0de2d2   (ON state, shield + wordmark)
   - deep teal     #016167   (shadow / secondary accent)
   - charcoal card #262828   (widget tile background)
   - page bg       #131616   (deepened charcoal)
   - muted gray    #888888   (OFF state)
   ========================================================================== */

:root {
  --teal: #0de2d2;
  --teal-soft: rgba(13, 226, 210, 0.12);
  --teal-deep: #016167;
  --bg: #131616;
  --bg-alt: #0e1111;
  --card: #262828;
  --card-2: #2c2f2f;
  --line: rgba(13, 226, 210, 0.18);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #eaf2f1;
  --text-dim: #a7b2b1;
  --muted: #888888;
  --red: #ff5459;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

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

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--teal); color: #06211f; }

/* ---------- shared ---------- */

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 14px;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }

h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section { padding: 96px 0; position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }

.section__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section__lede {
  color: var(--text-dim);
  max-width: 620px;
  margin: 16px 0 48px;
  font-size: 1.05rem;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(19, 22, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav--scrolled { border-bottom-color: var(--line-soft); background: rgba(19, 22, 22, 0.95); }

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand:hover { text-decoration: none; }

.nav__logo { width: 30px; height: auto; }

.nav__wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav__wordmark-accent { color: var(--teal); }

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

.nav__links a:not(.btn) {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav__links a:not(.btn):hover { color: var(--teal); text-decoration: none; }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav__toggle span {
  width: 18px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  text-decoration: none !important;
  white-space: nowrap;
}

.btn--primary {
  background: var(--teal);
  color: #06211f;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn--primary:hover { background: #2fe8da; }

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(13, 226, 210, 0.05);
}

.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn--small { padding: 8px 18px; font-size: 0.88rem; }
.btn--block { width: 100%; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 170px 0 110px;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero__copy h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.8rem);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero__lede {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 500px;
  margin-bottom: 32px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero__ticks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero__ticks li { position: relative; padding-left: 20px; }
.hero__ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

/* ---------- interactive demo ---------- */

.demo { position: relative; display: flex; justify-content: center; }

.demo__card {
  width: min(340px, 100%);
  background: var(--card);
  border: 1.5px solid var(--teal);
  border-radius: 24px;
  padding: 26px 26px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.4s ease;
}

.demo__card--off { border-color: #3a3d3d; }

.demo__logo {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
}

.demo__logo img { width: 100%; transition: opacity 0.25s ease; }

.demo__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo__status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--teal);
  transition: color 0.3s ease;
}

.demo__status--off { color: var(--muted); }

.demo__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  transition: background 0.3s ease;
}

.demo__status--off .demo__dot { background: var(--muted); }

.demo__hint {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* switch */
.switch { position: relative; display: inline-block; width: 54px; height: 30px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.switch__track {
  position: absolute;
  inset: 0;
  background: #3c3f3f;
  border-radius: 999px;
  transition: background 0.3s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e6eded;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.switch input:checked + .switch__track { background: var(--teal); }
.switch input:checked + .switch__track::after { transform: translateX(24px); background: #06211f; }

/* ---------- cards / grid ---------- */

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

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease;
}

.card:hover { border-color: var(--line); }

.card h3 { font-size: 1.16rem; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.95rem; }

.card--row { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; }

.tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  vertical-align: 2px;
  margin-left: 6px;
}

/* ---------- widgets section ---------- */

.widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.widgets__shot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.phone-frame {
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 12px;
}

.phone-frame img { border-radius: 12px; }

.phone-frame figcaption {
  padding: 12px 6px 4px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.phone-frame--tall img { height: 460px; object-fit: cover; object-position: top; }

.widgets__list { display: flex; flex-direction: column; gap: 16px; }

.widgets__add { margin-top: 6px; }
.widgets__add img { border-radius: 14px; border: 1px solid var(--line-soft); max-height: 300px; width: auto; margin: 0 auto; }
.widgets__add figcaption { text-align: center; font-size: 0.82rem; color: var(--muted); padding-top: 10px; }

/* ---------- screenshots ---------- */

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

/* ---------- providers ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 12px; max-width: 820px; }

.chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px 18px;
}

.chip__name { font-family: var(--font-head); font-weight: 600; font-size: 0.93rem; }
.chip__host { font-size: 0.78rem; color: var(--muted); font-family: ui-monospace, "Cascadia Code", monospace; }

.providers__note { margin-top: 28px; color: var(--muted); font-size: 0.92rem; }

/* ---------- setup ---------- */

.setup { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.card--setup { padding: 32px; }

.setup__head { margin-bottom: 20px; }
.setup__head h3 { font-size: 1.3rem; }

.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

.badge--rec { color: #06211f; background: var(--teal); border-color: var(--teal); }

.setup__steps { list-style: none; counter-reset: step; margin-bottom: 26px; }

.setup__steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 46px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.setup__steps li:last-child { padding-bottom: 0; }

.setup__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.codeblock {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 16px 90px 16px 16px;
  overflow: hidden;
}

.codeblock code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", monospace;
  font-size: 0.8rem;
  color: var(--teal);
  word-break: break-all;
  line-height: 1.5;
}

.codeblock__copy {
  position: absolute;
  right: 8px;
  top: 8px;
  bottom: 8px;
  width: 74px;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.codeblock__copy:hover { border-color: var(--teal); color: var(--teal); }
.codeblock__copy--done { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-alt);
  padding: 56px 0 44px;
}

.footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__brand:hover { text-decoration: none; }

.footer__tag { color: var(--muted); font-size: 0.92rem; }

.footer__links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer__links a { color: var(--text-dim); font-size: 0.9rem; }
.footer__links a:hover { color: var(--teal); text-decoration: none; }

.footer__legal { color: var(--muted); font-size: 0.82rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 72px; }
  .hero { padding-top: 140px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .widgets { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr 1fr; }
  .shots .phone-frame--tall:last-child { grid-column: 1 / -1; max-width: 380px; margin: 0 auto; }
  .setup { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(14, 17, 17, 0.98);
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 24px 22px;
    display: none;
  }

  .nav__links--open { display: flex; }

  .nav__links a { padding: 12px 6px; }
  .nav__links .btn { justify-content: center; margin-top: 6px; }

  .grid--3 { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .shots .phone-frame--tall:last-child { grid-column: auto; max-width: none; }
  .widgets__shot { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; }
  .section { padding: 72px 0; }
}
