@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/fonts/archivo.woff2) format('woff2-variations');
}

:root {
  --chrome: #080809;
  --bg: #0b0b0c;
  --panel: #0e0e10;
  --raised: #151517;
  --hover: #1c1c1f;
  --line: #1e1e21;
  --line-2: #2a2a2e;
  --text: #ececee;
  --text-2: #c4c4ca;
  --muted: #9a9aa2;
  --dim: #7e7e86;
  --accent: #ffc21a;
  --on-accent: #0b0b0c;
  --rec: #ff4d4d;
  --ok: #3ecf8e;
  --font: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-stretch: 88%; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: inherit; font-size: 0.8em; font-weight: 700; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--raised); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--raised); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background-color 0.12s, border-color 0.12s, filter 0.12s; }
.btn:hover { background: var(--hover); border-color: #3a3a40; }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.08); }
.btn--sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn--lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn--danger { color: #ff8080; }
.btn--danger:hover { border-color: #5a2a2a; background: #1f1314; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--text); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 3px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--muted); vertical-align: 1px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(8, 8, 9, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav__row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: 0.08em; font-size: 15px; }
.nav__links { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 15px; }
.nav__links a:not(.btn) { color: var(--muted); text-decoration: none; }
.nav__links a:not(.btn):hover { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; font-stretch: 80%; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lede { margin-top: 20px; font-size: 19px; color: var(--text-2); max-width: 32em; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.hero__note { margin-top: 14px; font-size: 14px; color: var(--dim); }

/* The hero picture: a game frame with Klipd's toast and the replay buffer. */
.scene { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: radial-gradient(120% 90% at 70% 110%, #3a2a12 0%, #17120c 38%, #0b0b0c 70%), #0b0b0c; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55); }
.scene__sky { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 194, 26, 0.06), transparent 40%), repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, 0.025) 79px 80px); }
.scene__ground { position: absolute; left: -10%; right: -10%; bottom: -30%; height: 70%; background: linear-gradient(180deg, #1b1610, #0d0b09); transform: perspective(400px) rotateX(58deg); border-top: 1px solid rgba(255, 194, 26, 0.25); background-image: repeating-linear-gradient(90deg, rgba(255, 194, 26, 0.08) 0 1px, transparent 1px 60px), repeating-linear-gradient(0deg, rgba(255, 194, 26, 0.08) 0 1px, transparent 1px 60px); }
.scene__cross { position: absolute; left: 50%; top: 46%; width: 22px; height: 22px; transform: translate(-50%, -50%); }
.scene__cross::before, .scene__cross::after { content: ''; position: absolute; background: rgba(255, 255, 255, 0.85); }
.scene__cross::before { left: 10px; top: 0; width: 2px; height: 22px; }
.scene__cross::after { top: 10px; left: 0; height: 2px; width: 22px; }
.scene__feed { position: absolute; left: 4%; top: 6%; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; }
.scene__feed span { background: rgba(0, 0, 0, 0.45); padding: 3px 8px; border-radius: 3px; color: var(--text-2); }
.scene__feed b { color: var(--accent); }
.toast { position: absolute; right: 3.5%; top: 6%; width: min(46%, 270px); display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; background: rgba(14, 14, 16, 0.94); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); animation: toast-in 0.5s 0.6s both cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.toast__thumb { width: 64px; aspect-ratio: 16 / 9; border-radius: 4px; flex: none; background: linear-gradient(135deg, #3b2b10, #121011); position: relative; }
.toast__thumb::after { content: ''; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 9px solid rgba(255, 255, 255, 0.9); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.toast__title { font-weight: 700; font-size: 13px; }
.toast__detail { font-size: 11px; color: var(--muted); }
.toast__ok { margin-left: auto; color: var(--ok); font-size: 12px; font-weight: 700; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }
.buffer { position: absolute; left: 4%; right: 4%; bottom: 7%; }
.buffer__label { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.buffer__label b { color: var(--rec); }
.buffer__bar { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.buffer__bar span { position: absolute; right: 0; top: 0; bottom: 0; width: 38%; background: var(--accent); border-radius: 4px; }
.buffer__bar span::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(0, 0, 0, 0.25) 10px 11px); }

/* Sections */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section__head { max-width: 640px; margin-bottom: 44px; }
.section__head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.section__head p { margin-top: 14px; font-size: 18px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature { padding: 28px 26px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature__icon { width: 38px; height: 38px; border-radius: 6px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-2); color: var(--accent); margin-bottom: 18px; }
.feature h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
.plan.is-highlight { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan__name { display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 700; }
.plan__badge { font-size: 12px; font-weight: 700; color: var(--on-accent); background: var(--accent); padding: 2px 8px; border-radius: 3px; }
.plan__price { margin-top: 18px; display: flex; align-items: baseline; gap: 6px; }
.plan__price b { font-size: 44px; font-weight: 800; font-stretch: 80%; line-height: 1; }
.plan__price span { color: var(--muted); font-size: 15px; }
.plan__storage { margin-top: 6px; color: var(--text-2); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--text-2); }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ''; flex: none; width: 14px; height: 8px; margin-top: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translate(2px, -1px); }
.plan .btn { margin-top: auto; }
.pricing__foot { margin-top: 22px; font-size: 14px; color: var(--dim); }

/* FAQ */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 700; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* Download band */
.download { padding: 80px 0; border-top: 1px solid var(--line); background: radial-gradient(60% 120% at 50% 120%, rgba(255, 194, 26, 0.13), transparent 70%); text-align: center; }
.download h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; font-stretch: 80%; }
.download p { margin: 14px auto 28px; color: var(--muted); font-size: 18px; max-width: 34em; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--dim); }
.footer__row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }

/* Account */
.page { padding: 48px 0 80px; min-height: calc(100vh - 60px - 92px); }
.page h1 { font-size: 40px; font-weight: 800; }
.card { border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); padding: 26px; }
.signin { max-width: 420px; margin: 32px auto 0; }
.signin h1 { font-size: 30px; }
.signin p { margin-top: 8px; color: var(--muted); }
.signin form { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.input { height: 46px; padding: 0 14px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--raised); font-size: 16px; color: var(--text); width: 100%; }
.input:focus { outline: none; border-color: var(--accent); }
.input--code { font-size: 26px; font-weight: 700; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; height: 58px; padding-left: calc(14px + 0.4em); }
.form-note { font-size: 14px; color: var(--dim); }
.error { color: #ff8a8a; font-size: 14px; min-height: 1.4em; }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--raised); margin-bottom: 24px; font-size: 15px; }
.banner--ok { border-color: rgba(62, 207, 142, 0.4); }
.banner--warn { border-color: rgba(255, 194, 26, 0.4); }

.account__head { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 28px; }
.account__head p { color: var(--muted); margin-top: 6px; }
.account__head .btn { margin-left: auto; }
.account__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 40px; }
.stat__label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.stat__value { font-size: 32px; font-weight: 800; font-stretch: 85%; margin-top: 6px; }
.stat__sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.meter { height: 8px; border-radius: 4px; background: var(--line-2); margin-top: 16px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 4px; min-width: 2px; }
.meter.is-full span { background: var(--rec); }
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.h2 { font-size: 24px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: baseline; gap: 10px; }
.h2 small { font-size: 15px; font-weight: 500; color: var(--dim); }
.choose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }

.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.clip { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.clip__thumb { display: block; aspect-ratio: 16 / 9; background: var(--raised); position: relative; }
.clip__thumb img { width: 100%; height: 100%; object-fit: cover; }
.clip__dur { position: absolute; right: 8px; bottom: 8px; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.75); }
.clip__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.clip__title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip__meta { font-size: 13px; color: var(--dim); }
.clip__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.clip__actions .btn { height: 32px; padding: 0 10px; font-size: 13px; }
.empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--muted); }
.danger-zone { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.danger-zone p { color: var(--dim); font-size: 14px; flex-basis: 100%; }

dialog { border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--text); padding: 24px; max-width: min(440px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
dialog h2 { font-size: 22px; margin-bottom: 8px; }
dialog p { color: var(--muted); }
dialog .card__actions { justify-content: flex-end; }

/* Share page */
.share__main { padding-top: 28px; padding-bottom: 64px; max-width: 1080px; }
.player { width: 100%; max-height: 72vh; margin: 0 auto; background: #000; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.player video { width: 100%; height: 100%; background: #000; }
.share__info { display: flex; flex-wrap: wrap; gap: 16px; align-items: start; justify-content: space-between; margin-top: 20px; }
.share__info h1 { font-size: 28px; font-weight: 800; }
.share__meta { color: var(--muted); margin-top: 6px; }
.share__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share__cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 36px; padding: 20px 22px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--muted); }
.share__cta strong { color: var(--text); }

/* Legal */
.prose { max-width: 720px; }
.prose h1 { font-size: 40px; margin-bottom: 8px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--text-2); margin-bottom: 12px; }
.prose ul { padding-left: 20px; }
.prose .updated { color: var(--dim); margin-bottom: 28px; }

.notfound { text-align: center; padding: 120px 0; }
.notfound h1 { font-size: 64px; font-weight: 800; font-stretch: 80%; }
.notfound p { color: var(--muted); margin: 12px 0 28px; font-size: 18px; }

@media (max-width: 900px) {
  .hero { padding-top: 44px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .account__grid, .choose { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .nav__row { gap: 12px; }
  .nav__links { gap: 14px; font-size: 14px; }
  .nav__links .hide-sm { display: none; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 64px 0; }
  .hero__lede { font-size: 17px; }
  .toast { width: 62%; }
  .scene__feed { display: none; }
  .footer__links { margin-left: 0; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toast { animation: none; }
}
