/* ============================================================
   TINY RIOT STUDIO — Linda Valentová
   Punk / zine jewelry site. Values transcribed from the
   Claude Design prototype (project/Tiny Riot Studio.dc.html).
   ============================================================ */

/* --- palette ---------------------------------------------- */
/* The design has two ends and an accent. A theme decides which end is the
   paper and which is the ink — nothing else about it changes. */

:root {
  --paper: #F6D9B4;
  --paper-rgb: 246, 217, 180;
  --soot: #0c0a0a;
  --soot-rgb: 12, 10, 10;

  --pink: #E23C87;
  --pink-rgb: 226, 60, 135;

  /* Dark ink on light paper needs a little more alpha to carry the same
     weight as light ink on dark. The light theme nudges this up. */
  --alpha-boost: 1;

  /* Dark is the default: cream on black, wearing the TRS2 badge. */
  --bg: var(--soot);
  --bg-rgb: var(--soot-rgb);
  --fg: var(--paper);
  --fg-rgb: var(--paper-rgb);

  --logo: url("../img/logo.png");

  --display: 'Archivo Black', 'Arial Black', sans-serif;
  --body: 'Courier Prime', 'Courier New', monospace;
  --typewriter: 'Special Elite', 'Courier New', monospace;

  --gutter: 40px;
}

/* Light — the TRS1 badge. Same ink, the ends swapped.
   The pink is pulled deeper here for one reason: as drawn it only reaches
   2.96:1 against cream, which is too thin to read as link text. #AD1A5D
   scores 5.03:1, near enough to the 4.92:1 the original pink already gets
   against black that the two themes carry the same weight. On black the
   pink stays exactly as Linda drew it. */
:root[data-theme="light"] {
  --bg: var(--paper);
  --bg-rgb: var(--paper-rgb);
  --fg: var(--soot);
  --fg-rgb: var(--soot-rgb);

  --pink: #AD1A5D;
  --pink-rgb: 173, 26, 93;

  --alpha-boost: 1.15;

  --logo: url("../img/logo-light.png");
}

/* The rest of the stylesheet still speaks in ink and cream. Those names now
   mean "the paper end" and "the ink end" — they follow the theme instead of
   naming one fixed colour, so every rule below works in both without edits. */
:root {
  --ink: var(--bg);
  --cream: var(--fg);

  --cream-88: rgba(var(--fg-rgb), calc(0.88 * var(--alpha-boost)));
  --cream-85: rgba(var(--fg-rgb), calc(0.85 * var(--alpha-boost)));
  --cream-82: rgba(var(--fg-rgb), calc(0.82 * var(--alpha-boost)));
  --cream-80: rgba(var(--fg-rgb), calc(0.80 * var(--alpha-boost)));
  --cream-75: rgba(var(--fg-rgb), calc(0.75 * var(--alpha-boost)));
  --cream-70: rgba(var(--fg-rgb), calc(0.70 * var(--alpha-boost)));
  --cream-62: rgba(var(--fg-rgb), calc(0.62 * var(--alpha-boost)));
  --cream-60: rgba(var(--fg-rgb), calc(0.60 * var(--alpha-boost)));
  --cream-55: rgba(var(--fg-rgb), calc(0.55 * var(--alpha-boost)));
  --cream-50: rgba(var(--fg-rgb), calc(0.50 * var(--alpha-boost)));
  --cream-45: rgba(var(--fg-rgb), calc(0.45 * var(--alpha-boost)));
  --cream-40: rgba(var(--fg-rgb), calc(0.40 * var(--alpha-boost)));
  --cream-35: rgba(var(--fg-rgb), calc(0.35 * var(--alpha-boost)));
  --cream-30: rgba(var(--fg-rgb), calc(0.30 * var(--alpha-boost)));
  --cream-25: rgba(var(--fg-rgb), calc(0.25 * var(--alpha-boost)));
  --cream-20: rgba(var(--fg-rgb), calc(0.20 * var(--alpha-boost)));
}

/* --- base ------------------------------------------------- */

body {
  margin: 0;
  background: var(--ink);
}

a {
  color: var(--pink);
  text-decoration: none;
}

a:hover {
  color: var(--cream);
}

img {
  max-width: 100%;
}

