:root {
  --bg: #F7F5F0;
  --surface: #EFECE5;
  --surface-elevated: #FFFFFF;
  --ink: #111110;
  --ink-muted: #57554E;
  --border: rgba(17, 17, 16, 0.12);
  --accent: #B84A27;
  --accent-ink: #FAF8F4;
  --inverted-bg: #141413;
  --inverted-ink: #F7F5F0;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --radius: 2px;
  --ease-morph: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 88px 0;
}

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

/* =====================================================
   Morphing Frosted-Glass Navbar (SpaceX / Anthropic feel)
   ===================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
  pointer-events: none;
  transition: padding 0.52s var(--ease-morph);
}

.topbar.is-scrolled {
  padding: 14px 20px 0;
}

.topbar-shell {
  pointer-events: auto;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(247, 245, 240, 0.88);
  border: 1px solid transparent;
  border-bottom-color: var(--border);
  border-radius: 0px;
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  box-shadow: 0 0 0 rgba(17, 17, 16, 0);
  transition:
    max-width 0.56s var(--ease-morph),
    padding 0.52s var(--ease-morph),
    gap 0.52s var(--ease-morph),
    border-radius 0.56s var(--ease-morph),
    background-color 0.45s var(--ease-morph),
    border-color 0.45s var(--ease-morph),
    box-shadow 0.52s var(--ease-morph),
    backdrop-filter 0.45s var(--ease-morph);
}

.topbar.is-scrolled .topbar-shell {
  max-width: 560px;
  padding: 8px 10px 8px 14px;
  gap: 14px;
  border-radius: 999px;
  background: rgba(247, 245, 240, 0.68);
  border-color: rgba(17, 17, 16, 0.13);
  backdrop-filter: blur(24px) saturate(175%);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
  box-shadow:
    0 12px 34px -10px rgba(17, 17, 16, 0.16),
    0 2px 8px -2px rgba(17, 17, 16, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(17, 17, 16, 0.04);
}

/* Brand mark + unified ALL CAPS morphing wordmark ([D]EDICATED STUDIOS -> [D]) */
.brand-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.brand-mark-slot {
  width: 0.73em;
  height: 0.73em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 0.06em;
  transform-origin: center center;
  transition:
    transform 0.52s var(--ease-morph),
    margin-right 0.48s var(--ease-morph);
}

.topbar.is-scrolled .brand-mark-slot {
  transform: scale(1.45) translateY(0.03em);
  margin-right: 0;
}

.brand-mark-slot svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-wordmark-wrap {
  display: inline-flex;
  overflow: hidden;
  max-width: 210px;
  opacity: 1;
  transform: translateX(0);
  transition:
    max-width 0.52s var(--ease-morph),
    opacity 0.28s ease,
    transform 0.48s var(--ease-morph);
}

.topbar.is-scrolled .brand-wordmark-wrap {
  max-width: 0;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
}

.brand-wordmark {
  white-space: nowrap;
  display: inline-block;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--ink-muted);
  transition: gap 0.48s var(--ease-morph);
}

.topbar.is-scrolled .nav-links {
  gap: 6px;
}

.nav-links a {
  padding: 5px 8px;
  border-radius: 999px;
  transition:
    color 0.2s ease,
    background-color 0.25s ease,
    padding 0.42s var(--ease-morph),
    font-size 0.42s var(--ease-morph);
}

.topbar.is-scrolled .nav-links a {
  padding: 5px 10px;
  font-size: 13px;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(17, 17, 16, 0.05);
}

.nav-links a.active {
  color: var(--ink);
  background: rgba(17, 17, 16, 0.08);
}

/* Right CTA button */
.nav-cta {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    padding 0.48s var(--ease-morph),
    opacity 0.18s ease,
    background-color 0.25s ease;
}

.nav-cta:hover {
  opacity: 0.86;
}

.nav-cta-compact {
  display: none;
}

.topbar.is-scrolled .nav-cta {
  padding: 6px 13px;
}

