/*
  /projects in the Stoner look (public/designs/stoner.css): a 1970s desert record sleeve.
  Aged kraft paper with soft stains and grain, dark brown ink, Caprasimo titles, Barlow
  Condensed for the credits, covers framed in the sleeve's stripe bands (cream, orange,
  brick, dusty purple, ink keyline). Status marks are small inked moons.
  Loads after base.css + index.css; tokens first, the rest under .theme-stoner.
*/

:root[data-theme="stoner"] {
  color-scheme: light;

  --stage: #ead3a8;
  --shot: #f3e2c2;
  --card: #f3e2c2;
  --raise: #e2c897;
  --line: #3b2216;
  --fg: #3b2216;
  --muted: #4e3020;
  --sub: #4a2c1c;
  --faint: #8a6a4c;
  --accent: #a3412a;
  /* 7.9:1 on plain paper, about 4.7:1 at the darkest stained corner, where no text sits */
  --accent-text: #6a2010;
  --on-accent: #f6e7c9;
  --accent-soft: rgba(59, 34, 22, 0.08);

  --cream: #f6e7c9;
  --band-orange: #d6743a;
  --band-brick: #a3412a;
  --band-purple: #5b3b57;

  --f-display: "Caprasimo", Georgia, serif;
  --f-text: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-mono: "Barlow Condensed", "Arial Narrow", sans-serif;

  --s-hero: clamp(2.9rem, 6.4vw, 5.4rem);
  --s-xl: clamp(1.9rem, 3.4vw, 2.8rem);

  --r-sm: 3px;
  --r-md: 4px;
}

/* The sleeve: stains and handled edges, like the landing page */
.theme-stoner {
  font-size: 18px;
  line-height: 1.5;
  background:
    radial-gradient(ellipse 38% 30% at 12% 6%, rgba(165, 105, 45, 0.13), transparent 70%),
    radial-gradient(ellipse 30% 40% at 92% 70%, rgba(150, 90, 35, 0.14), transparent 70%),
    radial-gradient(ellipse 18% 12% at 46% 3%, rgba(255, 245, 220, 0.35), transparent 70%),
    radial-gradient(ellipse 120% 110% at 50% 45%, transparent 58%, rgba(115, 70, 28, 0.22) 100%) fixed,
    var(--stage);
}

/* Paper grain, static */
.theme-stoner::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .15 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.theme-stoner ::selection {
  background: var(--band-purple);
  color: var(--cream);
}

.theme-stoner a {
  text-underline-offset: 4px;
}

.theme-stoner a:focus-visible,
.theme-stoner :focus-visible {
  outline: 3px solid var(--band-purple);
  outline-offset: 3px;
}

/* Header: a double ink rule, like the sleeve's printed border */
.theme-stoner .site-header {
  border-bottom: 3px solid var(--fg);
  background: linear-gradient(var(--fg), var(--fg)) left bottom 3px / 100% 1px no-repeat;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.theme-stoner .site-header__home {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
}

.theme-stoner .site-header__mail {
  color: var(--muted);
}

/* Phones: the chunky face runs wide, keep name and address on one line each */
@media (max-width: 479px) {
  .theme-stoner .site-header__home {
    font-size: 19px;
    white-space: nowrap;
  }

  .theme-stoner .site-header__mail {
    font-size: 14px;
    letter-spacing: 0.02em;
  }
}

/* Titles: Caprasimo has one weight; never let it be faux-bolded */
.theme-stoner h1,
.theme-stoner h2,
.theme-stoner h3 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.005em;
}

.theme-stoner .projects__intro h1 {
  line-height: 0.95;
}

.theme-stoner .projects__lede {
  max-width: 40ch;
  font-size: clamp(19px, 1.6vw, 22px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

/* Covers: set into the sleeve's stripe bands */
.theme-stoner .featured__media,
.theme-stoner .entry__media {
  --b1: 3px; --b2: 6px; --b3: 6px; --b4: 6px; --b5: 3px;
  --frame: calc(var(--b1) + var(--b2) + var(--b3) + var(--b4) + var(--b5));
  margin: var(--frame);
  border: 0;
  border-radius: 4px;
  background: var(--shot);
  box-shadow:
    0 0 0 var(--b1) var(--cream),
    0 0 0 calc(var(--b1) + var(--b2)) var(--band-orange),
    0 0 0 calc(var(--b1) + var(--b2) + var(--b3)) var(--band-brick),
    0 0 0 calc(var(--b1) + var(--b2) + var(--b3) + var(--b4)) var(--band-purple),
    0 0 0 var(--frame) var(--fg);
}

.theme-stoner .entry__media {
  --b1: 2px; --b2: 4px; --b3: 4px; --b4: 4px; --b5: 2px;
}

.theme-stoner .featured__media:hover,
.theme-stoner .entry__media:hover {
  opacity: 1;
}

.theme-stoner .featured__title a,
.theme-stoner .entry__title a {
  color: var(--fg);
}

.theme-stoner .featured__title a:hover,
.theme-stoner .entry__title a:hover {
  color: var(--accent-text);
}

.theme-stoner .featured__pitch,
.theme-stoner .entry__pitch {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--sub);
}

/* Meta: the sleeve's back-cover credits */
.theme-stoner .meta {
  font-family: var(--f-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-stoner .meta__status {
  color: var(--fg);
}

/* Status marks: small inked moons */
.theme-stoner .planet {
  border: 1.5px solid var(--fg);
  border-radius: 50%;
  background: var(--band-orange);
  box-shadow: none;
}

.theme-stoner .meta .planet {
  width: 11px;
  height: 11px;
}

.theme-stoner .planet--neutral {
  background: linear-gradient(to right, var(--cream) 0 50%, var(--fg) 50%);
}

.theme-stoner .planet--off {
  background: var(--cream);
}

/* Button: an inked pill; it fills with ink on hover */
.theme-stoner .btn {
  min-height: 46px;
  padding: 10px 22px;
  border: 2px solid var(--fg);
  border-radius: 999px;
  font-family: var(--f-text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.theme-stoner .btn--ghost {
  border-color: var(--fg);
  color: var(--fg);
}

.theme-stoner .btn--ghost:hover {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--cream);
}

/* More projects: a credits label; index.css sets this class's font, so restate it here */
.theme-stoner .more__title {
  font-family: var(--f-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.theme-stoner .entry {
  border-top: 2px solid var(--fg);
}

/* Contact: the last rule, with a small moon on it */
.theme-stoner .projects__contact {
  border-top: 3px solid var(--fg);
  color: var(--sub);
  font-size: 19px;
  font-weight: 500;
}

.theme-stoner .projects__contact .planet {
  width: 14px;
  height: 14px;
  top: -8px;
  background: var(--band-orange);
}

.theme-stoner .projects__contact a {
  color: var(--accent-text);
}

@media (prefers-reduced-motion: reduce) {
  .theme-stoner * {
    transition: none !important;
  }
}