.page {
  min-height: 100vh;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  background-image:
    radial-gradient(rgba(var(--fg-rgb), 0.07) 1px, transparent 1px),
    radial-gradient(rgba(var(--pink-rgb), 0.05) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 2px 3px;
}

/* --- ticker ----------------------------------------------- */

.ticker {
  background: var(--pink);
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 3px solid var(--ink);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.18em;
  padding: 7px 0;
}

.ticker__track {
  display: inline-block;
  animation: tickerRun 56s linear infinite;
}

.ticker__track span {
  padding: 0 24px;
}

@keyframes tickerRun {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes jitter {
  0%, 100% { transform: rotate(-1.2deg); }
  50%      { transform: rotate(1deg); }
}

/* --- header ----------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter);
  flex-wrap: wrap;
  border-bottom: 2px dashed var(--cream-35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  color: var(--cream);
}

.brand:hover {
  color: var(--cream);
}

/* Painted rather than an <img> so the browser only fetches the badge the
   active theme actually uses. */
.brand__mark {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: block;
  flex: none;
  background-image: var(--logo);
  background-size: cover;
  background-position: center;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand__maker {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--cream-60);
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Sits first in the nav, to the left of HOME. Borrows the nav link's border
   and hover so it reads as part of the same row; .nav stretches its items,
   so the heights line up on their own. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 13px;
  cursor: pointer;
  border: 2px solid var(--cream-45);
  background: transparent;
  color: var(--cream);
  flex: none;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--ink);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* Show the destination, not the current state: a sun on the dark site
   because clicking it turns the lights on, and a moon on the light one. */
.theme-toggle__moon,
:root[data-theme="light"] .theme-toggle__sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle__moon {
  display: block;
}

.nav__link {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 11px 16px;
  cursor: pointer;
  border: 2px solid var(--cream-45);
  background: transparent;
  color: var(--cream);
}

.nav__link:hover {
  background: var(--pink);
  border-color: var(--cream-45);
  color: var(--ink);
}

.nav__link.is-active,
.nav__link.is-active:hover {
  border-color: var(--pink);
  background: var(--pink);
  color: var(--ink);
}

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

.btn-solid-cream,
.btn-solid-cream:hover {
  color: var(--ink);
}

.btn-solid-cream {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.14em;
  background: var(--cream);
  padding: 15px 26px;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn-solid-cream:hover {
  background: var(--pink);
}

.btn-outline-cream {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.14em;
  border: 2px solid var(--cream);
  background: none;
  color: var(--cream);
  padding: 13px 26px;
  display: inline-block;
  cursor: pointer;
}

.btn-outline-cream:hover {
  background: var(--cream);
  color: var(--ink);
}

.btn-outline-pink {
  background: none;
  border: 2px solid var(--pink);
  color: var(--pink);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.16em;
  padding: 12px 24px;
  cursor: pointer;
  display: inline-block;
}

.btn-outline-pink:hover {
  background: var(--pink);
  color: var(--ink);
}

.btn-solid-pink,
.btn-solid-pink:hover {
  color: var(--ink);
}

.btn-solid-pink {
  background: var(--pink);
  border: none;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
  padding: 14px 24px;
  cursor: pointer;
  display: inline-block;
}

.btn-solid-pink:hover {
  background: var(--cream);
}

.btn-outline-cream--sm {
  background: none;
  border: 2px solid var(--cream);
  color: var(--cream);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
  padding: 12px 24px;
  cursor: pointer;
  display: inline-block;
}

.btn-outline-cream--sm:hover {
  background: var(--cream);
  color: var(--ink);
}

.link-plain {
  background: none;
  border: none;
  color: var(--pink);
  font-family: var(--body);
  font-size: 14px;
  letter-spacing: 0.14em;
  cursor: pointer;
  padding: 0;
}

.link-plain:hover {
  color: var(--cream);
}

/* --- image frames / placeholders --------------------------- */
/*
   Drop a photo at the frame's img src and it fills the frame,
   covering the placeholder. Until then the hatched zine block
   shows (the <img> removes itself when the file is missing).
*/

.frame {
  position: relative;
  border: 3px solid var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(var(--fg-rgb), 0.12) 0 6px,
    transparent 6px 14px
  );
  overflow: hidden;
}

.frame--hero { aspect-ratio: 4 / 5; }
.frame--portrait { aspect-ratio: 3 / 4; }

.frame__label {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--cream-75);
  text-align: center;
  padding: 12px;
}

.frame__label--portrait {
  letter-spacing: 0.16em;
  color: var(--cream-70);
}

.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tape {
  position: absolute;
  z-index: 2;
  font-family: var(--typewriter);
  color: var(--ink);
}

.tape--hero {
  top: -16px;
  left: 40px;
  background: rgba(var(--pink-rgb), 0.85);
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 6px 30px;
  transform: rotate(-4deg);
}

.tape--portrait {
  top: -14px;
  right: 20px;
  background: rgba(var(--fg-rgb), calc(0.9 * var(--alpha-boost)));
  font-size: 12px;
  padding: 5px 26px;
  transform: rotate(3deg);
}

/* --- home: hero -------------------------------------------- */

.hero {
  position: relative;
  padding: 64px var(--gutter) 72px;
  border-bottom: 2px solid var(--cream-20);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
}

.hero__flag {
  display: inline-block;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.24em;
  padding: 6px 14px;
  transform: rotate(-2deg);
  margin-bottom: 22px;
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.88;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__title em {
  color: var(--pink);
  font-style: normal;
}

.hero__copy {
  font-size: 17px;
  line-height: 1.65;
  max-width: 46ch;
  margin: 0 0 12px;
  color: var(--cream-85);
}

.hero__spec {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin: 26px 0 30px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--cream-60);
}

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

.hero__art {
  position: relative;
  animation: jitter 9s ease-in-out infinite;
}

/* --- home: still unclaimed --------------------------------- */

.featured {
  padding: 60px var(--gutter);
  max-width: 1240px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: 34px;
  margin: 0;
  letter-spacing: 0.02em;
}

.featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}

