:root {
  color-scheme: dark;
  --ink-gold: #f3cb48;
  --ink-paper: #fff8e6;
  --ink-soft: #d8e5e8;
  --ink-line: rgba(255, 248, 230, 0.2);
  --ink-panel: rgba(3, 6, 13, 0.58);
  --ink-panel-strong: rgba(3, 6, 13, 0.76);
  --ink-blue: #70d5ee;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink-paper);
  background:
    linear-gradient(rgba(4, 6, 14, 0.2), rgba(4, 6, 14, 0.82)),
    url("./magg_inkFull_background.png") center / cover fixed no-repeat,
    #050912;
}

a {
  color: inherit;
}

.wing-chrome {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.wing-chrome strong,
.chrome-link {
  color: var(--ink-paper);
  font-size: 1.28rem;
  font-weight: 950;
  letter-spacing: 0;
  text-decoration: none;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.74);
  pointer-events: auto;
}

.chrome-close {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 248, 230, 0.34);
  border-radius: 50%;
  color: var(--ink-paper);
  background: rgba(4, 6, 14, 0.66);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto;
}

.chrome-close:hover,
.chrome-close:focus-visible,
.chrome-link:hover,
.chrome-link:focus-visible {
  border-color: rgba(243, 203, 72, 0.68);
  color: var(--ink-gold);
  outline: none;
}

.wing-stage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 64px 20px 24px;
}

.wing-panel {
  width: min(1180px, calc(100vw - 40px));
  min-height: calc(100dvh - 88px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 48px 16px 48px;
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(3, 6, 13, 0.36), rgba(3, 6, 13, 0.05) 54%, rgba(3, 6, 13, 0.44)),
    rgba(3, 6, 13, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand-badge {
  color: #050912;
  background: var(--ink-paper);
}

.brand-text {
  color: var(--ink-gold);
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(180px, 1fr);
  gap: 36px;
  align-items: end;
}

.hero-copy {
  max-width: 640px;
}

.wing-eyeline {
  margin: 0 0 54px;
  color: var(--ink-gold);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 8.6ch;
  margin: 0;
  font-size: 4.95rem;
  font-weight: 950;
  line-height: 0.94;
  letter-spacing: 0;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.64);
}

p {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
}

.hero-mascot {
  justify-self: end;
  align-self: start;
  color: rgba(255, 248, 230, 0.5);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-card-grid,
.tool-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

.home-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(255, 248, 230, 0.18);
  border-radius: 10px;
  background: rgba(3, 6, 13, 0.44);
  color: var(--ink-paper);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
}

.master-card {
  min-height: 116px;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: rgba(243, 203, 72, 0.6);
  background: rgba(3, 6, 13, 0.58);
  outline: none;
}

.tool-card.active {
  border-color: rgba(243, 203, 72, 0.42);
}

.tool-card.source-loaded {
  border-color: rgba(112, 213, 238, 0.42);
}

.tool-card.textile-loaded {
  border-color: rgba(125, 220, 150, 0.44);
}

.tool-card.locked {
  opacity: 0.78;
}

.tool-card span {
  color: var(--ink-gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-card strong {
  font-size: 1.08rem;
  line-height: 1.1;
}

.tool-card em,
.tool-card b {
  max-width: 48ch;
  color: rgba(255, 248, 230, 0.8);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
}

.tool-card b {
  color: var(--ink-blue);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.choose-label {
  margin: 6px 0 -6px;
  color: var(--ink-gold);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wide-card {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .wing-stage {
    padding: 58px 12px 12px;
  }

  .wing-panel {
    width: 100%;
    min-height: calc(100dvh - 70px);
    padding: 32px 12px;
  }

  .hero-row,
  .home-card-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero-mascot {
    display: none;
  }

  .wing-eyeline {
    margin-bottom: 36px;
  }

  h1 {
    font-size: 4.05rem;
  }

  .wide-card {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .wing-chrome {
    left: 12px;
    right: 12px;
  }

  .wing-chrome strong,
  .chrome-link {
    font-size: 1rem;
  }

  .chrome-close {
    width: 36px;
    height: 36px;
  }

  h1 {
    font-size: 3.25rem;
  }

  p {
    font-size: 0.92rem;
  }
}
