/* ============================================================
   WINTHER WONDERLAND — wintherwonderland.com
   Stylesheet · Vol. 02 · Editorial / Cinematic
   Black, white, touches of grey. Blue used once.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Inter+Tight:wght@200;300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Palette */
  --ink:        #111418;
  --ink-soft:   #1A1F26;
  --paper:      #EDEDE8;
  --snow:       #F7F7F4;
  --bone:       #E4E2DC;

  /* Greys */
  --slate:      #5C6670;
  --mist:       #A6B0B8;
  --fog:        #CFD5DA;
  --pearl:      #DCDBD5;

  /* Single blue — used once, hover accent only */
  --atlas:      #1F4A5C;

  /* Lines */
  --line:       rgba(17,20,24,0.10);
  --line-mid:   rgba(17,20,24,0.18);
  --line-strong: rgba(17,20,24,0.45);

  /* Type */
  --display:    'Inter Tight', system-ui, -apple-system, sans-serif;
  --body:       'Inter', system-ui, -apple-system, sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --side:       64px;
  --max:        1600px;

  /* Motion */
  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "cv11", "tnum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }

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

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

@media (max-width: 768px) {
  :root { --side: 24px; }
}

.mono   { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.micro  { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); }

.frame {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--side);
}

/* ============================================================
   HEADER — fixed, blurred backdrop
   ============================================================ */

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(237, 237, 232, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), padding 0.3s var(--ease);
}

.site-head.is-scrolled {
  padding: 14px 0;
  border-bottom-color: var(--line);
}

.site-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: auto;
}

.brand-mark svg { display: block; width: 100%; height: auto; }
.brand-mark svg polygon { fill: var(--ink); }

.brand-word {
  font-family: var(--display);
  font-weight: 300;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1;
  transform: translateY(2px);
}

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

.nav a {
  font-family: var(--display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.3s var(--ease);
}

.nav a:hover::after,
.nav a.is-active::after { width: 100%; }

@media (max-width: 600px) {
  .brand-word { display: none; }
  .nav { gap: 18px; }
  .nav a { font-size: 13px; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(8px);
  animation: fadeRise 0.8s var(--ease-out) 0.2s forwards;
}

.hero-tagline {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(64px, 12vw, 200px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin: 48px 0 64px;
}

.hero-tagline .word {
  display: inline-block;
  vertical-align: top;
  opacity: 0;
  transform: translateY(40px);
  animation: wordRise 0.9s var(--ease-out) forwards;
}

.hero-tagline .word span {
  display: inline-block;
}

.hero-tagline .word:nth-child(1) { animation-delay: 0.30s; }
.hero-tagline .word:nth-child(2) { animation-delay: 0.42s; }
.hero-tagline .word:nth-child(3) { animation-delay: 0.54s; }

@keyframes wordRise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rise { to { transform: translateY(0); } }
@keyframes fadeRise { to { opacity: 1; transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }

.hero-lede {
  max-width: 56ch;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fade 1.2s var(--ease-out) 1.1s forwards;
}

.hero-lede em {
  font-style: normal;
  color: var(--slate);
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 80px;
  opacity: 0;
  animation: fade 1s var(--ease-out) 1.4s forwards;
}

.hero-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 40px;
  height: 1px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--paper);
  animation: scrollWipe 2.4s var(--ease) 1.6s infinite;
}

@keyframes scrollWipe {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

@media (max-width: 768px) {
  .hero { padding: 120px 0 56px; min-height: auto; }
  .hero-tagline { margin: 32px 0 40px; }
  .hero-foot { margin-top: 48px; }
}

/* ============================================================
   SECTION
   ============================================================ */

.section {
  padding: 120px 0 80px;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: baseline;
  padding-bottom: 56px;
  margin-bottom: 64px;
  border-bottom: 1px solid var(--ink);
}

.section-head .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.section-head .deck {
  font-family: var(--display);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  max-width: 52ch;
  color: var(--slate);
  margin-top: 16px;
}

@media (max-width: 768px) {
  .section { padding: 80px 0 56px; }
  .section-head { grid-template-columns: 1fr; gap: 24px; padding-bottom: 32px; margin-bottom: 32px; }
}

/* ============================================================
   WHAT WE DO
   ============================================================ */

.what {
  border-top: 1px solid var(--line);
}

.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.what-col {
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}

.what-col-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 20px;
}

.what-col h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 32px;
  max-width: 14ch;
}

.what-col-list { list-style: none; }

.what-col-list li {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--slate);
}

.what-col-list li:last-child { border-bottom: 1px solid var(--line); }

@media (max-width: 768px) {
  .what-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ============================================================
   FEATURED WORK
   ============================================================ */

.featured-list { display: flex; flex-direction: column; gap: 0; }

.feat {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
  align-items: center;
  position: relative;
  transition: padding-left 0.5s var(--ease);
}

.feat:last-child { border-bottom: 1px solid var(--line); }

.feat:hover { padding-left: 16px; }

.feat-info { display: flex; flex-direction: column; gap: 20px; }

.feat-meta {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.feat-num { color: var(--ink); }
.feat-dot { color: var(--mist); }

.feat-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.03em;
}

.feat-desc {
  font-family: var(--display);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--slate);
  max-width: 42ch;
  margin-top: 8px;
}

