/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #eef1ec;
  --surface: #ffffff;
  --ink: #171f1b;
  --ink-dim: #4b564f;
  --line: rgba(23, 31, 27, 0.16);
  --line-soft: rgba(23, 31, 27, 0.07);
  --accent: #b6402c;
  --accent-ink: #fbf6f2;
  --overlay-top: rgba(10, 12, 10, 0.4);
  --overlay-bottom: rgba(10, 12, 10, 0.75);

  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Roboto Mono", monospace;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;

  /* The nav stays this dark shade in both themes — it sits on hero images,
     so it doesn't follow the light/dark ink tokens above. */
  --nav-bg: #12151a;
  --nav-line: rgba(231, 236, 236, 0.14);
  --nav-ink: #f3f1ec;
  --nav-ink-dim: rgba(243, 241, 236, 0.65);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151a;
    --surface: #191e25;
    --ink: #e7ecec;
    --ink-dim: #9aa6a2;
    --line: rgba(231, 236, 236, 0.16);
    --line-soft: rgba(231, 236, 236, 0.06);
    --accent: #e2694a;
    --accent-ink: #12151a;
  }
}
:root[data-theme="dark"] {
  --bg: #12151a;
  --surface: #191e25;
  --ink: #e7ecec;
  --ink-dim: #9aa6a2;
  --line: rgba(231, 236, 236, 0.16);
  --line-soft: rgba(231, 236, 236, 0.06);
  --accent: #e2694a;
  --accent-ink: #12151a;
}
:root[data-theme="light"] {
  --bg: #eef1ec;
  --surface: #ffffff;
  --ink: #171f1b;
  --ink-dim: #4b564f;
  --line: rgba(23, 31, 27, 0.16);
  --line-soft: rgba(23, 31, 27, 0.07);
  --accent: #b6402c;
  --accent-ink: #fbf6f2;
}

/* Per-project fallback tints — used behind background images (drop files in
   images/backgrounds/ using the names referenced below and these show through
   as an overlay tint until the image loads, and as a safety net if it 404s). */
.hero--tromino   { --hero-tint: #16324a; }
.hero--mindbubble{ --hero-tint: #123a33; }
.hero--launchbay { --hero-tint: #3a1712; }

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 48px);
  background: transparent;
  transition: background 0.25s ease, padding 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

/* Nav is always solid and always dark — never shows the hero image behind
   it, and doesn't follow the light/dark theme toggle. Scrolling only
   tightens the padding slightly (.is-scrolled). */
.nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-line);
}
.nav.is-scrolled,
.nav.is-open {
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nav-ink);
}

.nav__brand img {
    height: 45px;
    width: auto;
    display: block;
}

.nav__brand span { color: var(--nav-ink-dim); }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--nav-line);
  border-radius: 3px;
  width: 38px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--nav-ink);
  content: "";
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__toggle span { left: 9px; right: 9px; top: 50%; transform: translateY(-50%); }
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after { top: 7px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-7px) rotate(-45deg); }

.nav__links {
  display: flex;
  gap: clamp(18px, 3vw, 34px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav__links a {
  color: var(--nav-ink-dim);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--nav-ink);
  border-color: var(--accent);
}
.nav__links a.is-current { color: var(--accent); }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav.is-open .nav__links { max-height: 320px; }
  .nav__links a {
    padding: 16px clamp(20px, 5vw, 48px);
    border-bottom: 1px solid rgba(231, 236, 236, 0.08);
    border-left: 2px solid transparent;
  }
  .nav__links a.is-active { border-left-color: var(--accent); }
}

/* ==========================================================================
   Hero sections
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 120px clamp(20px, 6vw, 64px) 90px;
  background-color: var(--hero-tint);
  background-size: cover;
  background-position: top center;
  color: #f3f1ec;
  overflow: hidden;
  scroll-margin-top: 70px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--overlay-top) 0%, var(--overlay-bottom) 100%);
  pointer-events: none;
}
.hero--tromino    { background-image: linear-gradient(180deg, var(--overlay-top), var(--overlay-bottom)), url("../images/backgrounds/tromino-bg.png"); }
.hero--mindbubble { background-image: linear-gradient(180deg, var(--overlay-top), var(--overlay-bottom)), url("../images/backgrounds/mindbubble-bg.jpg"); }
.hero--launchbay  { background-image: linear-gradient(180deg, var(--overlay-top), var(--overlay-bottom)), url("../images/backgrounds/launchbay-bg.jpg"); }

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero__logo {
  height: 40px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 22px;
  opacity: 0.96;
}

.hero__code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(243, 241, 236, 0.65);
  margin-bottom: 10px;
}

.hero__title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.hero__title small {
  display: block;
  font-size: 0.4em;
  letter-spacing: 0.08em;
  color: rgba(243, 241, 236, 0.6);
  margin-top: 6px;
}

.hero__tagline {
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent);
  margin: 0 0 18px;
}

.hero__desc {
  max-width: 56ch;
  font-size: 1.08rem;
  color: rgba(243, 241, 236, 0.92);
  margin: 0 0 26px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-bottom: 28px;
}
.hero__meta div {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, 0.55);
}
.hero__meta div b {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: #f3f1ec;
  font-weight: 600;
  margin-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1px solid rgba(243, 241, 236, 0.4);
  border-radius: 2px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, 0.7);
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(243, 241, 236, 0.7);
}
.status-pill.live { color: var(--accent); }
.status-pill.live::before { background: var(--accent); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px clamp(20px, 6vw, 64px);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-top: 1px solid var(--line);
}
.site-footer a:hover { color: var(--accent); }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-hero {
  padding: 160px clamp(20px, 6vw, 64px) 70px;
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 28px 28px;
}
.contact-hero h1 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin: 0 0 16px;
  text-wrap: balance;
}
.contact-hero p {
  max-width: 52ch;
  color: var(--ink-dim);
  font-size: 1.1rem;
  margin: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 920px;
  margin: 0 auto;
}
.contact-card {
  background: var(--bg);
  padding: 36px 28px;
}
.contact-card .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.contact-card .value {
  font-size: 1.15rem;
}
.contact-card a.value:hover { color: var(--accent); }

.contact-wrap {
  padding: 60px clamp(20px, 6vw, 64px) 100px;
}
