/* ============================================================
   The Kong is Dead — global.css
   Single source of truth for variables, resets, typography,
   layout utilities, and brand styling.
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --tkid-black: #000000;
  --tkid-chalk: #F2F2F0;
  --tkid-blood: #8B0000;

  --font-heading: "Compacta", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Courier New", Courier, monospace;

  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
}

/* ---------- @font-face for Compacta (Dot) ----------
   Place your Compacta font files in static/fonts/ and
   uncomment / adjust these declarations accordingly.
   --------------------------------------------------- */
/*
@font-face {
  font-family: "Compacta";
  src: url("/static/fonts/CompactaDot-Regular.woff2") format("woff2"),
       url("/static/fonts/CompactaDot-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*/

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--tkid-black);
  color: var(--tkid-chalk);
  line-height: 1.6;
  min-height: 100dvh;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--tkid-chalk);
  text-decoration: none;
}

a:hover {
  color: var(--tkid-chalk);
  text-decoration: underline;
  text-decoration-color: var(--tkid-blood);
  text-underline-offset: 0.2em;
}

/* ---------- Typography ---------- */
h1, h2 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: var(--tkid-chalk);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 3rem); }

h3, h4, h5, h6 {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

p, li, dd, dt, label, input, textarea, select, blockquote {
  font-family: var(--font-body);
}

/* ---------- View Transitions ---------- */
::view-transition-old(root) {
  animation: vt-fade-out 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
::view-transition-new(root) {
  animation: vt-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Named element transitions: the image morphs from one size/position to another */
::view-transition-group(*) {
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.15, 1);
}
::view-transition-old(*):not(::view-transition-old(root)) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(*):not(::view-transition-new(root)) {
  animation: none;
  mix-blend-mode: normal;
}

@keyframes vt-fade-out {
  to { opacity: 0; }
}
@keyframes vt-fade-in {
  from { opacity: 0; }
}

/* ---------- Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--spacing-md);
}

/* ---------- Site Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(1rem, 3vh, 2rem) var(--spacing-lg);
  background: transparent;
  transition: padding 0.3s ease;
}

.site-header__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--tkid-chalk);
  justify-self: start;
  display: flex;
  align-items: center;
}

.site-header__logo-img {
  height: 28px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}
.site-header__logo:hover .site-header__logo-img {
  opacity: 0.8;
}

.site-header__nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.site-header__center {
  justify-self: center;
  display: flex; /* Show on desktop too */
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.8em;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.6;
  pointer-events: none;
}

.site-header__nav > * + *::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 0.8em;
  background: var(--tkid-chalk);
  opacity: 0.25;
  margin-right: var(--spacing-sm);
  vertical-align: middle;
}

.site-header__link {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--tkid-chalk);
  transition: opacity 0.2s ease;
}

.site-header__link--trigger {
  cursor: default;
  position: relative;
}
.site-header__link--trigger:hover {
  text-decoration: none;
}

/* ——— Dropdown Logic ——— */
.site-header__item {
  position: relative;
  display: flex;
  align-items: center;
}

.site-header__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: var(--tkid-black);
  border: 1px solid rgba(242, 242, 240, 0.1);
  padding: 30px;
  min-width: 450px;
  display: flex;
  flex-direction: row; /* Side by side */
  gap: var(--spacing-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 110;
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

/* Red box indicator for dropdown */
.site-header__dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--tkid-blood);
}

.site-header__item:hover .site-header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.site-header__dropdown-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-body);
  text-transform: uppercase;
  color: #fff;
  transition: all 0.3s ease;
  padding: 15px;
  border: 1px solid rgba(255,255,255,0.03);
  text-decoration: none !important;
}

.site-header__dropdown-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  text-decoration: none !important;
}

.site-header__dropdown-link .title {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: #fff;
  font-weight: 700;
}

.site-header__dropdown-link .desc {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  opacity: 0.5;
  text-transform: none;
  line-height: 1.4;
  color: #fff;
}

.site-header__dropdown-link:hover .title {
  color: #fff;
}

.site-header__dropdown-link:hover .desc {
  opacity: 1;
}

.site-header__spacer {
  justify-self: end;
}

/* Hamburger — hidden on desktop */
.site-header__burger {
  display: none;
  justify-self: end;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 20px;
  position: relative;
  z-index: 101;
  padding: 0;
}
.site-header__burger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--tkid-chalk);
  position: absolute;
  left: 0;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
              opacity  0.25s ease;
}
.site-header__burger span:first-child { top: 4px; }
.site-header__burger span:last-child  { bottom: 4px; }

