/* YapTV website. YapSoft charter: night background, paper text, violet and
   cyan accents, Space Grotesk titles, Inter text (self-hosted, SIL OFL). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #0b0c10;
  --night-2: #15171c;
  --night-3: #1d2027;
  --paper: #f4f1ea;
  --paper-2: rgba(244, 241, 234, 0.74);
  --paper-3: rgba(244, 241, 234, 0.52);
  --line: rgba(244, 241, 234, 0.1);
  --line-strong: rgba(244, 241, 234, 0.2);
  --violet: #7c3aed;
  --violet-2: #6d28d9;
  --violet-light: #a78bfa;
  --cyan: #06b6d4;
  --cyan-light: #67e8f9;
  --pink: #df5e97;
  --green: #34d399;
  --red: #fca5a5;
  --radius: 16px;
  --wide: 1120px;
  --text: 640px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font: 400 17px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--cyan-light);
  text-underline-offset: 3px;
}
h1,
h2,
h3 {
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.2rem, 6vw, 3.7rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
}
h3 {
  font-size: 1.2rem;
  font-weight: 600;
}
p {
  margin: 0 0 1em;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 20px;
}
.narrow {
  max-width: 560px;
}
.section {
  padding: 88px 0;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-light);
  margin-bottom: 14px;
}
.lead {
  font-size: 1.15rem;
  color: var(--paper-2);
  max-width: var(--text);
}
.muted {
  color: var(--paper-3);
}
.small {
  font-size: 0.9rem;
}
.center {
  text-align: center;
}
.center .lead {
  margin-left: auto;
  margin-right: auto;
}

/* Header */
.mode-banner {
  background: #3b2a00;
  color: #fde68a;
  text-align: center;
  font-size: 0.9rem;
  padding: 8px 16px;
}
.mode-off {
  background: #3f1d1d;
  color: var(--red);
}
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 12, 16, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font: 700 1.3rem/1 "Space Grotesk", Inter, sans-serif;
  margin-right: auto;
}
.brand img {
  width: 34px;
  height: 34px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--paper-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--paper);
}
@media (max-width: 760px) {
  .nav .hide-phone {
    display: none;
  }
  .top .wrap {
    gap: 14px;
  }
  .nav {
    gap: 14px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 600 1rem/1 Inter, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--violet);
  color: #fff;
}
.btn-primary:hover {
  background: var(--violet-2);
}
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--paper-3);
}
.btn-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9rem;
  border-radius: 10px;
}
.btn-wide {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.center .actions {
  justify-content: center;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 80px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 720px;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.32), transparent),
    radial-gradient(closest-side at 80% 40%, rgba(6, 182, 212, 0.18), transparent);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 56px;
}
.hero-note {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--paper-3);
}
@media (max-width: 920px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
.screen {
  position: relative;
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2d36, #121318);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--line);
}
.screen img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--night-2);
}
.screen::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 30%;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 0 0 12px 12px;
  background: linear-gradient(#22252d, #15171c);
}

/* Cards and grids */
.grid {
  display: grid;
  gap: 18px;
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 920px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card p:last-child {
  margin-bottom: 0;
}
.card .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.16);
  color: var(--violet-light);
  margin-bottom: 16px;
}
.card .icon svg {
  width: 24px;
  height: 24px;
}
.card p {
  color: var(--paper-2);
}
.section-head {
  margin-bottom: 40px;
}

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--night);
  font: 700 1rem/1 "Space Grotesk", sans-serif;
}
.steps p {
  color: var(--paper-2);
  margin: 0;
}
@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Pricing */
.price-card {
  max-width: 460px;
  margin: 0 auto;
  padding: 36px;
  border-radius: 22px;
  background: linear-gradient(170deg, rgba(124, 58, 237, 0.22), rgba(21, 23, 28, 0.9) 55%);
  border: 1px solid rgba(167, 139, 250, 0.35);
  text-align: left;
}
.price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 20px;
}
.price strong {
  font: 700 3.2rem/1 "Space Grotesk", sans-serif;
}
.price span {
  color: var(--paper-2);
}
.checks {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
}
.checks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  color: var(--paper-2);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 16px;
  height: 9px;
  border-left: 2.5px solid var(--cyan);
  border-bottom: 2.5px solid var(--cyan);
  transform: rotate(-45deg);
}

/* Notice */
.notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.28);
}
.notice p {
  margin: 0;
  color: var(--paper-2);
}
.notice strong {
  color: var(--paper);
}

