/* yawnfactory.com
   ---------------------------------------------------------------------------
   The studio site is deliberately the opposite of the game site. hoseboy.com is
   a two-ink screenprint that shouts in monospace; this is the room at four in
   the morning: overcast paper, one sodium lamp, thin rules that run the whole
   width, and a lot of air between things.

   The identity is one line. The mark is a factory roofline whose last tooth,
   instead of coming back down, stretches out into a long slow curve — the yawn.
   That line is the only thing on the page that moves, it takes five and a half
   seconds to draw itself, and every horizontal rule below it is the same weight
   and the same idea.

   Type: a system serif set large and loosely leaded for anything the studio
   actually says, a system sans for reading, a mono for labels. No font files.

   Amber sits at 2.8:1 on the paper, so --lamp draws the lamp line, the mark's
   floor and hover states and never sets type. Where a label wants to be warm it
   uses --lamp-text, which is the same colour taken down until it reads.
   --------------------------------------------------------------------------- */

:root {
  --paper:  #e6e8ec;
  --ink:    #16181f;
  --soft:   #5b6270;
  --rule:   #c6cad3;
  --lamp:   #c07a1e;
  --lamp-text: #8a5410;
  --link:   #2f3a63;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: system-ui, "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", "DejaVu Sans Mono", monospace;

  --gutter: clamp(1.5rem, 5vw, 4.5rem);
  --shell: 68rem;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:  #101219;
    --ink:    #e2e4ea;
    --soft:   #8c93a3;
    --rule:   #262a36;
    --lamp:   #e0a54a;
    --lamp-text: #e0a54a;
    --link:   #aab5e4;
  }
}

*, *::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(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.75;
}

svg { display: block; }

a { color: inherit; text-decoration-color: var(--lamp); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--link); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
}
.skip:focus { left: 0; }

/* ---------- the roofline ---------- */

.roof {
  color: var(--ink);
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 0;
}
.roof svg {
  width: min(100%, var(--shell));
  margin-inline: auto;
  height: auto;
}

/* ---------- shell ---------- */

.shell {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding: 0 var(--gutter) 0;
}

.nameplate {
  margin: clamp(2rem, 5vw, 3rem) 0 0.4rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  letter-spacing: 0.2em;
  line-height: 1.2;
}
.nameplate a { text-decoration: none; }

.nameplate__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--soft);
}

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

main { display: block; }

section {
  padding-block: clamp(3rem, 8vw, 6rem) 0;
}

.opening { padding-top: clamp(3.5rem, 9vw, 7rem); }

h1 {
  margin: 0;
  max-width: 19ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.15rem + 3.2vw, 3.5rem);
  line-height: 1.24;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.lede {
  margin: 1.8rem 0 0;
  max-width: var(--measure);
  color: var(--soft);
}

/* The rules run the whole width; the words never do. That gap is the design. */
.label {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0 0 2.2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}
.label span { color: var(--lamp-text); letter-spacing: 0.1em; }

.prose { display: grid; gap: 1.3rem; max-width: var(--measure); }
.prose p { margin: 0; }

.aside {
  margin: 2.4rem 0 0;
  max-width: var(--measure);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--soft);
}

/* ---------- the one game ---------- */

.game {
  display: grid;
  gap: 1.6rem 2.6rem;
  align-items: start;
}
@media (min-width: 44rem) {
  .game { grid-template-columns: 9.5rem minmax(0, 1fr); }
}

.game__mark { color: var(--ink); }
.game__mark svg { width: 9.5rem; height: auto; }

.game__status {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lamp-text);
}

.game h3 {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.game h3 a { text-decoration: none; border-bottom: 2px solid var(--lamp); padding-bottom: 2px; }
.game h3 a:hover { border-bottom-color: var(--link); }

.game__pitch { margin: 0; max-width: var(--measure); }

.game__meta { margin: 2rem 0 0; max-width: var(--measure); }
.game__meta > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.3rem 1.2rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rule);
}
.game__meta dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
  padding-top: 0.35em;
}
.game__meta dd { margin: 0; font-size: 0.96rem; line-height: 1.55; }

@media (max-width: 30rem) {
  .game__meta > div { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* ---------- contact ---------- */

.contact {
  margin: 0 0 1.4rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.05rem + 1.4vw, 2rem);
  line-height: 1.2;
}
.contact a { text-decoration: none; border-bottom: 2px solid var(--lamp); padding-bottom: 3px; }
.contact a:hover { border-bottom-color: var(--link); }

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

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2.5rem;
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: 1.6rem 0 3rem;
  border-top: 1px solid var(--rule);
}

.foot__mark {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  color: var(--soft);
}
.foot__nav a { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.foot__nav a:hover { color: var(--ink); border-bottom-color: var(--lamp); }

/* ---------- the yawn ---------- */

@media (prefers-reduced-motion: no-preference) {
  .roof__teeth {
    stroke-dasharray: 620;
    stroke-dashoffset: 620;
    animation: draw 1.6s 0.2s ease-out forwards;
  }
  .roof__yawn {
    stroke-dasharray: 1040;
    stroke-dashoffset: 1040;
    animation: draw 5.5s 1.4s cubic-bezier(0.16, 0.7, 0.2, 1) forwards;
  }
  .roof__floor {
    opacity: 0;
    animation: settle 2.4s 5.6s ease-out forwards;
  }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes settle { to { opacity: 1; } }