/* X when open */
.site-header__burger[aria-expanded="true"] span:first-child {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.site-header__burger[aria-expanded="true"] span:last-child {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* ——— Mobile Nav ——— */
@media (max-width: 768px) {
  .site-header {
    grid-template-columns: 1fr auto 1fr; /* Added center column */
    /* Increase top padding to push it down from the top edge */
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
  }

  .site-header__center {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .site-header__burger {
    display: block;
  }

  .site-header__nav {
    position: fixed;
    inset: 0;
    width: 100vw; /* Full screen width */
    height: 100vh; /* Full screen height */
    z-index: 100;
    background: #000; /* Pure black for full coverage */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.4s;
    overflow-y: auto;
    padding: 100px 0; /* Space for logo/burger */
  }

  .site-header__nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .site-header__nav .site-header__link {
    font-size: 1.8rem; /* Larger, more impactful */
    letter-spacing: 0.15em;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Dropdown on Mobile */
  .site-header__item {
    flex-direction: column;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .site-header__nav.is-open .site-header__item,
  .site-header__nav.is-open .site-header__link {
    opacity: 1;
    transform: translateY(0);
  }

  .site-header__dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: var(--spacing-lg);
    align-items: center;
    gap: var(--spacing-md);
    display: flex;
    flex-direction: column;
    min-width: auto;
  }

  .site-header__dropdown::before {
    display: none;
  }

  .site-header__dropdown-link {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 0;
    border: none;
    text-align: center;
  }
  
  .site-header__dropdown-link .title {
    color: #fff; /* High contrast, not red */
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 700;
  }

  .site-header__dropdown-link .desc {
    font-size: 0.75rem;
    opacity: 0.6;
  }

  .site-header__dropdown-link:hover .title {
    color: #fff;
  }

  .site-header__link--trigger {
    color: #fff !important;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
  }
  /* Red accent bar for trigger on mobile */
  .site-header__link--trigger::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--tkid-blood);
  }

  .site-header__nav.is-open .site-header__link {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger link entrance */
  .site-header__nav.is-open > *:nth-child(1) { transition-delay: 0.08s; }
  .site-header__nav.is-open > *:nth-child(2) { transition-delay: 0.16s; }
  .site-header__nav.is-open > *:nth-child(3) { transition-delay: 0.24s; }
  .site-header__nav.is-open > *:nth-child(4) { transition-delay: 0.32s; }
  .site-header__nav.is-open > *:nth-child(5) { transition-delay: 0.40s; }

  /* Hide the separator pipes on mobile */
  .site-header__nav .site-header__link + .site-header__link::before {
    display: none;
  }

  .site-header__spacer {
    display: none;
  }
}

/* ---------- Garment Grid ---------- */
.garment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  padding-block: var(--spacing-xl);
}

.garment-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.garment-card__images {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #fff;
}

.garment-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.garment-card__img--runway {
  opacity: 0;
}

.garment-card:hover .garment-card__img--main {
  opacity: 0;
}

.garment-card:hover .garment-card__img--runway {
  opacity: 1;
}

.garment-card__meta {
  padding-top: var(--spacing-sm);
}

.garment-card__name {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tkid-chalk);
}

.garment-card__price {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--tkid-chalk);
  opacity: 0.7;
}

/* ---------- Garment Detail ---------- */
.garment-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  padding-block: var(--spacing-xl);
  min-height: 100dvh;
  align-items: start;
}

@media (max-width: 768px) {
  .garment-detail {
    grid-template-columns: 1fr;
  }
}

.garment-detail__images {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.garment-detail__info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  padding-top: var(--spacing-lg);
}

.garment-detail__product-name {
  font-family: var(--font-body);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tkid-chalk);
}

.garment-detail__price {
  font-size: 1rem;
  color: var(--tkid-chalk);
  opacity: 0.7;
}

.garment-detail__section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--tkid-chalk);
  opacity: 0.7;
  margin-bottom: var(--spacing-xs);
  border-bottom: 1px solid var(--tkid-blood);
  display: inline-block;
  padding-bottom: var(--spacing-xs);
}

.garment-detail__text {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---------- Homepage ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  text-align: center;
  gap: var(--spacing-lg);
}

.hero__3d-container {
  width: min(90vw, 600px);
  aspect-ratio: 1;
}

.hero__statement {
  max-width: 600px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
