:root {
  --bg: #faf6f0;
  --bg-alt: #ffffff;
  --text: #2a2118;
  --text-muted: #6b5f52;
  --accent: #7c5cff;
  --accent-strong: #5c3dfa;
  --warm: #e8792c;
  --warm-soft: #ffe4c7;
  --border: #ece2d4;
  --card-shadow: 0 14px 34px rgba(120, 80, 30, 0.1);
  --code-bg: #f1e9ff;
  --header-bg: rgba(250, 246, 240, 0.7);
  --header-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  --blob-1: rgba(124, 92, 255, 0.22);
  --blob-2: rgba(232, 121, 44, 0.18);
  --blob-3: rgba(255, 196, 122, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16131c;
    --bg-alt: #201b2b;
    --text: #f4efe6;
    --text-muted: #b4a8ba;
    --accent: #a48bff;
    --accent-strong: #bfaaff;
    --warm: #ffa25c;
    --warm-soft: #4a3320;
    --border: #332c42;
    --card-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    --code-bg: #2b2440;
    --header-bg: rgba(22, 19, 28, 0.7);
    --header-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
    --blob-1: rgba(164, 139, 255, 0.25);
    --blob-2: rgba(255, 162, 92, 0.16);
    --blob-3: rgba(255, 162, 92, 0.1);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(900px 520px at 6% -8%, var(--blob-1) 0%, transparent 55%),
    radial-gradient(800px 480px at 94% 4%, var(--blob-2) 0%, transparent 55%),
    radial-gradient(1000px 620px at 50% 30%, var(--blob-3) 0%, transparent 60%),
    radial-gradient(900px 560px at 20% 100%, var(--blob-1) 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  font-family: 'JetBrains Mono', monospace;
}

a {
  color: var(--accent-strong);
}

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

#features,
#screenshots {
  scroll-margin-top: 84px;
}

/* header */

.site-header {
  z-index: 20;
  position: sticky;
  top: 0;
  padding: 16px 0;
  background: transparent;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.site-header--scrolled {
  padding: 12px 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: var(--header-bg);
  box-shadow: var(--header-shadow);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.site-header__logo {
  width: 40px;
  height: 40px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
}

.site-header__nav-link {
  position: relative;
  padding-bottom: 2px;
  color: var(--text-muted);
  text-decoration: none;
}

.site-header__nav-link::after {
  position: absolute;
  right: 100%;
  bottom: -2px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--warm);
  content: '';
  transition: right 0.2s ease;
}

.site-header__nav-link:hover {
  color: var(--text);
}

.site-header__nav-link:hover::after {
  right: 0;
}

/* language picker */

.lang-picker {
  position: relative;
}

.lang-picker__trigger {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  list-style: none;
  cursor: pointer;
}

/* <summary> ships a default disclosure triangle in most engines; drop it, we render our own chevron */
.lang-picker__trigger::-webkit-details-marker {
  display: none;
}

.lang-picker__trigger:hover {
  border-color: var(--accent);
}

.lang-picker__chevron {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.lang-picker__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-alt);
  box-shadow: var(--card-shadow);
  list-style: none;
}

.lang-picker__item {
  list-style: none;
}

.lang-picker__link {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  gap: 8px;
  border-radius: 8px;
  color: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.lang-picker__link:hover {
  background: var(--code-bg);
}

.lang-picker__link[aria-current='page'] {
  color: var(--accent-strong);
  font-weight: 600;
}

/* hero */

.hero {
  position: relative;
  padding: 48px 0 40px;
  overflow: hidden;
  text-align: center;
}

/* pika-sticker.png already has its own outline + drop shadow baked in — just handle the tilt. */
.sticker {
  transition: transform 0.25s ease;
}

.hero__sticker {
  z-index: 2;
  position: absolute;
  top: -10px;
  right: 4%;
  width: 84px;
  height: 84px;
  transform: rotate(-9deg);
  filter: drop-shadow(1px 1px 1px #2a2118);
}

.hero__sticker:hover {
  transform: rotate(-2deg) scale(1.06);
}

.deco-bookmark {
  display: block;
  z-index: 0;
  position: absolute;
  background-color: currentColor;
  -webkit-mask: url('assets/bookmark.svg') no-repeat center / contain;
  mask: url('assets/bookmark.svg') no-repeat center / contain;
  pointer-events: none;
}

.deco-bookmark--hero-a {
  top: 20%;
  left: 8%;
  width: 32px;
  height: 32px;
  transform: rotate(-18deg);
  color: var(--accent);
  opacity: 0.32;
}

.deco-bookmark--hero-b {
  right: 10%;
  bottom: 14%;
  width: 26px;
  height: 26px;
  transform: rotate(14deg);
  color: var(--warm);
  opacity: 0.3;
}

.deco-bookmark--hero-c {
  top: 10%;
  right: 22%;
  width: 18px;
  height: 18px;
  transform: rotate(-6deg);
  color: var(--accent-strong);
  opacity: 0.25;
}

.hero__blob {
  z-index: 0;
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}

.hero__blob--one {
  top: -120px;
  left: -80px;
  width: 360px;
  height: 360px;
  background: var(--blob-1);
}

.hero__blob--two {
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: var(--blob-2);
}

.hero__blob--three {
  bottom: -140px;
  left: 40%;
  width: 260px;
  height: 260px;
  background: var(--blob-3);
}

.hero .container {
  z-index: 1;
  position: relative;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--warm);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
}

.hero__subtitle {
  max-width: 700px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.btn--primary {
  border: 3px solid var(--text);
  background: linear-gradient(135deg, var(--accent), var(--warm));
  box-shadow:
    0 12px 30px rgba(124, 92, 255, 0.4),
    0 4px 12px rgba(232, 121, 44, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 1.2rem;
  text-shadow: 0 0 4px var(--bg-alt);
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn--primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 16px 36px rgba(124, 92, 255, 0.5),
    0 6px 16px rgba(232, 121, 44, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow:
    0 6px 16px rgba(124, 92, 255, 0.4),
    0 2px 8px rgba(232, 121, 44, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hero__badge {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.hero__image {
  margin-top: 32px;
}

.hero__screenshot {
  aspect-ratio: 960 / 600;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}

/* features */

.features {
  padding: 36px 0;
}

.features__title,
.gallery__title,
.privacy__title {
  position: relative;
  width: fit-content;
  margin: 0 auto 24px;
  font-size: 1.7rem;
  text-align: center;
}

.features__title::before,
.gallery__title::after,
.privacy__title::before {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--warm);
  content: '';
  -webkit-mask: url('assets/bookmark.svg') no-repeat center / contain;
  mask: url('assets/bookmark.svg') no-repeat center / contain;
  opacity: 0.6;
}

.features__title::before {
  top: -4px;
  left: -30px;
  transform: rotate(-20deg);
}

.gallery__title::after {
  top: -2px;
  right: -30px;
  transform: rotate(16deg);
  background-color: var(--accent);
}

.privacy__title::before {
  top: -4px;
  left: -30px;
  transform: rotate(-16deg);
}

@media (max-width: 340px) {
  .features__title::before,
  .gallery__title::after,
  .privacy__title::before {
    display: none;
  }
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-alt);
  box-shadow: var(--card-shadow);
  transition:
    transform 0.2s ease,
    border 0.2s ease,
    color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px) rotate(-0.5deg);
}

.feature-card--more {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
  font-style: italic;
  font-weight: 600;
}

.feature-card--more:hover {
  border-color: var(--warm);
  color: var(--warm);
}

.feature-card__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* gallery */

.gallery {
  padding: 36px 0 48px;
}

.gallery__stack {
  display: flex;
  flex-direction: column;
  max-width: 960px;
  margin: 0 auto;
  gap: 26px;
}

.gallery__item {
  margin: 0;
}

.gallery__image {
  display: block;
  aspect-ratio: 960 / 600;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease;
}

.gallery__item:hover .gallery__image {
  transform: scale(1.012) rotate(-0.4deg);
}

.gallery__caption {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
}

/* privacy page */

.privacy {
  padding: 36px 0 48px;
}

.privacy__sticker {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  transform: rotate(-8deg);
}

.privacy__updated {
  margin: -12px 0 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.privacy__intro {
  max-width: 720px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  text-align: center;
}

.privacy__content {
  max-width: 720px;
  margin: 0 auto;
}

.privacy__heading {
  margin-top: 28px;
}

.privacy__list {
  padding-left: 20px;
}

.privacy__list-item {
  margin-bottom: 12px;
}

.privacy__table {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
}

.privacy__table-cell {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  text-align: left;
}

.privacy__table-cell--header {
  color: var(--text-muted);
  font-weight: 600;
}

code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--code-bg);
  font-size: 0.9em;
}

/* outro */

.outro {
  position: relative;
  padding: 0 0 56px;
  overflow: hidden;
  text-align: center;
}

.outro__text {
  margin: 0;
  background: linear-gradient(120deg, var(--accent), var(--warm) 60%, var(--accent-strong));
  background-clip: text;
  -webkit-background-clip: text;
  color: var(--text);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 5.2rem);
  letter-spacing: -0.02em;
  -webkit-text-fill-color: transparent;
}

/* footer */

.site-footer {
  padding: 22px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.site-footer__link {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__link:hover {
  color: var(--text);
}

.site-footer__credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  gap: 6px;
  font-size: 0.85rem;
}

.site-footer__credit-link {
  color: var(--accent-strong);
  font-weight: 600;
}

.footer__sticker {
  width: 26px;
  height: 26px;
  transform: rotate(-6deg);
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .site-header__row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-header__nav {
    gap: 14px;
    font-size: 0.88rem;
  }

  .hero {
    padding: 36px 0 28px;
  }

  .hero__sticker {
    top: -14px;
    right: 2%;
    width: 52px;
    height: 52px;
  }

  .deco-bookmark--hero-c {
    display: none;
  }

  .lang-picker__label {
    display: none;
  }
}
