/* ==========================================================================
   UGH Platform — Global Stylesheet
   Brand guidelines: docs/brand-guidelines.md
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;700;800;900&family=Inter+Tight:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --- Reset / Normalize --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

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

/* --- Design Tokens --- */
:root {
  /* Brand */
  --ugh-red:        #E11D2A;
  --ugh-red-bright: #FF474D;
  --ugh-red-deep:   #9F2127;
  --chrome:         #DADCDE;

  /* Surfaces */
  --ink:            #0C0C0E;
  --ink-2:          #131316;
  --ink-3:          #1C1C21;
  --line:           #2A2A31;

  /* Text */
  --text:           #F2F2F4;
  --text-muted:     #9C9CA6;

  /* Typography */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body:    'Inter Tight', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --container: 1180px;
  --gutter:    24px;
}

/* --- Base Elements --- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--ink);
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--text);
}

h1 {
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.0;
}

h3 {
  font-size: 26px;
  font-weight: 800;
}

h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

p {
  max-width: 68ch;
  line-height: 1.6;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ugh-red-bright);
  outline-offset: 3px;
}

img {
  height: auto;
}

figure {
  margin: 0;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Section --- */
.section {
  padding-block: 96px;
}

/* --- Section Header --- */
.section-header {
  margin-bottom: 48px;
}

.section-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ugh-red);
  margin-top: 16px;
}

/* --- Card --- */
.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: background 180ms ease, border-color 180ms ease;
}

.card:hover {
  background: var(--ink-3);
  border-color: var(--ugh-red-deep);
}

/* --- Stat Block --- */
.stat-block {
  display: flex;
  gap: 0;
}

.stat-block__item {
  flex: 1;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.stat-block__item:last-child {
  border-right: none;
}

.stat-block__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-block__value {
  font-family: var(--font-display);
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1;
}

/* --- Data Ledger --- */
.data-ledger {
  display: grid;
  gap: 0;
}

.data-ledger__row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.data-ledger__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.data-ledger__value {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
}

/* --- Button Primary --- */
.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 15px 26px;
  background: var(--ugh-red);
  color: var(--ink);
  border: 1px solid var(--ugh-red);
  border-radius: 0;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-primary:hover {
  background: transparent;
  color: var(--ugh-red);
  border-color: var(--ugh-red);
}

/* --- Button Secondary --- */
.btn-secondary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 15px 26px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 180ms ease;
}

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

/* --- Tag / Badge --- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--text-muted);
}

/* --- Video Embed --- */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Lead Paragraph --- */
.lead {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.55;
  max-width: 68ch;
}

/* --- Caption --- */
.caption {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

/* --- Label / Eyebrow --- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ==========================================================================
   GLOBAL HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  background: rgba(12, 12, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-header__logo img {
  height: 48px;
  width: auto;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header__nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.site-header__nav a:hover {
  color: var(--text);
  border-bottom-color: var(--ugh-red);
}

.site-header__menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  padding: 8px 0;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  height: 78vh;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

/* Three-stop horizontal gradient + flat scrim */
.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(12, 12, 14, 0.94) 0%,
    rgba(12, 12, 14, 0.88) 40%,
    rgba(12, 12, 14, 0.35) 100%
  );
  z-index: 1;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 14, 0.45);
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 620px;
  margin-left: 0;
  margin-right: auto;
}

.hero__title span {
  display: block;
}

.hero__title .accent {
  color: var(--ugh-red-bright);
}

.hero__statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin-top: 24px;
  color: var(--text);
}

.hero__lead {
  margin-top: 24px;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about__body {
  max-width: 68ch;
}

.about__body p {
  margin-bottom: 24px;
}

.about__body p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   PROJECT SECTION COMPONENT (.ugh-project)
   ========================================================================== */
.ugh-project {
  display: grid;
  grid-template-columns: 52% 1fr;
  gap: 48px;
  align-items: center;
}

.ugh-project__text .eyebrow {
  color: var(--ugh-red);
  margin-bottom: 12px;
}

.ugh-project__text h3 {
  font-size: clamp(28px, 3.4vw, 44px);
  margin-bottom: 12px;
}

.ugh-project__text .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.ugh-project__text p {
  max-width: 68ch;
  line-height: 1.6;
}

/* Hero image in the right column */
.ugh-project__media {
  width: 100%;
}

.ugh-project__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 0;
}

/* Typographic panel fallback */
.ugh-panel {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
}

.ugh-panel__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3vw, 48px);
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.0;
}

.ugh-panel__rule {
  width: 100%;
  height: 2px;
  background: var(--ugh-red);
  margin: 16px 0;
}

.ugh-panel__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

/* Divider between project sections */
.project-divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 80px 0;
}

/* ==========================================================================
   VIDEO CAROUSEL (.ugh-carousel)
   ========================================================================== */
.ugh-carousel {
  margin-top: 48px;
  position: relative;
}

.ugh-carousel__controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.ugh-carousel__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 180ms ease;
  flex-shrink: 0;
}

.ugh-carousel__btn:hover:not(:disabled) {
  border-color: var(--ugh-red);
}

.ugh-carousel__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ugh-carousel__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ugh-carousel__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ugh-carousel__track::-webkit-scrollbar {
  display: none;
}

.ugh-carousel__slide {
  scroll-snap-align: start;
  flex-shrink: 0;
  /* Desktop: show roughly 1.6 slides */
  width: calc((100% - 24px) / 1.6);
}

.ugh-carousel__slide-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   ESPORTS TITANS — PATHWAY STRIP (.ugh-pathway)
   ========================================================================== */
.ugh-pathway {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  margin-top: 48px;
  align-items: stretch;
}

.ugh-pathway__card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 32px 24px;
}

.ugh-pathway__number {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ugh-red);
  margin-bottom: 12px;
}

.ugh-pathway__stage {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.ugh-pathway__desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.ugh-pathway__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--ugh-red);
}

.ugh-pathway__chevron svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.contact h3 {
  margin-bottom: 8px;
}

.contact__sub {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 16px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 64px;
}

.site-footer__top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.site-footer__top img {
  height: 44px;
  width: auto;
}

.site-footer__tagline {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.site-footer__links a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  transition: color 180ms ease;
}

.site-footer__links a:hover {
  color: var(--text);
}

.site-footer__copy {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ----- 1180px ----- */
@media (max-width: 1180px) {
  .ugh-pathway {
    gap: 0;
  }
}

/* ----- 900px ----- */
@media (max-width: 900px) {
  .section {
    padding-block: 64px;
  }

  .hero__bg img {
    object-position: 70% 42%;
  }

  .hero__statement {
    font-size: 20px;
  }

  .ugh-project {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ugh-project__text {
    order: 1;
  }

  .ugh-project__media {
    order: 2;
  }

  .ugh-pathway {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ugh-pathway__chevron {
    display: none;
  }

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

  .ugh-carousel__slide {
    width: calc((100% - 24px) / 1.1);
  }
}

/* ----- 640px ----- */
@media (max-width: 640px) {
  .hero {
    height: 70vh;
  }

  .site-header__nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(12, 12, 14, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px var(--gutter);
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }

  .site-header__nav.is-open {
    display: flex;
  }

  .site-header__menu-btn {
    display: block;
  }

  .data-ledger__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

  .site-footer__links {
    flex-wrap: wrap;
  }

  .ugh-carousel__slide {
    width: calc((100% - 24px) / 1.1);
  }

  .contact {
    padding: 32px 24px;
  }
}

/* ==========================================================================
   PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
