/* Fantosaur brand site. Palette and contrast ratios are the measured system in
   Store 2026/STORE-SPEC.md. Comet Aqua on a light surface is 1.14:1, so aqua text
   and the aqua brand marks only ever sit on a Fossil Violet panel. */

@font-face {
  font-family: "Protest Riot";
  src: url("assets/fonts/protest-riot.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --violet: #25064d;
  --violet-deep: #1a0337;
  --aqua: #4ffff6;
  --moonstone: #f7f5fc;
  --strata: #241640;
  --red: #e0304a;

  /* dark is the default: every brand mark is aqua, and aqua needs a violet ground */
  --page: var(--violet);
  --page-alt: var(--violet-deep);
  --ink: var(--moonstone);
  --ink-quiet: #cfc6e4;
  --link: var(--aqua);
  --cta-face: var(--aqua);
  --cta-ink: #0a0a0a;
  --rule: rgb(247 245 252 / 0.16);

  --panel: var(--violet);
  --panel-ink: var(--moonstone);
  --panel-link: var(--aqua);

  --shell: 1180px;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --page: var(--moonstone);
    --page-alt: #ede9f7;
    --ink: var(--strata);
    --ink-quiet: #4a3a6b;
    --link: var(--violet);
    --cta-face: var(--violet);
    --cta-ink: var(--aqua);
    --rule: rgb(36 22 64 / 0.18);
    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Poppins, "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Protest Riot", Poppins, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
}

h1 {
  font-size: clamp(2.15rem, 1.15rem + 3.6vw, 3.9rem);
}
h2 {
  font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.7rem);
}
h3 {
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
}

p {
  margin: 0 0 1.1em;
  max-width: 62ch;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}
a:hover {
  text-decoration-thickness: 2px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--cta-face);
  color: var(--cta-ink);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

/* ---------- header: always the violet brand bar, in both colour schemes ---------- */

.masthead {
  background: var(--panel);
  border-bottom: 1px solid rgb(79 255 246 / 0.22);
}
.masthead .shell {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding-block: 0.9rem;
}
.masthead a {
  display: block;
  line-height: 0;
  border-radius: 6px;
}
.masthead img {
  width: 202px;
}
@media (max-width: 480px) {
  .masthead img {
    width: 164px;
  }
  .masthead .shell {
    min-height: 64px;
  }
}

/* ---------- hero: violet panel, asymmetric split ---------- */

.hero {
  background: var(--panel);
  color: var(--panel-ink);
  padding-block: clamp(2.5rem, 1.2rem + 4.4vw, 4.5rem);
}
.hero .shell {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 3.75rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero .shell {
    grid-template-columns: 1.08fr 0.92fr;
  }
}

.hero p {
  color: #e6dff5;
  font-size: 1.125rem;
  max-width: 34ch;
}
.hero h1 {
  margin-bottom: 0.55em;
}

.hero-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgb(10 2 24 / 0.55);
  aspect-ratio: 4 / 5;
  max-height: 62vh;
  margin-inline: auto;
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 899px) {
  .hero-frame {
    aspect-ratio: 16 / 11;
    max-height: 40vh;
  }
  .hero-frame img {
    /* Dino stands at the foot of the plate: anchor the crop to the bottom
       or a phone shows him cut off at the knees */
    object-position: 50% 100%;
  }
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.82rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease);
}
.btn svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  flex: none;
}

/* black on Comet Aqua, 16.97:1 */
.btn-primary {
  background: var(--aqua);
  color: #0a0a0a;
}
.btn-primary:hover {
  box-shadow: 0 10px 26px rgb(79 255 246 / 0.3);
}

/* on the violet hero panel only, so the aqua stroke and label stay legal */
.btn-ghost {
  color: var(--aqua);
  border-color: rgb(79 255 246 / 0.55);
}
.btn-ghost:hover {
  border-color: var(--aqua);
  background: rgb(79 255 246 / 0.1);
}

@media (prefers-reduced-motion: no-preference) {
  .btn:hover {
    transform: translateY(-2px);
  }
  .btn:active {
    transform: translateY(0) scale(0.98);
  }
}

/* ---------- sections ---------- */

section {
  padding-block: clamp(3rem, 1.6rem + 5vw, 5.5rem);
}
.section-head {
  max-width: 46ch;
  margin-bottom: 2.6rem;
}
.section-head h2 {
  margin-bottom: 0.5em;
}
.section-head p {
  color: var(--ink-quiet);
  margin-bottom: 0;
}

/* ---------- the joke: three real frames, one complete joke ---------- */

.bit {
  background: var(--page-alt);
}
.strip {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(3, 1fr);
}
.strip img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgb(10 2 24 / 0.42);
}
@media (max-width: 720px) {
  /* stay legible on a phone: one frame at a time, flick sideways */
  .strip {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 74%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
  }
  .strip img {
    scroll-snap-align: center;
  }
}
.bit .actions {
  margin-top: 2.4rem;
}

/* ---------- riff rucks ---------- */

.rucks .shell {
  display: grid;
  gap: clamp(2rem, 1rem + 3.4vw, 3.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .rucks .shell {
    grid-template-columns: 0.85fr 1.15fr;
  }
}
.rucks img {
  border-radius: var(--radius);
  width: 100%;
  box-shadow: 0 18px 44px rgb(10 2 24 / 0.3);
}
.rucks .copy h2 {
  margin-bottom: 0.5em;
}

/* ---------- follow row ---------- */

.follow {
  background: var(--panel);
  color: var(--panel-ink);
}
.follow h2 {
  margin-bottom: 1.9rem;
}
.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid rgb(79 255 246 / 0.4);
  border-radius: 999px;
  color: var(--aqua);
  text-decoration: none;
  font-weight: 600;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.socials a:hover {
  background: rgb(79 255 246 / 0.12);
  border-color: var(--aqua);
}
.socials svg {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .socials a:hover {
    transform: translateY(-2px);
  }
}

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

.site-foot {
  background: var(--panel);
  color: var(--panel-ink);
  border-top: 1px solid rgb(79 255 246 / 0.22);
  padding-block: 2.6rem;
  font-size: 0.95rem;
}
.site-foot .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  align-items: center;
  justify-content: space-between;
}
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}
.site-foot a {
  color: var(--panel-link);
}
.site-foot p {
  margin: 0;
  color: #d8d0ec;
}

/* ---------- long-form pages ---------- */

.prose {
  padding-block: clamp(2.5rem, 1.4rem + 4vw, 4.5rem);
}
.prose h1 {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  margin-bottom: 0.35em;
}
.prose h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem);
  margin-top: 2.4rem;
  margin-bottom: 0.6rem;
}
.prose .updated {
  color: var(--ink-quiet);
  font-size: 0.95rem;
  margin-bottom: 2.4rem;
}
.prose p,
.prose li {
  max-width: 68ch;
}
.prose ul {
  padding-left: 1.15rem;
  margin: 0 0 1.1em;
}
.prose li {
  margin-bottom: 0.5em;
}
.prose .lede {
  font-size: 1.15rem;
}

/* ---------- motion: entrance only, and only where the browser can do it
   on the scroll timeline. Guarded so a browser without support never
   inherits opacity 0. ---------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
    }
    @keyframes rise-in {
      from {
        opacity: 0;
        transform: translateY(22px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
  }
}
