/* Brand palette (from the IRL logo) */
:root {
  --forest: #2F5D46;
  --sage: #5E8F76;
  --mint: #9CC3AE;
  --sun: #E8A33D;
  --ink: #1D2B24;
  --cream: #F4F1EA;

  --bg: var(--cream);
  --meadow: #E4EDE6;
  --text: var(--ink);
  --muted: var(--ink);
  --heading: var(--forest);
  --line: rgba(29, 43, 36, 0.14);

  --max: 1080px;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --meadow: #23342B;
    --text: var(--cream);
    --muted: #B9C7BF;
    --heading: var(--cream);
    --line: rgba(244, 241, 234, 0.14);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--heading);
  line-height: 1.05;
  letter-spacing: -0.02em;
  /* House style: headings and menu are lowercase */
  text-transform: lowercase;
  margin: 0 0 0.4em;
}

a { color: inherit; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) { .container { padding: 0 32px; } }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--forest);
  color: var(--cream);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

.text-link {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--heading);
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.text-link:hover { text-decoration-thickness: 3px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: var(--cream);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.logo img { height: 40px; width: auto; }
.nav-list {
  display: flex;
  text-transform: lowercase;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-list a { text-decoration: none; }
.nav-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 479px) {
  .logo img { height: 34px; }
  .nav-list { gap: 16px; font-size: 0.875rem; }
}

/* Hero */
.hero { padding-top: 96px; }
.hero-inner { padding-bottom: 56px; }
.hero h1 {
  /* Sized to stay on one line down to phone widths */
  font-size: clamp(1.75rem, 7.2vw, 5rem);
}
.lede {
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 28px;
  font-size: clamp(1.15rem, 2vw, 1.3rem);
}
.hero-mountains {
  width: 100%;
  /* Matches the 1440x260 viewBox so the art scales evenly; on phones the
     110px floor makes slice crop the sides instead of squashing */
  height: max(110px, 18.06vw);
  /* Overlap the meadow so a fractional height can't leave a seam */
  margin-bottom: -1px;
}

/* Brands: one row each, alternating sides, on the meadow */
.brands {
  background: var(--meadow);
  padding: 48px 0 40px;
}
.brand {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 48px 0;
}
.brand + .brand { border-top: 1px solid var(--line); }
@media (min-width: 800px) {
  .brand {
    grid-template-columns: 5fr 6fr;
    gap: 64px;
    padding: 72px 0;
  }
  .brand:nth-child(even) .brand-art { order: 2; }
}
.brand h2 { font-size: clamp(2.2rem, 5vw, 3.25rem); }
.brand-title-link { color: inherit; text-decoration: none; }
.brand-copy p { margin: 0 0 16px; max-width: 30em; }

.brand-art {
  display: flex;
  justify-content: center;
}

.status {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.status-live { color: var(--heading); }
.status-live::before { background: #3E9B63; border-color: #3E9B63; }
.status-live a {
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* piece&paw: the brick paw sitting on the grass */
.pp-sculpture {
  width: min(240px, 60vw);
  height: auto;
  filter: drop-shadow(0 18px 14px rgba(29, 43, 36, 0.22));
}

/* meh.cards: the openable card from meh.cards (components/card-book there), at about
   60% of its size on that site. Closed, the stage is the card; open, the front swings
   left on its fold and the spread shifts right and shrinks to stay in place. */
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/playfair-display-latin-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Courier Prime";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/courier-prime-latin-400-normal.woff2") format("woff2");
}
.brand-art:has(.card-book) {
  flex-direction: column;
  align-items: center;
}
.card-book {
  --meh-surface: #FAF8F2;
  --meh-ink: #26241E;
  --meh-muted: #8B8578;
  --meh-line: #D1CCBF;
  --settle-tilt: -1.5deg;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  perspective: 2200px;
  transform: rotate(var(--settle-tilt));
}
.card-book:focus-visible { outline-offset: 8px; }
.card-book-stage {
  --open-scale: 0.8;
  position: relative;
  display: block;
  width: 192px;
  aspect-ratio: 11 / 17;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-book[aria-pressed="true"] .card-book-stage {
  transform: scale(var(--open-scale)) translateX(50%) rotate(calc(var(--settle-tilt) * -2));
}
.card-book-cover {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  transform: rotateY(0deg) translateZ(1px);
  transition: transform 0.9s cubic-bezier(0.45, 0, 0.2, 1);
}
/* A peek on hover, mouse only: on touch screens :hover sticks after a tap. */
@media (hover: hover) {
  .card-book:hover .card-book-cover {
    transform: rotateY(-14deg) translateZ(1px);
  }
}
.card-book[aria-pressed="true"] .card-book-cover {
  transform: rotateY(-180deg) translateZ(1px);
}
.card-book-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.card-front,
.card-inside,
.card-book-face-back {
  background: var(--meh-surface);
  border: 1px solid rgba(209, 204, 191, 0.7);
  border-radius: 3px;
}
.card-front,
.card-inside {
  box-shadow: 0 1px 2px rgba(38, 36, 30, 0.08), 0 14px 28px -14px rgba(38, 36, 30, 0.4);
}
.card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10%;
  text-align: center;
}
.card-front svg { width: 44%; height: auto; }
.card-front-tagline {
  margin-top: 9%;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.375;
  color: var(--meh-ink);
  text-wrap: balance;
}
/* The inside message panel, right of the fold. */
.card-inside {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(38, 36, 30, 0.07), transparent 12%);
}
.card-inside-blank {
  position: absolute;
  inset: 11% 10% auto;
  text-align: center;
  font-family: "Courier Prime", ui-monospace, monospace;
  font-size: 7px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--meh-muted);
}
/* The front's reverse: the inside left panel. */
.card-book-face-back {
  transform: rotateY(180deg);
  background-image: linear-gradient(to left, rgba(38, 36, 30, 0.07), transparent 12%);
}
.card-book-hint {
  margin: 20px 0 0;
  font-family: "Courier Prime", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .card-book-stage,
  .card-book-cover {
    transition: none;
  }
}

/* schanzy: placeholder until there's a logo */
.brand-icon {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  background: var(--mint);
  display: grid;
  place-items: center;
}
.brand-icon svg { width: 64px; height: 64px; fill: #FAF8F2; }

/* lightcue: real app screens */
.lc-shot {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #0F1222;
}

/* Footer: the ridge at dusk */
.site-footer { background: var(--meadow); }
.footer-ridge {
  width: 100%;
  /* Matches the 1440x160 viewBox, same approach as .hero-mountains */
  height: max(70px, 11.12vw);
  margin-bottom: -1px;
}
.footer-body {
  background: var(--forest);
  color: #DCE6E0;
  padding: 40px 0 28px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  padding-bottom: 56px;
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}
.site-footer h2 {
  color: var(--cream);
  font-size: 1.6rem;
}
.site-footer p { margin: 0 0 12px; max-width: 30em; }
.footer-email {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
}
.footer-base {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  border-top: 1px solid rgba(244, 241, 234, 0.16);
  padding-top: 20px;
}
.footer-base img { border-radius: 6px; }
.footer-base p { margin: 0; }

@media (prefers-color-scheme: dark) {
  .site-footer { background: var(--meadow); }
  .footer-body { background: #18241E; }
  .footer-ridge path { fill: #18241E; }
}
