/* Shiba Forever LLC. Hand-written CSS, no build step, no dependencies. */

/* ---------- fonts ----------
   Merriweather and Merriweather Sans, self-hosted as variable woff2 (latin
   subset). Self-hosted rather than loaded from Google Fonts so the site makes
   no third-party requests and has nothing external to fail. */
@font-face {
  font-family: 'Merriweather';
  src: url('/fonts/merriweather-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Merriweather Sans';
  src: url('/fonts/merriweather-sans-latin.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens: light is the base, dark overrides only colors ---------- */
:root {
  --bg:        #faf8f5;
  --surface:   #ffffff;
  --ink:       #14110e;
  --ink-soft:  #3d372f;
  --muted:     #6b6259;
  --rule:      #e4ddd3;
  --rule-soft: #efe9e1;
  --accent:    #b7651f;
  --accent-bg: #fbf1e6;

  --sans: 'Merriweather Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: 'Merriweather', ui-serif, "Iowan Old Style", Palatino, Georgia, serif;

  --wrap: 1080px;
  --gap: clamp(3.5rem, 9vw, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #100e0c;
    --surface:   #191614;
    --ink:       #f3eee7;
    --ink-soft:  #d6cec3;
    --muted:     #988e83;
    --rule:      #2b2622;
    --rule-soft: #221e1b;
    --accent:    #e2a05a;
    --accent-bg: #23190f;
  }
}

:root[data-theme="dark"] {
  --bg:        #100e0c;
  --surface:   #191614;
  --ink:       #f3eee7;
  --ink-soft:  #d6cec3;
  --muted:     #988e83;
  --rule:      #2b2622;
  --rule-soft: #221e1b;
  --accent:    #e2a05a;
  --accent-bg: #23190f;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 700px) { body { font-size: 17px; } }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  /* Merriweather has a tall x-height and needs more leading than a
     Georgia-class serif at the same size. */
  line-height: 1.24;
  margin: 0;
  text-wrap: balance;
}

strong { font-weight: 600; color: var(--ink); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  z-index: 10;
  background: var(--surface);
  color: var(--ink);
  padding: .6rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
}

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

/* ---------- header ---------- */
.site-head {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 66px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: none;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.06rem;
  letter-spacing: .01em;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: .87rem;
  color: var(--muted);
}

.nav a {
  text-decoration: none;
  padding-block: .25rem;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(4.5rem, 12vw, 8.5rem) clamp(3.5rem, 8vw, 6rem);
}

.hero h1 {
  font-size: clamp(1.95rem, 5.5vw, 3.3rem);
  max-width: 20ch;
}

.lede {
  margin-top: 1.75rem;
  max-width: 62ch;
  font-size: clamp(1.05rem, 2.1vw, 1.22rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 4.5rem);
  margin-top: clamp(2.75rem, 6vw, 4rem);
  padding-top: 1.85rem;
  border-top: 1px solid var(--rule);
}

.fact { display: flex; flex-direction: column; gap: .15rem; }

.fact-n {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1;
  color: var(--accent);
}

.fact-l {
  font-size: .84rem;
  color: var(--muted);
}

/* ---------- sections ---------- */
.section { padding-block: var(--gap); }

.eyebrow {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

.section h2 {
  font-size: clamp(1.55rem, 3.8vw, 2.2rem);
  max-width: 24ch;
}

.section-lede {
  margin-top: 1.5rem;
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.1rem);
}

/* ---------- steps ---------- */
.steps {
  list-style: none;
  margin: clamp(2.75rem, 6vw, 4rem) 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem 2.5rem;
  padding-block: 2rem;
  border-top: 1px solid var(--rule-soft);
}

.step:first-child { border-top-color: var(--rule); }

.step-n {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: .05em;
}

.step h3 { font-size: 1.25rem; }

.step p {
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0;
}

@media (min-width: 780px) {
  .step {
    grid-template-columns: 4.5rem 15rem 1fr;
    align-items: baseline;
    padding-block: 2.35rem;
  }
  .step-n { grid-row: span 1; }
}

/* ---------- two column ---------- */
.twocol {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.twocol > div { color: var(--ink-soft); max-width: 62ch; }

@media (min-width: 860px) {
  .twocol { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  /* The game card carries an image, so it gets an even split. */
  #work .twocol { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.prose {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  max-width: 62ch;
  color: var(--ink-soft);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.6rem 1.5rem;
}

.panel-title {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.checks, .team {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .8rem;
}

.checks li {
  position: relative;
  padding-left: 1.6rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--accent);
}

.team li {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--rule-soft);
}
.team li:last-child { border-bottom: 0; padding-bottom: 0; }

.team-name { font-family: var(--serif); font-size: 1.08rem; }
.team-role { font-size: .85rem; color: var(--muted); }

/* ---------- card grid ---------- */
.grid {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  padding: 1.7rem 1.5rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: .6rem;
}

.card p {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.card em { color: var(--ink-soft); font-style: italic; }

/* ---------- company facts ---------- */
.facts {
  margin: clamp(2.25rem, 5vw, 3rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  max-width: 74ch;
}

.facts-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .15rem 2rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--rule-soft);
}

.facts dt {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  padding-top: .2em;
}

.facts dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: .97rem;
}

.facts a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.facts address { font-style: normal; line-height: 1.5; }

@media (min-width: 700px) {
  .facts-row { grid-template-columns: 12rem minmax(0, 1fr); align-items: baseline; }
}

/* ---------- game card ---------- */
.game {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
}

.game-art { display: block; }

.game-art img {
  display: block;
  width: 100%;
  height: auto;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--rule);
}

.game-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 13px;
}

.game-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}

.game-name { font-family: var(--serif); font-size: 1rem; }
.game-sub { font-size: .82rem; color: var(--muted); }

/* ---------- button ---------- */
.btn {
  display: inline-block;
  margin-top: 1.75rem;
  padding: .72rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  font-size: .93rem;
  transition: background .15s ease, color .15s ease;
}

.btn:hover { background: var(--accent-bg); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.75rem, 6vw, 4rem) 2rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.foot-note {
  margin: .4rem 0 0;
  font-size: .9rem;
  color: var(--muted);
  max-width: 34ch;
}

.foot-nav {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .9rem;
}

.foot-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.foot-nav a:hover { color: var(--accent); }

.foot-legal {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-soft);
  font-size: .8rem;
  color: var(--muted);
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(4rem, 12vw, 8rem);
}

.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
