/* ==========================================================================
   the last price. — Base Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */

:root {
  /* Colors */
  --clr-black:       #000000;
  --clr-white:       #FFFFFF;
  --clr-off-white:   #F7F7F5;
  --clr-grey:        #6E6E6E;
  --clr-border:      #E5E5E5;
  --clr-dark-grey:   #2A2A2A;

  /* Typography */
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Type Scale */
  --text-display:   clamp(3.5rem, 9vw, 9rem);
  --text-hero:      clamp(2.5rem, 6vw, 6rem);
  --text-headline:  clamp(2rem, 4vw, 4rem);
  --text-subhead:   clamp(1.25rem, 2.5vw, 2rem);
  --text-body-lg:   1.125rem;
  --text-body:      1rem;
  --text-small:     0.875rem;
  --text-label:     0.6875rem;   /* 11px — uppercase labels */

  /* Spacing */
  --sp-1:   0.5rem;
  --sp-2:   1rem;
  --sp-3:   1.5rem;
  --sp-4:   2rem;
  --sp-6:   3rem;
  --sp-8:   4rem;
  --sp-12:  6rem;
  --sp-16:  8rem;
  --sp-24: 12rem;

  /* Layout */
  --max-w:      1440px;
  --content-w:  1200px;
  --narrow-w:    800px;
  --side-pad:    clamp(1.5rem, 5vw, 5rem);

  /* Borders */
  --border:        1px solid var(--clr-border);
  --border-black:  1px solid var(--clr-black);
  --border-white:  1px solid rgba(255,255,255,0.2);

  /* Motion */
  --ease-fast:  150ms ease;
  --ease-base:  250ms ease;
  --ease-slow:  450ms ease;

  /* Nav height */
  --nav-h: 4.5rem;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

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

body {
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--clr-black);
  background: var(--clr-white);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.t-display {
  font-size: var(--text-display);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.t-hero {
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.t-headline {
  font-size: var(--text-headline);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}

.t-subhead {
  font-size: var(--text-subhead);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.t-body-lg {
  font-size: var(--text-body-lg);
  line-height: 1.65;
}

.t-body {
  font-size: var(--text-body);
  line-height: 1.65;
}

.t-small {
  font-size: var(--text-small);
  line-height: 1.5;
}

/* Uppercase label — use for section IDs, categories, status */
.t-label {
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}

.t-light   { font-weight: 300; }
.t-regular { font-weight: 400; }
.t-medium  { font-weight: 500; }

.t-grey { color: var(--clr-grey); }
.t-white { color: var(--clr-white); }

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: var(--side-pad);
}

.container--wide {
  max-width: var(--max-w);
}

.container--narrow {
  max-width: var(--narrow-w);
}

/* Section spacing */
.section {
  padding-block: var(--sp-16);
}

.section--sm {
  padding-block: var(--sp-8);
}

.section--lg {
  padding-block: var(--sp-24);
}

/* Section label row */
.section-label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-bottom: var(--sp-8);
  border-bottom: var(--border);
  margin-bottom: var(--sp-8);
}

.section-label__number {
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--clr-grey);
}

/* Grid systems */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Flex utilities */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-8 { gap: var(--sp-8); }

/* Dividers */
.divider {
  width: 100%;
  height: 1px;
  background: var(--clr-border);
  border: none;
}

.divider--black { background: var(--clr-black); }

/* --------------------------------------------------------------------------
   Background Utilities
   -------------------------------------------------------------------------- */

.bg-black     { background-color: var(--clr-black); color: var(--clr-white); }
.bg-white     { background-color: var(--clr-white); color: var(--clr-black); }
.bg-off-white { background-color: var(--clr-off-white); color: var(--clr-black); }

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--clr-black);
  outline-offset: 3px;
}

.bg-black :focus-visible {
  outline-color: var(--clr-white);
}

/* --------------------------------------------------------------------------
   Image / Media
   -------------------------------------------------------------------------- */

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

.aspect-square    { aspect-ratio: 1; }
.aspect-portrait  { aspect-ratio: 3 / 4; }
.aspect-landscape { aspect-ratio: 16 / 9; }
.aspect-cinema    { aspect-ratio: 21 / 9; }

/* --------------------------------------------------------------------------
   Scroll & Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--ease-slow), transform var(--ease-slow);
  }

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

  .fade-in-delay-1 { transition-delay: 100ms; }
  .fade-in-delay-2 { transition-delay: 200ms; }
  .fade-in-delay-3 { transition-delay: 300ms; }
  .fade-in-delay-4 { transition-delay: 400ms; }
}

/* --------------------------------------------------------------------------
   Status Badges
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border: 1px solid currentColor;
}

.badge--active    { color: var(--clr-black); border-color: var(--clr-black); }
.badge--rejected  { color: var(--clr-grey); border-color: var(--clr-border); }
.badge--watching  { color: var(--clr-black); border-color: var(--clr-black); }
.badge--private   { color: var(--clr-black); border-color: var(--clr-black); }

.badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Thin Line / Separator Utility
   -------------------------------------------------------------------------- */

.line-above { border-top: var(--border); padding-top: var(--sp-3); }
.line-below { border-bottom: var(--border); padding-bottom: var(--sp-3); }