.topbar.is-scrolled .nav-cta-full {
  display: none;
}

.topbar.is-scrolled .nav-cta-compact {
  display: inline;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

/* Hero */
.hero {
  padding: 80px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

h1 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 6vw, 74px);
  line-height: 1.03;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.lead {
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}

.btn-primary:hover {
  opacity: 0.86;
}

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

.btn-secondary:hover {
  border-color: var(--ink);
}

.hero-monolith {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.monolith-stage {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--ink);
}

.monolith-stage svg {
  width: 148px;
  height: 148px;
}

.monolith-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--bg);
}

/* Section headers */
.section-header {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 48px;
}

.section-intro {
  margin: 0;
  color: var(--ink-muted);
  font-size: 16px;
  max-width: 58ch;
}

/* Pillars */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.pillar {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pillar p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

/* Logo Showcase */
.logo-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.logo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.logo-card--surface {
  background: var(--surface-elevated);
  color: var(--ink);
}

.logo-card--inverted {
  background: var(--inverted-bg);
  color: var(--inverted-ink);
}

.logo-card--accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.logo-lockup {
  min-height: 210px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  padding: 36px 24px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.logo-mark-large {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
}

.logo-lockup svg {
  width: 0.73em;
  height: 0.73em;
  margin-right: 0.06em;
  flex-shrink: 0;
  display: block;
}

.logo-lockup-text {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1em;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1;
}

.logo-mark-large svg {
  width: 72px;
  height: 72px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-muted);
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rule-box {
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rule-box ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 14.5px;
}

.rule-box li + li {
  margin-top: 8px;
}

/* Palette */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.swatch {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-elevated);
  text-align: left;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.swatch:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.swatch-chip {
  height: 148px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px 16px;
}

.swatch-copy-hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  opacity: 0.78;
}

.swatch-info {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.swatch-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.swatch-role {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.swatch-values {
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
}

/* Typography Specimens */
.type-specimens {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.type-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.type-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 13.5px;
}

.type-meta strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.type-sample-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.type-sample-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  max-width: 60ch;
}

.type-sample-mono {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
}

/* Voice */
.voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.voice-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated);
}

.voice-card--muted {
  background: var(--surface);
}

.voice-example {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

.voice-quote {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.55;
}

.voice-quote.strike {
  color: var(--ink-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(87, 85, 78, 0.55);
}

.voice-note {
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* Applications */
.apps-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.app-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
}

.app-preview {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.browser-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: 0;
  color: var(--ink-muted);
}

.browser-tag {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.browser-body {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  padding: 24px;
}

.mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-muted);
}

.mini-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.mini-lockup svg {
  width: 0.73em;
  height: 0.73em;
  margin-right: 0.06em;
  display: block;
}

.browser-body h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
}

.browser-body p {
  margin: 0 0 22px;
  font-size: 14.5px;
  color: var(--ink-muted);
}

.mini-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mini-label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.biz-card {
  aspect-ratio: 1.65 / 1;
  background: var(--inverted-bg);
  color: var(--inverted-ink);
  padding: 26px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.biz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.biz-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
}

.biz-mark svg {
  width: 100%;
  height: 100%;
}

.biz-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
}

.biz-role {
  font-size: 13.5px;
  opacity: 0.72;
  margin-bottom: 14px;
}

.biz-contact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0.85;
  padding-top: 12px;
  border-top: 1px solid rgba(247, 245, 240, 0.18);
}

/* Footer */
.footer {
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-mark {
  width: 18px;
  height: 18px;
  display: inline-flex;
  color: var(--ink);
}

.footer-mark svg {
  width: 100%;
  height: 100%;
}

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  font-size: 13.5px;
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero-grid,
  .section-header,
  .three-col,
  .logo-showcase,
  .rules-grid,
  .palette-grid,
  .voice-grid,
  .apps-grid {
    grid-template-columns: 1fr;
  }

  .type-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .topbar.is-scrolled .topbar-shell {
    max-width: 220px;
  }
}
