/* ============================================
   Tokens
   ============================================ */
:root {
  --font-body: "Supreme", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Recia", "Source Serif 4", "Georgia", "Times New Roman", serif;

  --color-bg: #F2F1EE;
  --color-surface: #d9d9d9;
  --color-surface-soft: #f2f2f2;
  --color-text: #0D212C;
  --color-text-muted: #6b6b6b;
  --color-link: #0D212C;
  --color-link-hover: #0D212C;
  --color-dark: #0D212C;

  --fs-h1: 48px;
  --fs-h2: 44px;
  --fs-h3: 32px;
  --fs-h4: 28px;
  --fs-h5: 20px;
  --fs-body: 16px;
  --fs-caption: 14px;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --pad-x: clamp(1rem, 3vw, 4rem);
  --header-h: 92px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-in {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--anim-delay, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .anim-in { animation: none; }
}

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

a {
  color: var(--color-link);
  text-decoration: none;
  display: inline-block;
  transition: color 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
a:hover { color: #4169e1; transform: scale(1.05); text-decoration: none; }
.work-item { pointer-events: none; }
.work-item__text,
.work-item__image { pointer-events: all; }

.work-item__text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-radius: 8px 0 0 8px;
  background: #0D212C;
  padding: var(--space-8);
  color: #F2F1EE;
  box-shadow: inset 3px 0 0 transparent;
  transition: box-shadow 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.work-item__type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a6670;
  margin-top: var(--space-4);
}
.work-item__text .work-item__number,
.work-item__text .work-item__title { color: #F2F1EE; }
.work-item__text:hover { transform: none !important; box-shadow: inset 3px 0 0 #4169e1; }
.work-item__text:hover .work-item__number,
.work-item__text:hover .work-item__title { color: #F2F1EE; }
.work-item__text:hover .work-item__summary { color: #8a9fa8; }

.work-item__image {
  transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.work-item__image:not(.work-item__image--postcard):hover { transform: scale(1.005); opacity: 0.75; }
.link-arrow:hover { text-decoration: none; }

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

[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus { left: 1rem; top: 1rem; background: #0D212C; color: #fff; padding: .5rem 1rem; }

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* ============================================
   Key Strength section
   ============================================ */
.key-strength { padding-top: var(--space-24); }

.ks-top {
  margin-bottom: var(--space-16);
}
.ks-heading {
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}
.ks-lede {
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  max-width: 52ch;
}

.ks-layout {
  display: grid;
  grid-template-columns: 1fr 480px 1fr;
  gap: var(--space-12);
  align-items: start;
}

.ks-left,
.ks-right {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ks-text {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
  font-size: var(--fs-caption);
  line-height: 1.6;
}
.ks-text:first-child { border-top: 1px solid var(--color-border, #e0e0e0); }

.ks-circles {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.ks-circles svg {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .ks-layout { grid-template-columns: 1fr; }
  .ks-circles { height: 500px; margin: 0 auto; width: 460px; }
}

.label {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: none;
  margin-bottom: 0.25rem;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--pad-x);
  background: rgba(242,241,238,0.9);
  backdrop-filter: saturate(180%) blur(8px);
}
.logo-block {
  display: block;
  height: 36px;
}
.logo-img {
  height: 100%;
  width: auto;
  display: block;
}
body[data-page="detail"] .logo-block {
  background: none;
}
.nav {
  display: flex;
  gap: var(--space-12);
}
.nav a {
  font-size: var(--fs-body);
  font-weight: 400;
}
body[data-page="about"] .nav a { font-size: var(--fs-body); }
.nav a.is-active { font-weight: 700; }

/* ============================================
   Views
   ============================================ */
.view {
  padding: var(--space-24) var(--pad-x);
}
.view--work {
  padding: 0;
}
body[data-page="work"] .site-footer { display: none; }

/* ============================================
   About / Hero
   ============================================ */
body[data-page="about"] {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body[data-page="about"] #main { flex: 1; min-height: 0; }

.view--about {
  padding-top: clamp(2rem, 6vh, 5rem);
  padding-bottom: 0;
  max-width: 1520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.view--about .hero-title { margin-bottom: clamp(1rem, 3vh, 2.5rem); }
.view--about .hero-lede { margin-bottom: clamp(1.5rem, 4vh, 3rem); }
.hero-title {
  font-family: var(--font-body);
  font-size: clamp(29px, 3.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.18;
  max-width: 1200px;
  margin-bottom: clamp(2rem, 3vw, 3rem);
}
.hero-title .serif-italic {
  font-weight: 400;
  font-size: 1em;
}

.hero-lede {
  font-size: clamp(14px, 1.3vw, 19px);
  line-height: 1.5;
  color: var(--color-text);
  max-width: 800px;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-links {
  display: flex;
  gap: clamp(3rem, 8vw, 13rem);
  flex-wrap: wrap;
}
.hero-links__col {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 200px;
}
.hero-links .label {
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  font-size: var(--fs-body);
  color: var(--color-text);
  text-decoration: none;
  line-height: 1;
  padding: 4px 0;
}
.link-arrow__icon {
  transition: transform 0.25s ease;
}
.link-arrow:hover .link-arrow__icon {
  transform: rotate(45deg);
}
.link-arrow__icon {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 28px;
  height: 28px;
  font-size: 22px;
}

/* ============================================
   Big section heading (Work / Playground)
   ============================================ */
.big-heading {
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: var(--space-8);
}
.big-heading .serif-italic { font-weight: 400; }

/* ============================================
   Work index — two columns
   ============================================ */
.work-layout {
  display: block;
}
.work-intro {
  position: fixed;
  top: var(--header-h);
  left: var(--pad-x);
  width: 370px;
  padding-top: var(--space-24);
}
.work-intro p { margin-bottom: var(--space-4); max-width: 38ch; }
.work-intro .bullets {
  margin: 0 0 var(--space-6);
  padding-left: 0;
}
.work-intro .bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.25rem;
}
.work-intro .bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-left: calc(370px + var(--pad-x) + var(--space-16));
  padding: var(--space-24) var(--pad-x) 0 var(--space-16);
}
.work-item {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 0;
  align-items: stretch;
  cursor: pointer;
  text-align: left;
  width: 100%;
  padding: 4px 0;
}
.work-item:first-child { padding-top: 0; }
.work-item:hover .work-item__image--postcard { background: #0D212C; transform: none !important; }
.work-item__image--postcard .postcard { transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1); }
.work-item__image--postcard:hover .postcard { transform: scale(1.005); }
.work-item__number {
  font-size: var(--fs-h3);
  display: block;
  margin-bottom: var(--space-2);
}
.work-item__title {
  font-size: var(--fs-h4);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.work-item__image {
  background: var(--color-surface);
  width: 100%;
  aspect-ratio: 4 / 3;
  transition: background 0.15s ease;
  margin-right: calc(-1 * var(--pad-x));
}
.work-item__image--postcard {
  background: #0D212C;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
}
.postcard {
  width: 72%;
  display: flex;
  flex-direction: column;
  border: 6px solid #F2F1EE;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.postcard__img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ============================================
   Playground — heading + 3-col grid
   ============================================ */
.playground-header {
  max-width: 720px;
  margin-bottom: var(--space-16);
}
.playground-header p {
  color: var(--color-text);
  max-width: 48ch;
}
.playground-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12) var(--space-8);
}
.play-item {
  text-align: left;
  cursor: pointer;
  width: 100%;
  background: none;
  border: 0;
}
.play-item__number {
  font-size: 22px;
  display: inline-block;
  margin-bottom: var(--space-2);
  transition: color 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.play-item__title {
  font-size: var(--fs-h5);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
  line-height: 1.25;
  display: inline-block;
  transition: color 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.play-item:hover .play-item__title,
.play-item:hover .play-item__number { transform: scale(1.02); color: #4169e1; }
.play-item__image {
  background: #141414;
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: 8px;
}
.browser-mockup {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.play-item:hover .browser-mockup {
  transform: scale(1.04);
}
.browser-chrome {
  background: #2a2a2a;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.browser-dot:nth-child(1) { background: #FF5F57; }
.browser-dot:nth-child(2) { background: #FEBC2E; }
.browser-dot:nth-child(3) { background: #28C840; }
.browser-mockup img {
  width: 100%;
  display: block;
  border-radius: 0;
}
/* Empty canvas for items without images */
.play-item__image--empty {
  background: #1a1a1a;
}
.play-item__caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(13,33,44,0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
  color: #F2F1EE;
  font-size: var(--fs-caption);
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.play-item:hover .play-item__caption {
  opacity: 1;
}

/* ============================================
   Project detail
   ============================================ */
.view--detail { padding-top: var(--space-16); padding-left: calc(var(--pad-x) + 100px); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--fs-caption);
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-12);
}
.back-link:hover { color: var(--color-text) !important; transform: none !important; }
.detail-head {
  margin-bottom: var(--space-8);
}
.detail-number {
  font-size: var(--fs-h4);
  display: block;
  margin-bottom: var(--space-4);
}
.detail-title {
  font-size: var(--fs-h1);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 24ch;
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  max-width: 520px;
  margin: var(--space-12) 0;
}
.detail-meta p:not(.label) { font-size: var(--fs-body); }

.detail-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-16);
}
.detail-images .img-block {
  background: var(--color-surface);
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
}
.detail-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.detail-body {
  max-width: 720px;
  margin-bottom: var(--space-24);
}

/* My Role block */
.role-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  align-items: start;
}
.role-block__title {
  font-size: 24px;
  line-height: 1.5;
  margin: 0 !important;
  color: #F2F1EE !important;
}
.role-block__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.role-block__list li {
  font-size: var(--fs-body);
  line-height: 1.5;
  color: #8a9fa8;
}

/* Process workflow */
.process-workflow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
}
.process-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid #1e3a4a;
  border-radius: 4px;
}
.process-step__dot {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a9fa8;
}
.process-step__label {
  font-size: var(--fs-body);
  font-weight: 600;
  margin: 0 !important;
  color: #F2F1EE !important;
}
.process-step__body {
  font-size: var(--fs-body);
  line-height: 1.6;
  margin: 0 !important;
  color: #8a9fa8 !important;
}
.detail-body h2 {
  font-size: var(--fs-h3);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: var(--space-12) 0 var(--space-6);
}
.detail-body h5 {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 600;
  margin: var(--space-8) 0 var(--space-3);
}
.detail-body p {
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

/* ============================================
   Detail page — dark background
   ============================================ */
body[data-page="detail"] {
  background: #0D212C;
  color: #F2F1EE;
}
body[data-page="detail"] .site-header {
  background: rgba(13,33,44,0.9);
}
body[data-page="detail"] .nav a,
body[data-page="detail"] .back-link,
body[data-page="detail"] .detail-number,
body[data-page="detail"] .detail-title,
body[data-page="detail"] .detail-body p,
body[data-page="detail"] .detail-body h2,
body[data-page="detail"] .detail-body h5,
body[data-page="detail"] .label {
  color: #F2F1EE;
}
body[data-page="detail"] .label { color: #8a9fa8; }
body[data-page="detail"] .detail-meta p:not(.label) { color: #F2F1EE; }
body[data-page="detail"] a { color: #F2F1EE; }
body[data-page="detail"] a:hover { color: #7b9fe8; }
body[data-page="detail"] .img-block {
  background: #1e3a4a;
}
body[data-page="detail"] .related-card__image {
  background: #091822;
}
body[data-page="detail"] .site-footer {
  color: #4a6670;
}

/* Related strip */
.related-strip {
  background: var(--color-dark);
  color: #F2F1EE;
  padding: var(--space-16) var(--pad-x) calc(var(--space-16) + var(--space-24)) calc(var(--pad-x) + 100px);
  margin: 0 calc(-1 * var(--pad-x)) calc(-1 * var(--space-24)) calc(-1 * (var(--pad-x) + 100px));
}
body[data-page="detail"] .logo-block {
  background: none;
}
body[data-page="detail"] .logo-img {
  filter: brightness(0) invert(1);
}
body[data-page="detail"] .back-link {
  color: #4a6670;
}
body[data-page="detail"] .back-link:hover {
  color: #F2F1EE !important;
}
body[data-page="detail"] .site-footer {
  background: var(--color-dark);
  color: #4a6670;
  margin-left: calc(-1 * (var(--pad-x) + 100px));
  margin-right: calc(-1 * var(--pad-x));
  padding-left: var(--pad-x);
}
.related-title {
  font-size: var(--fs-h4);
  font-weight: 600;
  margin-bottom: var(--space-8);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.related-card {
  cursor: pointer;
  background: none;
  border: 0;
  text-align: left;
  color: #fff;
  display: block;
}
.related-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #091822;
}
.related-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.related-card:hover .related-card__photo {
  transform: scale(1.04);
}
.related-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(7, 18, 28, 0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  gap: 4px;
}
.related-card__industry {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a9fa8;
}
.related-card__title {
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.3;
  color: #F2F1EE;
  margin: 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  padding: var(--space-8) var(--pad-x);
  color: var(--color-text-muted);
  font-size: var(--fs-caption);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  :root { --fs-h1: 40px; }
  .work-layout { grid-template-columns: 1fr; gap: var(--space-12); }
  .work-item { grid-template-columns: 1fr; }
  .playground-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .detail-images { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --fs-h1: 34px; }
  .site-header { padding: var(--space-4) var(--pad-x); }
  .nav { gap: var(--space-6); }
  .playground-grid { grid-template-columns: 1fr; }
  .hero-links { grid-template-columns: 1fr; gap: var(--space-4); }
  .detail-meta { grid-template-columns: 1fr; }
}
