/* =========================================================
   Nocturnal Studios â€” global stylesheet
   Mobile-first. Restrained. Apple-grade restraint, indie spirit.
   ========================================================= */

:root {
  --ink: #0a0a0a;
  --ink-2: #1d1d1f;
  --ink-3: #424247;
  --mute: #6e6e73;
  --rule: #e5e5e7;
  --paper: #fbfbf9;        /* warm-leaning off-white for alternating sections */
  --bg: #ffffff;
  --yellow: #f4c42b;       /* matches owl eye */
  --red: #e63946;          /* matches A crossbar */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 96px;
  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

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

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

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

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::selection { background: var(--yellow); color: var(--ink); }

/* ---------- Type scale ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(40px, 8vw, 88px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(30px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.03em; }
h3 { font-size: clamp(22px, 3vw, 32px); line-height: 1.15; }
p { margin: 0; }
.lede { font-size: clamp(18px, 2vw, 22px); color: var(--ink-3); line-height: 1.45; max-width: 60ch; }
.muted { color: var(--mute); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(72px, 11vw, 140px) 0; }
.section-tight { padding: clamp(56px, 8vw, 96px) 0; }
.divider { height: 1px; background: var(--rule); border: 0; margin: 0; }
.center { text-align: center; }

.row-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }

.btn-ghost { color: var(--ink); border: 1px solid var(--rule); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

.btn-text { padding: 0; color: var(--ink); font-weight: 500; font-size: 15px; }
.btn-text .arrow { transition: transform .25s var(--ease); display: inline-block; }
.btn-text:hover .arrow { transform: translateX(4px); }
.btn-text::after {
  content: ""; display: block; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
  margin-top: 2px;
}
.btn-text:hover::after { transform: scaleX(1); }

/* ---------- Top navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 14px;
}
.nav-logo .nav-mark {
  height: 72px;
  width: auto;
  display: block;
}
@media (min-width: 768px) {
  .nav-logo .nav-mark { height: 80px; }
}

.nav-links {
  display: none;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  opacity: 0.85;
  transition: opacity .2s var(--ease);
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--red); border-radius: 2px;
}

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 8px;
}
.nav-toggle span { width: 18px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
  background: #fff;
  padding: 32px var(--gutter);
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-menu a {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.mobile-menu a.active { color: var(--ink); }
.mobile-menu .mob-foot { margin-top: auto; padding-top: 24px; color: var(--mute); font-size: 13px; }

@media (min-width: 768px) {
  :root { --nav-h: 108px; }
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.hero-logo {
  width: min(86vw, 720px);
  margin: 0 auto clamp(24px, 4vw, 40px);
}
.hero-tagline {
  margin: 0 auto;
  max-width: 18ch;
  font-size: clamp(28px, 4.6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-sub {
  margin: 18px auto 32px;
  max-width: 38ch;
  color: var(--ink-3);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.5;
}
.hero-cta { justify-content: center; }

/* ---------- Section header ---------- */
.section-head {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: clamp(36px, 6vw, 72px);
  max-width: 56ch;
}
.section-head.center { margin-left: auto; margin-right: auto; align-items: center; text-align: center; }

/* ---------- Game cards ---------- */
.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .games-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }

.game-card {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
  transition: transform .4s var(--ease);
}
.game-card:hover { transform: translateY(-4px); }

.game-card .cover {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  display: grid; place-items: center;
  background: var(--paper);
}
.game-card .cover img {
  width: 60%;
  max-width: 360px;
  height: auto;
  transition: transform .8s var(--ease);
}
.game-card:hover .cover img { transform: scale(1.04); }
.game-card.spoonz:hover .cover img { transform: scale(1.03); }
.game-card.dark .cover { background: #000; padding: 0; }
.game-card.dark .cover img {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateY(13%);
}
.game-card.dark:hover .cover img { transform: translateY(13%) scale(1.04); }

/* Spoonz cover: full-bleed product photo */
.game-card.spoonz .cover { padding: 0; background: #f0efea; }
.game-card.spoonz .cover img {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: translateY(-6%);
}
.game-card.spoonz:hover .cover img { transform: translateY(-6%) scale(1.03); }

.game-card .body {
  padding: clamp(24px, 3vw, 32px);
  display: flex; flex-direction: column; gap: 12px;
}
.game-card .badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  color: var(--ink-2);
}
.badge.dot::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--yellow); margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04);
}

