/* =========================================================================
   heartstopper.gay — unofficial fan site
   Design tokens + layout + comic aesthetic
   ========================================================================= */

/* ---- Design tokens ---- */
:root {
  /* Paper & ink */
  --paper:        #FBF6EE;  /* cream background */
  --paper-deep:   #F3EADB;  /* slightly darker cream for panels */
  --ink:          #3D3A38;  /* soft charcoal text */
  --ink-soft:     #5C5854;  /* muted ink for secondary text */

  /* Pastel accents */
  --sky:    #8FC1E3;
  --yellow: #F2C14E;
  --orange: #E8985E;
  --pink:   #F4A9B8;
  --sage:   #A8C49B;

  /* Deeper accent tints (AA-contrast against paper for text use) */
  --sky-ink:    #2C6B96;
  --orange-ink: #A8562A;
  --pink-ink:   #9E3A54;
  --sage-ink:   #4C6B3F;

  /* Type */
  --font-head: "Patrick Hand", "Comic Sans MS", cursive;
  --font-body: ui-rounded, "SF Pro Rounded", "Segoe UI", "Nunito",
               system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Spacing & shape */
  --radius:      18px;
  --radius-lg:   28px;
  --gap:         clamp(1rem, 2.5vw, 2rem);
  --section-pad: clamp(3rem, 8vw, 6rem);
  --maxw:        1080px;

  --shadow-soft: 0 8px 22px rgba(61, 58, 56, 0.10);
  --shadow-card: 0 6px 16px rgba(61, 58, 56, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a {
  color: var(--sky-ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover,
a:focus-visible { color: var(--orange-ink); }

:focus-visible {
  outline: 3px solid var(--sky-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Layout helpers ---- */
.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

section { padding-block: var(--section-pad); }

/* ---- Headings ---- */
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: 0.5px;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.25em;
}

h3 {
  font-size: 1.5rem;
  margin: 0 0 0.4em;
}

/* Squiggly hand-drawn underline under section headings */
.section-title {
  display: inline-block;
  position: relative;
}
.section-title .squiggle {
  display: block;
  width: clamp(120px, 60%, 260px);
  height: 12px;
  margin-top: 4px;
  color: var(--orange);
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding-block: var(--section-pad);
  background:
    radial-gradient(120% 90% at 50% -10%, #FFFDF8 0%, var(--paper) 55%),
    var(--paper);
}

/* Leaves live behind the text */
.leaves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.leaves svg {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-inline: 1.25rem;
}

.hero__title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 7rem);
  margin: 0;
  line-height: 0.95;
  color: var(--ink);
}
.hero__title .dot { color: var(--pink-ink); }

.hero__tagline {
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  color: var(--ink-soft);
  margin: 0.75rem auto 0;
  max-width: 32ch;
}

.hero__hearts {
  margin-top: 1.5rem;
  color: var(--pink);
}

/* Finale-film sticker */
.hero__news {
  display: inline-block;
  margin-top: 2rem;
  background: var(--paper-deep);
  border: 2px dashed var(--pink);
  border-radius: var(--radius);
  padding: 0.8rem 1.2rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--pink-ink);
  text-decoration: none;
  transform: rotate(-1.5deg);
}
.hero__news:hover,
.hero__news:focus-visible {
  transform: rotate(0deg);
}

/* Little scroll hint */
.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-family: var(--font-head);
  color: var(--ink-soft);
  font-size: 1rem;
  text-decoration: none;
  opacity: 0.85;
}

/* =========================================================================
   ABOUT
   ========================================================================= */
.about .lead + .lead { margin-top: 1.1rem; }

.about__note {
  margin-top: 1.6rem;
  display: inline-block;
  background: var(--paper-deep);
  border: 2px dashed var(--sage);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--sage-ink);
  transform: rotate(-1deg);
}

/* =========================================================================
   CHARACTERS — sticker cards
   ========================================================================= */
.card-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  list-style: none;
  padding-left: 0;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 940px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: var(--shadow-card);
  position: relative;
}
/* Slight sticker rotations, varied per card */
.card:nth-child(3n+1) { transform: rotate(-1.5deg); }
.card:nth-child(3n+2) { transform: rotate(1deg); }
.card:nth-child(3n+3) { transform: rotate(-0.5deg); }
.card:hover,
.card:focus-within { transform: rotate(0deg) translateY(-4px); transition: transform .25s ease; }

.card__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 0.6rem;
  background: var(--paper-deep);
  border: 2px dotted var(--ink);
}
.card h3 { margin-bottom: 0.15em; }
.card__role {
  font-family: var(--font-head);
  color: var(--orange-ink);
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}
.card p:last-child { margin-bottom: 0; }

/* Accent tint on the icon bubble, cycling colours */
.card:nth-child(7n+1) .card__icon { background: #FCEFD2; }
.card:nth-child(7n+2) .card__icon { background: #E3F0FB; }
.card:nth-child(7n+3) .card__icon { background: #FBE7EC; }
.card:nth-child(7n+4) .card__icon { background: #EAF2E4; }
.card:nth-child(7n+5) .card__icon { background: #FBEEDD; }
.card:nth-child(7n+6) .card__icon { background: #FCEFD2; }
.card:nth-child(7n+7) .card__icon { background: #E3F0FB; }

/* =========================================================================
   MOMENTS
   ========================================================================= */
.moments__grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}
@media (min-width: 720px) {
  .moments__grid { grid-template-columns: repeat(2, 1fr); }
}

.moment {
  background: var(--paper-deep);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  border: 2px solid transparent;
  position: relative;
}
.moment:nth-child(1) { border-color: var(--yellow); }
.moment:nth-child(2) { border-color: var(--sky); }
.moment:nth-child(3) { border-color: var(--pink); }
.moment:nth-child(4) { border-color: var(--sage); }

.moment__kicker {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}
.moment h3 { margin-bottom: 0.3em; }
.moment p:last-child { margin-bottom: 0; }

/* =========================================================================
   OFFICIAL LINKS
   ========================================================================= */
.official {
  background: var(--paper-deep);
  border-radius: var(--radius-lg);
}
.official__grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .official__grid { grid-template-columns: repeat(2, 1fr); }
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease;
}
.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-3px);
  color: var(--ink);
}
/* The finale film gets a slightly celebratory card */
.link-card--new {
  border-style: dashed;
  border-color: var(--pink-ink);
  transform: rotate(-0.6deg);
}
.link-card--new:hover,
.link-card--new:focus-visible {
  transform: rotate(0deg) translateY(-3px);
}

.link-card__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--orange-ink);
}
.link-card__text strong {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.3rem;
  display: block;
  line-height: 1.1;
}
.link-card__text span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.official__support {
  margin-top: 2rem;
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--sage-ink);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  background: var(--paper);
  border-top: 2px dashed var(--sage);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.footer__heart { color: var(--pink); margin-bottom: 0.75rem; }
.footer__title { font-size: 1.6rem; }
.footer__disclaimer {
  max-width: 60ch;
  margin: 0 auto 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.footer__privacy {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}
.footer strong { color: var(--ink); }

/* =========================================================================
   MOTION PREFERENCES
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover,
  .card:focus-within,
  .link-card:hover,
  .link-card:focus-visible { transition: none; }
}