.mini-card {
  border: 2px solid var(--cream-40);
  padding: 12px;
}

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

.mini-card__frame {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(var(--fg-rgb), 0.1) 0 5px,
    transparent 5px 12px
  );
  margin-bottom: 12px;
  overflow: hidden;
}

.mini-card__label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cream-60);
}

.mini-card__name {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.03em;
}

.mini-card__material {
  font-size: 12px;
  color: var(--cream-60);
  margin-top: 5px;
}

.mini-card__price {
  font-size: 13px;
  color: var(--pink);
  margin-top: 8px;
}

/* --- home: quote ------------------------------------------- */

.creed {
  padding: 48px var(--gutter) 76px;
}

.creed__inner {
  max-width: 900px;
  margin: 0 auto;
  border-top: 2px dashed var(--cream-35);
  border-bottom: 2px dashed var(--cream-35);
  padding: 38px 0;
  text-align: center;
}

.creed__quote {
  font-family: var(--typewriter);
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.4;
  margin: 0 0 18px;
  text-wrap: pretty;
}

/* --- interior pages ---------------------------------------- */

.sheet {
  padding: 60px var(--gutter) 80px;
}

.sheet--contact {
  padding-bottom: 90px;
}

.sheet__inner {
  margin: 0 auto;
}

.sheet__inner--about { max-width: 1080px; }
.sheet__inner--shop { max-width: 1240px; }
.sheet__inner--contact { max-width: 1000px; }

.page-title {
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 78px);
  line-height: 0.9;
  margin: 0 0 40px;
}

.page-title em {
  color: var(--pink);
  font-style: normal;
}

.page-title--shop { margin-bottom: 14px; }
.page-title--contact { margin-bottom: 16px; }

/* --- about ------------------------------------------------- */

.story {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}

.story__figure {
  position: relative;
}

.story__prose {
  display: flex;
  flex-direction: column;
  gap: 26px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--cream-88);
}

.story__prose p {
  margin: 0;
}

.story__pull {
  border-left: 4px solid var(--pink);
  padding-left: 20px;
  font-family: var(--typewriter);
  font-size: 19px;
  line-height: 1.5;
  color: var(--cream);
}

.story__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* --- shop -------------------------------------------------- */

.shop__blurb {
  font-size: 15px;
  line-height: 1.7;
  max-width: 62ch;
  color: var(--cream-75);
  margin: 0 0 28px;
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 38px;
  padding-bottom: 26px;
  border-bottom: 2px dashed var(--cream-30);
}