/* Subtle red triangle accent â€” borrows the 'A' crossbar from the logo */
.tri {
  display: inline-block; width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--red);
  vertical-align: middle;
  margin: 0 4px;
}
.game-card .title {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.game-card .desc {
  color: var(--ink-3); font-size: 16px; line-height: 1.5;
  max-width: 48ch;
}
.game-card .ctas {
  margin-top: 4px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}

/* ---------- Studio intro band ---------- */
.intro-band {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.intro-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .intro-grid { grid-template-columns: 1.1fr 1fr; gap: 80px; }
}
.intro-grid .lede { font-size: clamp(20px, 2.2vw, 26px); color: var(--ink-2); line-height: 1.4; }

.brand-mark-lg { width: clamp(220px, 32vw, 360px); height: auto; display: block; }
.brand-mark-md { width: clamp(160px, 22vw, 240px); height: auto; display: block; }

/* ---------- Footer ---------- */
.foot {
  padding: 56px 0 40px;
  background: #000;
  color: #b9b9be;
  font-size: 13px;
}
.foot .row {
  display: flex; flex-direction: column; gap: 28px;
}
@media (min-width: 768px) {
  .foot .row { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 48px; }
}
.foot .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; letter-spacing: 0.04em; }
.foot .brand .nav-mark {
  width: 170px;
  height: 120px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}
.foot a { color: #b9b9be; transition: color .2s var(--ease); }
.foot a:hover { color: #fff; }
.foot .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (min-width: 768px) { .foot .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px; } }
.foot h5 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 14px; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot .legal {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 12px;
  font-size: 12px;
}
@media (min-width: 768px) {
  .foot .legal { flex-direction: row; justify-content: space-between; align-items: center; }
}
.foot .legal-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Page header (interior pages) ---------- */
.page-head {
  padding: clamp(72px, 10vw, 120px) 0 clamp(36px, 6vw, 64px);
}
.page-head .eyebrow { margin-bottom: 16px; display: inline-block; }
.page-head h1 { max-width: 18ch; }
.page-head p.lede { margin-top: 20px; }

/* ---------- About page ---------- */
.about-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px;
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1fr 1.2fr; gap: 96px; }
}
.about-grid h2 { margin-bottom: 16px; }
.about-grid p + p { margin-top: 14px; }
.about-grid p { color: var(--ink-3); font-size: 17px; line-height: 1.6; max-width: 60ch; }

.facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 768px) { .facts { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.fact .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.fact .v { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }

.why-noct {
  margin-top: clamp(72px, 10vw, 120px);
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 64px);
}
@media (min-width: 900px) { .why-noct { grid-template-columns: auto 1fr; gap: 56px; align-items: center; } }
.why-noct .eye-big { width: clamp(140px, 22vw, 220px); aspect-ratio: 1; }
.why-noct h3 { margin-bottom: 12px; }
.why-noct p { color: var(--ink-3); font-size: 17px; line-height: 1.6; max-width: 56ch; }

/* ---------- Support / FAQ ---------- */
.tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  margin-bottom: 40px;
}
.tabs button {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.tabs button.active { background: var(--ink); color: #fff; }

.faq-list { display: flex; flex-direction: column; }
.faq {
  border-top: 1px solid var(--rule);
  padding: 0;
}
.faq:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  padding: 24px 0;
  display: flex; align-items: flex-start; gap: 16px; justify-content: space-between;
  list-style: none;
  font-size: clamp(17px, 1.7vw, 20px);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  position: relative;
  margin-top: 4px;
  transition: transform .3s var(--ease);
}
.faq summary .plus::before, .faq summary .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--ink-2);
  transform: translate(-50%, -50%);
}
.faq summary .plus::before { width: 14px; height: 1.5px; }
.faq summary .plus::after { width: 1.5px; height: 14px; transition: transform .3s var(--ease); }
.faq[open] summary .plus::after { transform: translate(-50%, -50%) scaleY(0); }
.faq[open] summary { color: var(--ink); }
.faq .answer {
  padding: 0 0 24px;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1.6;
  max-width: 64ch;
}
.faq .answer a { text-decoration: underline; text-underline-offset: 3px; }

.support-cta {
  margin-top: 56px;
  padding: clamp(32px, 4vw, 56px);
  border-radius: var(--radius-lg);
  background: #000; color: #fff;
  display: grid; gap: 24px;
}
@media (min-width: 768px) { .support-cta { grid-template-columns: 1fr auto; align-items: center; gap: 56px; } }
.support-cta h3 { color: #fff; }
.support-cta p { color: rgba(255,255,255,0.7); margin-top: 8px; max-width: 50ch; }
.support-cta .btn-primary { background: #fff; color: #000; }
.support-cta .btn-primary:hover { background: var(--yellow); }

/* ---------- Infinite Shells detail page ---------- */
.shells-hero {
  background: #000;
  color: #fff;
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 9vw, 120px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.shells-hero h1 { color: #fff; }
.shells-hero .lede { color: rgba(255,255,255,0.7); margin: 24px auto 36px; }
.shells-hero .badge { background: rgba(255,255,255,0.1); color: #fff; }
.shells-hero img.title-img {
  width: min(80vw, 700px); margin: 0 auto 32px;
}

.feature-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--paper);
}
.feature .num { font-family: var(--f-mono); font-size: 12px; color: var(--mute); letter-spacing: 0.1em; }
.feature h4 { font-size: 22px; margin: 18px 0 8px; letter-spacing: -0.01em; }
.feature p { color: var(--ink-3); font-size: 15px; line-height: 1.55; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}