.feat-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.feat-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--line-mid);
  color: var(--slate);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.feat:hover .feat-tag {
  border-color: var(--ink);
  color: var(--ink);
}

/* Media */
.feat-media {
  aspect-ratio: 4 / 3;
  background: var(--bone);
  position: relative;
  overflow: hidden;
}

.feat-media-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.8s var(--ease);
}

.feat:hover .feat-media-inner { transform: scale(1.04); }

.feat-media img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder system */
.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  overflow: hidden;
}

.placeholder-top, .placeholder-bot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.placeholder-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.placeholder-label.muted { color: var(--slate); }

.placeholder-graphic {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.placeholder-graphic svg {
  width: 55%;
  height: auto;
  opacity: 0.14;
}

.placeholder-graphic svg polygon { fill: var(--ink); }

/* Variants */
.placeholder--bone  { background: var(--bone); }
.placeholder--snow  { background: var(--snow); }
.placeholder--pearl { background: var(--pearl); }
.placeholder--fog   { background: var(--fog); }

.placeholder--ink   { background: var(--ink); }
.placeholder--ink .placeholder-label { color: var(--paper); }
.placeholder--ink .placeholder-label.muted { color: var(--mist); }
.placeholder--ink .placeholder-graphic svg polygon { fill: var(--paper); }
.placeholder--ink .placeholder-bigtype { color: var(--paper); }

.placeholder-bigtype {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(36px, 6.5vw, 78px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-align: left;
  max-width: 14ch;
  position: relative;
  z-index: 2;
  margin: auto 0;
}

.placeholder--type .placeholder-graphic { display: none; }
.placeholder--type { justify-content: space-between; }

/* Alternating layout */
.feat:nth-child(even) {
  grid-template-columns: 7fr 5fr;
}
.feat:nth-child(even) .feat-media { grid-column: 1; grid-row: 1; }
.feat:nth-child(even) .feat-info  { grid-column: 2; grid-row: 1; }

@media (max-width: 900px) {
  .feat,
  .feat:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0;
  }
  .feat:nth-child(even) .feat-media,
  .feat:nth-child(even) .feat-info {
    grid-column: auto;
    grid-row: auto;
  }
  .feat:hover { padding-left: 0; }
  .feat-title { font-size: clamp(28px, 6vw, 40px); }
}

/* ============================================================
   CATALOGUE INDEX
   ============================================================ */

.cat-list {
}

.cat-item {
  display: grid;
  grid-template-columns: 70px 3fr 2fr 1fr 80px;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding-left 0.3s var(--ease);
}

.cat-item:hover { padding-left: 12px; }

.cat-item:hover .cat-title { color: var(--atlas); }

.cat-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
}

.cat-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}

.cat-client {
  font-family: var(--body);
  font-size: 14px;
  color: var(--slate);
}

.cat-disc {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--slate);
}

.cat-year {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--slate);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cat-group {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 40px 0 14px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 2px;
}

.cat-group:first-child { padding-top: 0; }

@media (max-width: 900px) {
  .cat-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 18px 0;
  }
  .cat-item:hover { padding-left: 0; }
  .cat-disc, .cat-year { text-align: left; }
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* Mark draw */
@keyframes drawIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brand-mark svg polygon {
  opacity: 0;
  transform: translateY(20px);
  animation: drawIn 0.6s var(--ease-out) forwards;
}

.brand-mark svg polygon:nth-child(1) { animation-delay: 0.05s; }
.brand-mark svg polygon:nth-child(2) { animation-delay: 0.10s; }
.brand-mark svg polygon:nth-child(3) { animation-delay: 0.15s; }
.brand-mark svg polygon:nth-child(4) { animation-delay: 0.20s; }
.brand-mark svg polygon:nth-child(5) { animation-delay: 0.25s; }
.brand-mark svg polygon:nth-child(6) { animation-delay: 0.30s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-tagline .word span { transform: none; }
  .hero-lede, .hero-meta, .hero-foot { opacity: 1; }
  .brand-mark svg polygon { opacity: 1; transform: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-foot {
  margin-top: 120px;
  padding: 56px 0 28px;
  border-top: 1px solid var(--ink);
}

.site-foot-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  padding-bottom: 64px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.site-foot-cta {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 16ch;
}

.site-foot-cta a {
  border-bottom: 1px solid var(--ink);
  transition: opacity 0.3s var(--ease);
}

.site-foot-cta a:hover { opacity: 0.55; }

.site-foot-bot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.site-foot-bot .mono { color: var(--slate); }

@media (max-width: 768px) {
  .site-foot { margin-top: 80px; padding-top: 40px; }
  .site-foot-top { grid-template-columns: 1fr; gap: 24px; padding-bottom: 40px; }
}
