/* Chilango Labs landing page
 * Decide/Learn surface: a studio landing page that establishes credibility,
 * showcases products, and carries the Rebel Persona without becoming costume.
 */

:root {
  color-scheme: dark;
  --bg: #080605;
  --bg-2: #110d0b;
  --ink: #fff4df;
  --text: #fff4df;
  --muted: #c9a98f;
  --dim: #7e6659;
  --line: rgba(255, 244, 223, 0.14);
  --line-strong: rgba(255, 244, 223, 0.28);
  --panel: rgba(255, 244, 223, 0.065);
  --panel-strong: rgba(255, 244, 223, 0.12);
  --red: #ff3d2e;
  --gold: #f0b642;
  --green: #31d36b;
  --blue: #38a3ff;
  --black: #030202;
  --shadow: rgba(0, 0, 0, 0.52) 0 28px 80px -36px;
  --display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Azeret Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--display);
  line-height: 1.45;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 61, 46, 0.36), transparent 28rem),
    radial-gradient(circle at 78% 0%, rgba(240, 182, 66, 0.22), transparent 25rem),
    radial-gradient(circle at 70% 88%, rgba(56, 163, 255, 0.12), transparent 32rem),
    linear-gradient(145deg, #080605 0%, #160e0b 48%, #050403 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 244, 223, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 244, 223, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.72) 42%, transparent 92%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: repeating-radial-gradient(circle at 0 0, rgba(255,255,255,.18) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

a { color: inherit; }

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand,
.site-header nav,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(3, 2, 2, .55);
  color: var(--black);
  background: var(--gold);
  box-shadow: 6px 6px 0 var(--red), rgba(0,0,0,.35) 0 18px 32px -18px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.12em;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-header nav {
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-header nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--text);
  background: var(--panel);
  outline: none;
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.62fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: stretch;
  padding: clamp(64px, 10vw, 128px) 0 clamp(56px, 8vw, 98px);
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-label,
.tag {
  margin: 0 0 18px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 26px;
  font-size: clamp(58px, 11vw, 132px);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.075em;
  text-wrap: balance;
  text-shadow: 0.045em 0.045em 0 rgba(255, 61, 46, 0.58);
}

.dek {
  max-width: 740px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(18px, 2.25vw, 24px);
  line-height: 1.55;
  text-wrap: pretty;
}

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

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-primary {
  color: var(--black);
  background: var(--gold);
  box-shadow: 7px 7px 0 var(--red);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 10px 10px 0 var(--red);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 244, 223, 0.055);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 244, 223, 0.12);
}

.console-card {
  align-self: end;
  min-height: 430px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255,244,223,.10), rgba(255,244,223,.03)),
    rgba(3,2,2,.68);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.console-card::before {
  content: 'CHILANGO LABS';
  position: absolute;
  right: -120px;
  bottom: 66px;
  color: rgba(255, 244, 223, 0.06);
  font-family: var(--mono);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 0.16em;
  transform: rotate(-9deg);
  white-space: nowrap;
}

.console-topline,
.console-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.console-topline {
  margin-bottom: 52px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
}

.status-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(49,211,107,.75);
}

.console-card dl {
  display: grid;
  gap: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.console-card dl div {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.console-card dt {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.console-card dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

.console-note {
  position: relative;
  z-index: 1;
  margin: 44px 0 0;
  color: var(--gold);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.studio-band,
.section {
  border-top: 1px solid var(--line);
}

.studio-band {
  padding: clamp(56px, 8vw, 94px) 0;
}

.studio-band > h2,
.section-heading h2,
.systems-section h2 {
  max-width: 940px;
  margin-bottom: 34px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.94;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.studio-grid,
.work-grid {
  display: grid;
  gap: 14px;
}

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

.studio-grid article,
.work-card {
  border: 1px solid var(--line);
  background: rgba(255, 244, 223, 0.055);
  box-shadow: rgba(0,0,0,.28) 0 20px 50px -34px;
}

.studio-grid article {
  min-height: 260px;
  padding: 24px;
}

.studio-grid span {
  display: inline-flex;
  margin-bottom: 44px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.studio-grid h3,
.work-card h3 {
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.studio-grid p,
.work-card p,
.doctrine-list {
  color: var(--muted);
}

.section {
  padding: clamp(56px, 9vw, 104px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin-bottom: 0;
}

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

.work-card {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: rgba(255, 244, 223, 0.085);
}

.featured-card {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 61, 46, .26), transparent 18rem),
    linear-gradient(145deg, rgba(240,182,66,.17), rgba(255,244,223,.055));
}

.dark-card {
  background:
    radial-gradient(circle at 84% 0%, rgba(56,163,255,.16), transparent 17rem),
    rgba(3,2,2,.52);
}

.tag {
  margin-bottom: 0;
  color: var(--gold);
}

.work-card h3 {
  margin-top: auto;
  font-size: clamp(30px, 3vw, 44px);
}

.work-card p:not(.tag) {
  margin-bottom: 28px;
  font-size: 16px;
}

.work-card a,
.work-card span {
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(3,2,2,.38);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.work-card a:hover,
.work-card a:focus-visible {
  color: var(--black);
  background: var(--gold);
  outline: none;
}

.systems-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1fr);
  gap: clamp(32px, 6vw, 86px);
}

.doctrine-list {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.58;
}

.doctrine-list p {
  margin-bottom: 26px;
}

.doctrine-list ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doctrine-list li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.doctrine-list strong {
  color: var(--text);
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

.site-footer p:first-child,
.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }

  .site-header nav {
    flex-wrap: wrap;
  }

  .hero,
  .section-heading,
  .systems-section {
    grid-template-columns: 1fr;
  }

  .console-card {
    align-self: stretch;
    min-height: 330px;
  }

  .studio-grid,
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header nav a {
    padding-inline: 8px;
  }

  h1 {
    font-size: clamp(54px, 18vw, 88px);
  }

  .hero {
    padding-top: 48px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .console-card dl div {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .console-card dd {
    text-align: left;
  }

  .studio-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

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

  .work-card,
  .studio-grid article {
    min-height: 250px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
