/* =========================================================
   Mebesius · Apple — Holiday
   Apple-inspired clean redesign (v2)
   ========================================================= */

:root {
  --ink: #565656;
  --ink-soft: #424245;
  --mute: #6e6e73;
  --line: #d2d2d7;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --accent: #0071e3;

  --max: 1440px;
  --col: 700px;
  --col-wide: 980px;
  --gutter: clamp(20px, 4vw, 60px);

  --f-sans: "General Sans", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

/* =========================================================
   TOP BAR
   ========================================================= */
.bar {
  position: sticky; top: 0; z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px var(--gutter);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 14px;
  letter-spacing: -0.01em;
}
.bar__back {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-soft);
  transition: color 200ms var(--ease);
}
.bar__back:hover { color: var(--ink); }
.bar__back-icon { font-size: 16px; transition: transform 200ms var(--ease); }
.bar__back:hover .bar__back-icon { transform: translateX(-3px); }

.bar__crumb {
  justify-self: center;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* =========================================================
   HERO — full-bleed black with white Apple logo
   ========================================================= */
.hero {
  background: #000;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 0;
}
.hero__logo {
  width: 800px;
  max-width: 100%;
  display: block;
}
.hero__logo img {
  width: 100%;
  display: block;
}

/* Full-bleed feature image (sits between logo hero and intro essay) */
.hero-image {
  background: #000;
  margin: 0;
  padding: 0;
  display: block;
}
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Stacked full-bleed images — no gap between, 50px black padding top/bottom */
.full-stack {
  margin: 0;
  padding: 50px 0;
  display: block;
  background: #000;
}
.full-stack img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 0;
}
.hero__title {
  margin: 0;
  font-size: clamp(56px, 9vw, 120px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--ink);
}
.hero__title-divider {
  font-weight: 200;
  color: var(--mute);
  margin: 0 0.05em;
}
.hero__category {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 400;
  color: var(--mute);
  letter-spacing: 0.01em;
}

/* =========================================================
   ESSAY (intro + closing)
   ========================================================= */
.essay {
  max-width: none;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 100px) var(--gutter);
}
.essay__inner {
  max-width: 900px;
  margin: 0 auto;
}
.essay--dark {
  max-width: none;
  background: #000;
  color: #fff;
  margin: 0;
  padding: 0 var(--gutter) clamp(80px, 14vh, 160px);
}
.essay--dark .essay__inner {
  max-width: 900px;
  margin: 0 auto;
}
.essay--dark p,
.essay--dark .essay__lead {
  color: #fff !important;
}
.essay--dark p {
  color: rgba(255,255,255,0.78);
}
.essay p {
  margin: 0 0 1em;
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1.3;
  color: var(--ink-soft);
  font-weight: 300;
  letter-spacing: 0.005em;
}
.essay__lead {
  font-size: clamp(38px, 4vw, 56px) !important;
  line-height: 1.15 !important;
  color: var(--ink) !important;
  font-weight: 300 !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 0.9em !important;
}
.essay--close {
  padding-top: clamp(40px, 7vh, 80px);
  padding-bottom: clamp(80px, 14vh, 160px);
  margin-top: clamp(20px, 3vh, 40px);
}
.essay--close p {
  color: var(--ink) !important;
}
.essay--close .essay__lead {
  color: var(--ink) !important;
}
.essay__signoff {
  font-size: clamp(36px, 3.6vw, 52px) !important;
  font-weight: 300 !important;
  color: var(--ink) !important;
  margin-top: 1.4em !important;
  letter-spacing: -0.005em !important;
  line-height: 1.1 !important;
}

/* =========================================================
   SECTION
   ========================================================= */
.section {
  padding: 0;
}
.section--flush-top {
  padding-top: 0;
  padding-bottom: 100px;
}
.section--flush-top .section__body-wrap {
  margin-top: 0;
}
.section--break {
  padding: clamp(80px, 14vh, 160px) 0 clamp(40px, 6vh, 80px);
  background: var(--bg-soft);
  margin: clamp(40px, 6vh, 80px) 0 clamp(40px, 6vh, 80px);
}

.section__header {
  max-width: var(--col-wide);
  margin: 0 auto 100px;
  padding: 50px var(--gutter) 0;
}
.section__header--centered {
  text-align: center;
}

.section__eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

.section__title {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
}
.section__title--xl {
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.04em;
  font-weight: 600;
}

.section__body {
  margin: 18px 0 0;
  max-width: 900px;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 300;
  letter-spacing: 0.014em;
}
.section__header--centered .section__body {
  margin-left: auto; margin-right: auto;
}

.section__body-wrap {
  max-width: 900px;
  margin: clamp(28px, 4vh, 48px) auto 0;
  padding: 0 var(--gutter);
}
.section__body-wrap .section__body {
  margin-top: 0;
  text-align: center;
  max-width: none;
}

/* =========================================================
   CAPTION (per deliverable label + description)
   ========================================================= */
.caption {
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 40px var(--gutter) 100px;
}
.caption__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.caption__text {
  margin: 0;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 900px;
  font-weight: 300;
  letter-spacing: 0.014em;
}

/* =========================================================
   FIGURE
   ========================================================= */
.figure {
  margin: 0;
  position: relative;
}
.figure img {
  width: 100%; height: auto;
  display: block;
  border-radius: 0;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
.figure img.is-loaded { opacity: 1; }

.figure--bleed {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.figure--bleed img {
  border-radius: 14px;
  background: var(--bg-soft);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

/* Full viewport-width image — no gutter, no radius */
.figure--full {
  max-width: none;
  margin: 0;
  padding: 0;
}
.figure--full img {
  width: 100%;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.figure--tight {
  margin-top: clamp(12px, 1.5vh, 20px);
}

/* =========================================================
   MORE SELECTED PROJECTS
   ========================================================= */
.more-projects {
  padding: clamp(60px, 10vh, 120px) var(--gutter);
  max-width: none;
  margin: 0;
  background: #FAFAF9;
  font-family: var(--f-sans);
}
.more-projects__header {
  text-align: center;
  margin-bottom: clamp(40px, 6vh, 80px);
}
.more-projects__title {
  margin: 0;
  font-family: var(--f-sans);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.more-projects__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(32px, 4vw, 56px) clamp(16px, 2vw, 28px);
}
.project-card { margin: 0; }
.project-card__link {
  display: block;
  color: inherit;
  transition: opacity 240ms var(--ease);
}
.project-card__link:hover { opacity: 0.92; }
.project-card__thumb {
  margin: 0 0 16px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #ECECE8;
}
.project-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease);
}
.project-card__link:hover .project-card__thumb img {
  transform: scale(1.04);
}
.project-card__meta { text-align: center; }
.project-card__title {
  margin: 0 0 4px;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  line-height: 1.3;
}
.project-card__cat {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--mute);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

@media (max-width: 1200px) {
  .more-projects__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .more-projects__grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 32px var(--gutter);
  text-align: center;
  font-size: 12px;
  color: var(--mute);
  border-top: 1px solid var(--line);
  margin-top: 0;
  letter-spacing: 0.01em;
}

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.section, .essay, .hero {
  opacity: 1;
}
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 700px) {
  .bar { grid-template-columns: auto 1fr; gap: 12px; }
  .bar__crumb { justify-self: start; }
  .bar__spacer { display: none; }

  .hero { padding-top: 60px; gap: 20px; }
  .hero__logo { width: 48px; }

  .figure--bleed img { border-radius: 8px; }

  .section--break {
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    padding-left: 0;
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .figure img { opacity: 1; }
  [data-reveal] { opacity: 1; transform: none; }
}