/* FAQ */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 36px 20px 0;
  position: relative;
  font-weight: 600;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  font-size: 1.5rem;
  color: var(--violet-light);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  color: var(--paper-2);
  padding-bottom: 8px;
}

/* Downloads */
.download {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.download h3 {
  margin: 0;
}
.download .meta {
  font-size: 0.88rem;
  color: var(--paper-3);
}
.download .row {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.download .qr {
  width: 132px;
  height: 132px;
  flex: none;
}
.download .soon {
  opacity: 0.6;
}
.short-link {
  font: 600 1.05rem/1.3 ui-monospace, "JetBrains Mono", monospace;
  color: var(--cyan-light);
  word-break: break-all;
}
.hash {
  font: 0.78rem/1.4 ui-monospace, monospace;
  color: var(--paper-3);
  word-break: break-all;
}
details.more summary {
  cursor: pointer;
  color: var(--paper-3);
  font-size: 0.88rem;
}
.qr {
  background: #fff;
  border-radius: 12px;
  padding: 6px;
}

/* Forms */
.panel {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
}
@media (max-width: 520px) {
  .panel {
    padding: 22px;
  }
  .section {
    padding: 56px 0;
  }
}
.panel + .panel {
  margin-top: 18px;
}
.field {
  display: block;
  margin-bottom: 18px;
}
.field span {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.field small {
  display: block;
  margin-top: 6px;
  color: var(--paper-3);
  font-size: 0.85rem;
}
input[type="email"],
input[type="text"] {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--night);
  color: var(--paper);
  font: 500 1.05rem Inter, system-ui, sans-serif;
}
input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}
input.code {
  font: 600 1.5rem/1 ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: 0.25em;
  text-align: center;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 0.92rem;
  color: var(--paper-2);
}
.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--violet);
  flex: none;
}
.message {
  margin: 14px 0 0;
  font-size: 0.95rem;
}
.message.error {
  color: var(--red);
}
.message.ok {
  color: var(--green);
}
.summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.summary strong {
  font: 700 1.6rem/1 "Space Grotesk", sans-serif;
}
.device-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--night-3);
  margin-bottom: 22px;
}
.device-chip svg {
  width: 30px;
  height: 30px;
  color: var(--cyan-light);
  flex: none;
}
.device-chip strong {
  display: block;
}
.device-chip span {
  font-size: 0.88rem;
  color: var(--paper-3);
}
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--paper-3);
  font-size: 0.85rem;
  margin: 26px 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.big-code {
  font: 700 clamp(2.4rem, 10vw, 3.4rem)/1 ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
  color: var(--cyan-light);
  text-align: center;
  padding: 22px 0;
  border-radius: 14px;
  background: var(--night);
  border: 1px dashed rgba(103, 232, 249, 0.4);
  margin: 10px 0 18px;
}
.done-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(52, 211, 153, 0.14);
  color: var(--green);
}
.done-mark svg {
  width: 34px;
  height: 34px;
}
.spinner {
  width: 40px;
  height: 40px;
  margin: 10px auto 20px;
  border-radius: 50%;
  border: 3px solid var(--line-strong);
  border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 3s;
  }
}

/* Account */
.devices {
  list-style: none;
  padding: 0;
  margin: 0;
}
.devices li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.devices li > div {
  flex: 1;
  min-width: 0;
}
.devices strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.devices span {
  font-size: 0.85rem;
  color: var(--paper-3);
}
.meter {
  height: 8px;
  border-radius: 8px;
  background: var(--night-3);
  overflow: hidden;
  margin: 8px 0 22px;
}
.meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  width: 0;
}

/* Text pages */
.prose {
  max-width: 760px;
}
.prose h2 {
  font-size: 1.35rem;
  margin-top: 2em;
}
.prose p,
.prose li {
  color: var(--paper-2);
}
.draft {
  padding: 14px 18px;
  border-radius: 12px;
  background: #3b2a00;
  color: #fde68a;
  font-size: 0.92rem;
  margin-bottom: 28px;
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--paper-3);
  font-size: 0.9rem;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-left: auto;
}
.foot a {
  color: var(--paper-2);
  text-decoration: none;
}
.foot a:hover {
  color: var(--paper);
}
.foot .disclaimer {
  flex-basis: 100%;
  margin: 0;
}
.download .row > div:not(.qr) {
  flex: 1 1 180px;
}