.chip {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 10px 16px;
  cursor: pointer;
  border: 2px solid var(--cream-40);
  background: transparent;
  color: var(--cream);
}

.chip:hover {
  border-color: var(--pink);
}

.chip.is-active {
  border-color: var(--pink);
  background: var(--pink);
  color: var(--ink);
}

.pieces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.piece {
  border: 2px solid var(--cream-40);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.piece:hover {
  border-color: var(--pink);
}

.piece[hidden] {
  display: none;
}

.piece__frame {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(var(--fg-rgb), 0.1) 0 5px,
    transparent 5px 12px
  );
  margin-bottom: 14px;
  overflow: hidden;
}

.piece__no {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--ink);
  border: 1px solid var(--cream-50);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
}

.piece__collection {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: var(--pink);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 3px 8px;
}

.piece__label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cream-60);
}

.piece__name {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.02em;
}

.piece__material {
  font-size: 12.5px;
  color: var(--cream-62);
  margin-top: 6px;
  line-height: 1.5;
}

.piece__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--cream-30);
}

.piece__price {
  font-size: 14px;
  color: var(--pink);
}

.piece__claim {
  font-size: 12px;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--pink);
}

/* --- contact ----------------------------------------------- */

.contact__intro {
  font-size: 16px;
  line-height: 1.7;
  max-width: 58ch;
  color: var(--cream-80);
  margin: 0 0 44px;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.contact-card {
  border: 2px solid var(--cream);
  padding: 30px;
  display: block;
  color: var(--cream);
}

.contact-card:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--ink);
}

.contact-card__kicker {
  font-size: 11px;
  letter-spacing: 0.24em;
  opacity: 0.7;
  margin-bottom: 12px;
}

.contact-card__value {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.3;
}

.contact-card__value--email { word-break: break-all; }
.contact-card__value--phone { font-size: 20px; }
.contact-card__value--social { font-size: 19px; }

.notice {
  margin-top: 44px;
  border: 2px dashed var(--cream-40);
  padding: 30px;
}

.notice__title {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.notice ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cream-82);
}

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

.colophon {
  border-top: 2px solid var(--cream-25);
  padding: 30px var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cream-55);
}

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

@media (max-width: 860px) {
  .hero__inner,
  .story {
    grid-template-columns: 1fr;
  }

  .hero__art {
    order: -1;
    max-width: 420px;
  }

  .story__figure {
    max-width: 420px;
  }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }

  .brand__mark {
    width: 60px;
    height: 60px;
  }

  .masthead {
    gap: 18px;
  }

  .colophon {
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track,
  .hero__art {
    animation: none;
  }
}

/* --- focus visibility -------------------------------------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* --- search (shop) ---------------------------------------- */
/* Sits in the chip row, same dashed rule underneath. Keywords live in
   data-search on each card and never render — this is the only way in. */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.search__label {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cream-50);
}

.search__input {
  font-family: var(--typewriter);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  min-width: 260px;
  border: 2px solid var(--cream-40);
  background: transparent;
  color: var(--cream);
}

.search__input::placeholder {
  color: var(--cream-35);
}

.search__input:focus {
  outline: none;
  border-color: var(--pink);
}

.search__input::-webkit-search-cancel-button {
  filter: invert(1);
  opacity: 0.5;
  cursor: pointer;
}

.search__count {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cream-50);
  margin: -22px 0 26px;
}

.search__empty {
  font-family: var(--typewriter);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--cream-62);
  border: 2px dashed var(--cream-30);
  padding: 28px 22px;
  text-align: center;
  margin: 0 0 26px;
}

@media (max-width: 720px) {
  .search {
    margin-left: 0;
    width: 100%;
  }

  .search__input {
    flex: 1;
    min-width: 0;
  }
}

/* --- claimed pieces --------------------------------------- */
/* A sold piece stays in the catalogue rather than vanishing — one-of-one
   work reads as a record, not just an inventory. */

.piece.is-claimed .piece__frame,
.piece.is-claimed .piece__name,
.piece.is-claimed .piece__material {
  opacity: 0.45;
}

.piece__stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.16em;
  color: var(--pink);
  border: 3px solid var(--pink);
  padding: 8px 16px;
  background: rgba(var(--bg-rgb), 0.72);
  pointer-events: none;
}

.piece__claim--gone {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cream-40);
}
