/* ==========================================================================
   Meh — The Unemotional Support Worm
   One stylesheet. Edit colours & spacing in the :root block below.
   ========================================================================== */

/* ----------------------------------------------------------------- Fonts --
   Self-hosted in /public/fonts so the site has no external dependencies.
   Instrument Serif and DM Sans are both SIL Open Font License.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
}

:root {
  /* ---- Colours (sampled from the official Meh card artwork) ---- */
  --cream: #f4e5d9;
  /* page background — matches the artwork background exactly */
  --ink: #171818;
  /* headlines + body */
  --muted: #736055;
  /* secondary text — darkened slightly to pass WCAG AA contrast on cream */
  --blush: #d6a59a;
  /* dusty rose accent, same as the rule in the logo */
  --line: rgba(23, 24, 24, 0.16);
  /* hairlines */

  /* ---- Type ---- */
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* ---- Layout ---- */
  --maxw: 1140px;
  --gutter: 24px;
}

/* --------------------------------------------------------------- Reset -- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Visible keyboard focus (does not show for mouse users) */
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

h1,
h2,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

/* Shared page width */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Display type — the serif voice of the brand */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.dot {
  color: var(--blush);
}

/* Small tracked caps */
.eyebrow,
.site-nav a,
.handle {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
}

/* -------------------------------------------------------------- Header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 229, 217, 0.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

/* ---------------------------------------------------------------- Hero -- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 104px;
}

/* The Meh logo lockup artwork */
.hero-logo {
  margin: 0 0 40px;
}

.hero-logo img {
  width: min(100%, 470px);
  height: auto;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  line-height: 1.3;
  max-width: 22ch;
}

/* The character. The artwork's own background matches --cream, so it sits
   on the page with no visible edge. */
.hero-figure {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-figure img {
  width: min(100%, 540px);
}

/* ------------------------------------------------------------ Sections -- */

.section {
  padding-top: 96px;
  padding-bottom: 96px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 72px;
}

.section-head {
  max-width: 22ch;
  margin-bottom: 56px;
}

.section-head .display {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 18px;
}

.section-head .eyebrow {
  color: var(--muted);
}

/* About — heading left, editorial copy right */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
  row-gap: 20px;
  align-items: start;
}

.col-head .display {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

.col-body {
  max-width: 46ch;
  color: var(--muted);
}

.col-body p + p {
  margin-top: 20px;
}

.col-body .lead {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 24px;
}

.col-body strong {
  color: var(--ink);
  font-weight: 700;
}

/* --------------------------------------------------------- Social links -- */

.links li {
  border-top: 1px solid var(--line);
}

.links li:last-child {
  border-bottom: 1px solid var(--line);
}

.links a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 18px;
  padding: 26px 4px;
  min-height: 44px;
  transition: color 0.15s ease, padding-left 0.2s ease;
}

.links a:hover {
  color: var(--muted);
  padding-left: 12px;
}

.platform {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.handle {
  color: var(--muted);
}

.arrow {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--muted);
}

/* ------------------------------------------------------------- Contact -- */

.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  line-height: 1.2;
  word-break: break-word;
}

.contact-email a {
  border-bottom: 1px solid var(--blush);
  padding-bottom: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-email a:hover {
  color: var(--muted);
  border-color: var(--muted);
}

.contact-note {
  margin-top: 28px;
  color: var(--muted);
}

/* -------------------------------------------------------------- Footer -- */

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-mark {
  width: 38px;
  height: auto;
}

/* ---------------------------------------------------------- Responsive -- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 72px;
  }

  .hero-figure {
    order: -1;
  }

  .hero-figure img {
    width: min(88%, 400px);
  }

  .hero-logo {
    margin-bottom: 28px;
  }

  .hero-logo img {
    width: min(100%, 420px);
  }

  .lede {
    max-width: none;
  }

  .two-col {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .section-head {
    margin-bottom: 36px;
  }
}

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

  body {
    font-size: 16px;
  }

  /* Tighter header padding so the taller (44px) tap targets don't grow the bar */
  .header-inner {
    gap: 10px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    padding: 14px 0;
  }

  .wordmark {
    font-size: 1.35rem;
  }

  .lede {
    font-size: 1.4rem;
  }

  .links a {
    padding: 20px 0;
  }

  .links a:hover {
    padding-left: 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
