:root {
  --bg: #050a0f;
  --bg-grid: #1a202c;
  --surface: #0b1118;
  --surface-2: #111a24;
  --text: #f0f4f8;
  --muted: #8b9aad;
  --teal: #1abc9c;
  --teal-bright: #48d1cc;
  --teal-dim: #16a085;
  --orange: #f39c12;
  --orange-bright: #ffb300;
  --orange-dim: #d35400;
  --accent: var(--teal-bright);
  --accent-secondary: var(--orange);
  --border: #1e2a38;
  --glow-teal: 0 0 18px rgba(72, 209, 204, 0.35);
  --glow-orange: 0 0 18px rgba(243, 156, 18, 0.35);
  --max: 760px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(26, 32, 44, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 32, 44, 0.45) 1px, transparent 1px),
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(26, 188, 156, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(243, 156, 18, 0.08), transparent);
  background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%;
  min-height: 100vh;
}

a {
  color: var(--teal-bright);
  text-decoration: none;
  transition: color 0.15s, text-shadow 0.15s;
}

a:hover {
  color: var(--orange-bright);
  text-shadow: var(--glow-orange);
  text-decoration: none;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(5, 10, 15, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 0.3rem 1.5rem;
}

.site-header-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.site-header-band {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

/* Swappable left brand (studio ↔ product), MacPaw Eney-style */
.header-brand-slot {
  position: relative;
  flex-shrink: 0;
  min-width: 14rem;
  height: 3.5rem;
}

.header-brand-slot .company-mark--header img {
  width: 56px;
  height: 56px;
}

.header-brand {
  position: absolute;
  left: 0;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  white-space: nowrap;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.header-brand--studio {
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}

.header-brand--product {
  opacity: 0;
  transform: translateY(calc(-50% + 8px));
  pointer-events: none;
}

.header-brand--product .brand-logo-frame {
  width: 46px;
  height: 46px;
}

.site-header.header--product .header-brand--studio {
  opacity: 0;
  transform: translateY(calc(-50% - 8px));
  pointer-events: none;
}

.site-header.header--product .header-brand--product {
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}

.site-header-inner > .site-nav {
  margin-left: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.88rem;
}

.btn--header {
  flex-shrink: 0;
  min-height: 2.25rem;
  padding: 0 1rem;
  font-size: 0.85rem;
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-logo-frame {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(5, 10, 15, 0.6);
  box-shadow: var(--glow-teal), var(--glow-orange);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand:hover .brand-logo-frame {
  box-shadow:
    0 0 22px rgba(72, 209, 204, 0.5),
    0 0 22px rgba(243, 156, 18, 0.4);
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.75);
  flex-shrink: 0;
}

.brand:hover .brand-logo {
  filter: brightness(1.08);
}

nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

nav a {
  color: var(--muted);
}

nav a:hover {
  color: var(--teal-bright);
  text-shadow: var(--glow-teal);
}

nav a.active {
  color: var(--orange-bright);
  text-shadow: var(--glow-orange);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.hero-logo {
  width: min(220px, 60vw);
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 0 28px rgba(72, 209, 204, 0.45))
    drop-shadow(0 0 40px rgba(243, 156, 18, 0.3));
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, var(--teal-bright) 0%, var(--text) 45%, var(--orange-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 1.25rem;
}

.hero p strong {
  color: var(--teal-bright);
}

.hero-links {
  margin-top: 0.5rem;
}

.hero-links a {
  font-weight: 600;
}

.cards {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--teal-dim);
  box-shadow: var(--glow-teal);
  transform: translateY(-2px);
}

.card:nth-child(even):hover {
  border-color: var(--orange-dim);
  box-shadow: var(--glow-orange);
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--teal-bright);
}

.card:nth-child(even) h2 {
  color: var(--orange-bright);
}

.card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.card a {
  font-size: 0.92rem;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  color: var(--teal-bright);
  text-shadow: var(--glow-teal);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--orange-bright);
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--teal-bright);
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.35rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  color: var(--teal-bright);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface);
  color: var(--orange-bright);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.company-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  opacity: 0.92;
  transition: color 0.15s, opacity 0.15s;
}

.company-mark:hover {
  color: var(--text);
  text-shadow: none;
  opacity: 1;
}

.company-mark img {
  width: 48px;
  height: 48px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.company-mark--header {
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  opacity: 1;
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}

.company-mark--header img {
  width: 64px;
  height: 64px;
}

.company-mark--header .company-mark-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.company-mark--header:hover .company-mark-name {
  color: var(--teal-bright);
  text-shadow: var(--glow-teal);
}

.company-mark--compact {
  gap: 0.55rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  opacity: 0.92;
}

.company-mark--compact img {
  width: 48px;
  height: 48px;
}

.company-mark-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.company-mark--compact:hover .company-mark-name {
  color: var(--text);
}

.company-mark--compact:hover {
  border-color: rgba(72, 209, 204, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.site-footer p {
  margin: 0.25rem 0;
}

.badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(26, 188, 156, 0.15), rgba(243, 156, 18, 0.12));
  border: 1px solid var(--teal-dim);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  color: var(--teal-bright);
  margin-bottom: 1rem;
  box-shadow: var(--glow-teal);
}

@media (max-width: 900px) {
  .site-header {
    position: relative;
    grid-template-columns: 1fr;
  }

  .header-brand-slot {
    min-width: 0;
    width: 100%;
    padding-right: 5.75rem;
  }

  .site-header-inner {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 0.65rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    white-space: normal;
  }

  .btn--header {
    position: absolute;
    top: calc(0.3rem + (3.5rem - 2.25rem) / 2);
    right: 1.5rem;
    margin-left: 0;
    z-index: 2;
  }
}

@media (max-width: 600px) {
  .header-brand-slot .company-mark-name {
    font-size: 0.95rem;
  }

  .header-brand--product span:last-child {
    font-size: 0.95rem;
  }

  .btn--header {
    min-height: 2rem;
    padding: 0 0.8rem;
    font-size: 0.8rem;
    top: calc(0.3rem + (3.5rem - 2rem) / 2);
  }
}
