/* ---------------------------------------------------------------------------
   Mickey Hashim — portfolio home
   Implementation of Home.dc.html from the Claude Design project.
--------------------------------------------------------------------------- */

:root {
  --paper:        oklch(0.98 0.006 80);
  --paper-bright: oklch(0.98 0.004 80);
  --ink:          oklch(0.2 0.01 80);
  --ink-2:        oklch(0.3 0.01 80);
  --ink-3:        oklch(0.35 0.01 80);
  --ink-muted:    oklch(0.5 0.01 80);
  --rule:         oklch(0.85 0.01 80);
  --rule-strong:  oklch(0.8 0.01 80);
  /* 0.53 rather than the design's 0.55: at 0.55 this green measures 4.31:1 on
     --paper, just under the 4.5:1 WCAG AA minimum, and it carries every link,
     label and CTA on the site. 0.53 measures 4.68:1. */
  --green:        oklch(0.53 0.14 145);
  --green-dark:   oklch(0.45 0.14 145);
  --green-bright: oklch(0.72 0.16 145);

  --mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Instrument Serif', 'Times New Roman', Times, serif;
  --times: 'Times New Roman', Times, serif;
  --black: 'Arial Black', 'Helvetica Neue', Arial, sans-serif;

  --gutter: 56px;
  --shell:  1400px;
  --shell-narrow: 1200px;
  --gap:    40px;   /* carousel gap; mirrored in main.js */
}

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

html {
  scroll-behavior: smooth;
  /* The reveal animations slide content in from off-canvas; clip rather than
     scroll so they never widen the document. `clip` (not `hidden`) keeps the
     sticky nav working. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  text-transform: lowercase;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  font-size: 13px;
}
.skip-link:focus { left: 0; color: var(--paper); }

.accent    { color: var(--green); font-style: inherit; }
.highlight { background: var(--green); color: var(--paper-bright); padding: 0 0.15em; }

.section-label {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--green);
  margin: 0;
}

.button {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--paper);
  background: var(--ink);
  padding: 16px 28px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.button:hover { transform: scale(1.06); color: var(--paper); }
.button--block { width: 100%; padding: 14px 24px; margin-top: 6px; }

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  font-size: 11px;
  letter-spacing: 0.05em;
  border: 1px solid var(--rule-strong);
  border-radius: 100px;
  padding: 6px 14px;
}

.tag-list--sm li { padding: 5px 12px; }

/* --- nav ----------------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
}

.nav__mark { font-size: 15px; font-weight: 600; letter-spacing: 0.08em; }

.nav__links { display: flex; gap: 32px; font-size: 13px; letter-spacing: 0.05em; }

.nav__links a {
  color: inherit;
  display: inline-block;
  transition: transform 0.25s ease;
}
.nav__links a:hover { color: inherit; transform: scale(1.1); }

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  width: 100%;
  height: 92vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  /* The poster doubles as the fallback: it shows before the video decodes, and
     is all that shows under prefers-reduced-motion. */
  background: oklch(0.3 0.06 145) url('uploads/hero-poster.jpg') center 35% / cover no-repeat;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
  pointer-events: none;
}

/* The design's two overlay layers, lifted above the footage. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(8,8,8,0.15) 0%, rgba(8,8,8,0.6) 65%, rgba(8,8,8,0.9) 100%),
    linear-gradient(oklch(0.5 0.14 145 / 0.22), oklch(0.5 0.14 145 / 0.22));
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--shell);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.hero__line,
.hero__word {
  font-family: var(--black);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.9;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero__line {
  font-size: clamp(34px, 5vw, 56px);
  color: var(--paper-bright);
}

.hero__word {
  font-size: clamp(56px, 9.1vw, 134px);
  color: var(--green-bright);
  transform: scaleY(1.6);
  transform-origin: left;
  display: flex;
}

.hero__word span {
  display: inline-block;
  transition: transform 0.15s ease;
}
.hero__word span:hover { transform: scale(1.25); }

.cool-word {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  text-transform: none;
  color: var(--green-bright);
  font-size: 1.18em;
  display: inline-block;
}

@keyframes coolShake {
  0%   { transform: scale(1)   rotate(0deg); }
  20%  { transform: scale(1.3) rotate(-8deg); }
  40%  { transform: scale(1.3) rotate(8deg); }
  60%  { transform: scale(1.3) rotate(-6deg); }
  80%  { transform: scale(1.3) rotate(6deg); }
  100% { transform: scale(1)   rotate(0deg); }
}
.cool-word:hover { animation: coolShake 0.5s ease; }

/* --- reveal on scroll ---------------------------------------------------- */

.reveal {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal--from-right { transform: translateX(80px); }
.reveal--from-left  { transform: translateX(-80px); }
.reveal.is-visible  { opacity: 1; transform: translateX(0); }

/* --- about --------------------------------------------------------------- */

.about {
  padding: 80px var(--gutter) 140px;
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
}

.about__greeting {
  font-family: var(--times);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.4;
  max-width: 820px;
  margin: 0 0 28px;
}

.about__body {
  font-family: var(--times);
  font-size: 24px;
  line-height: 1.8;
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--ink-2);
}

.about__closer {
  font-family: var(--times);
  font-size: 28px;
  line-height: 1.8;
  max-width: 720px;
  margin: 48px 0 0;
  color: var(--ink-2);
}

/* --- work / carousel ----------------------------------------------------- */

.work {
  padding: 0 var(--gutter) 40px;
  max-width: var(--shell);
  margin: 0 auto;
  scroll-margin-top: 100px;
}

.work__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 20px;
}

.carousel { position: relative; }
.carousel__viewport { overflow: hidden; }

.carousel__track {
  display: flex;
  gap: var(--gap);
  cursor: grab;
  touch-action: pan-y;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.carousel__track.is-dragging { cursor: grabbing; }
.carousel__track.no-transition { transition: none; }

.card { flex: 0 0 calc(50% - (var(--gap) / 2)); }

.card__media { display: block; overflow: hidden; }
.card__media .image-slot { aspect-ratio: 16 / 9; max-height: 260px; }

.card__location {
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.card__title-link { color: inherit; }
.card__title-link:hover { color: inherit; }

.card__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  margin: 8px 0 10px;
}

.card__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 480px;
  margin: 0 0 16px;
}

.card__tags { margin-bottom: 16px; }

.card__cta {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--green);
  display: inline-block;
  transition: transform 0.25s ease;
}
.card__cta:hover { transform: scale(1.1); }

.carousel__arrow {
  position: absolute;
  /* --arrow-top is the measured half-height of a card's image (set in main.js)
     so the arrows stay centred on the artwork at every breakpoint. */
  top: var(--arrow-top, 33%);
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: inherit;
  font-family: inherit;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.carousel__arrow--prev { left: -24px; }
.carousel__arrow--next { right: -24px; }
.carousel__arrow:hover { border-color: var(--green); color: var(--green); }

.carousel__dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 40px;
}

.carousel__dots button {
  width: 8px;
  height: 8px;
  border-radius: 100px;
  border: none;
  background: var(--rule);
  cursor: pointer;
  padding: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.carousel__dots button[aria-selected="true"] {
  width: 28px;
  background: var(--green);
}

/* --- vault --------------------------------------------------------------- */

.vault {
  padding: 140px var(--gutter);
  max-width: var(--shell);
  margin: 100px auto 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 100px;
}

.vault__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

.vault__label { display: block; margin-bottom: 20px; }

.vault__heading {
  font-family: var(--times);
  font-weight: 400;
  font-size: 36px;
  margin: 0 0 24px;
}

.vault__body,
.vault__list {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-3);
  max-width: 520px;
  margin: 0 0 24px;
}
.vault__list { padding-left: 20px; }

.vault__note {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 520px;
  margin: 0 0 32px;
}

.vault__shots { display: flex; flex-direction: column; gap: 24px; }

.shot { position: relative; margin: 0; }
.vault__shots .image-slot { aspect-ratio: 16 / 10; }

.shot__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent 60%);
  color: var(--paper-bright);
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.shot:hover .shot__caption { opacity: 1; }

/* --- image slots --------------------------------------------------------- */

.image-slot {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: oklch(0.94 0.008 80);
}

/* Layered over the placeholder, so the slot keeps its size while the photo
   loads and fades in once it arrives. */
.image-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.image-slot img.is-loaded { opacity: 1; }

.image-slot--empty {
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px dashed var(--rule-strong);
  background:
    repeating-linear-gradient(45deg,
      oklch(0.95 0.008 80) 0 10px,
      oklch(0.93 0.008 80) 10px 20px);
}

.image-slot__placeholder {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  text-align: center;
}

/* --- case study pages ---------------------------------------------------- */

/* The case study nav is a plain bar — no sticky, no link row. */
.nav--case { position: static; }
.nav--case .nav__mark { color: inherit; }
.nav--case .nav__mark:hover { color: var(--green); }
.nav__back { font-size: 13px; letter-spacing: 0.05em; }

.case-head {
  padding: 100px var(--gutter) 60px;
  max-width: var(--shell-narrow);
  margin: 0 auto;
}

.case-head__meta {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.case-head__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 1;
  margin: 0 0 28px;
}

.case-hero {
  padding: 0 var(--gutter);
  max-width: var(--shell-narrow);
  margin: 0 auto 100px;
  overflow: hidden;
}

.case-hero .image-slot {
  aspect-ratio: 16 / 9;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.case-hero .image-slot:hover { transform: scale(1.04); }

.case-body {
  padding: 0 var(--gutter) 100px;
  max-width: var(--shell-narrow);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
}

.case-body__main {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.case-block__label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--green);
  margin: 0 0 14px;
}

.case-block p,
.case-block ul {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-3);
  max-width: 640px;
  margin: 0 0 20px;
}
.case-block ul { padding-left: 20px; margin-bottom: 0; }
.case-block p:last-child { margin-bottom: 0; }
.case-block p + ul { margin-top: -4px; }

.case-facts {
  border-left: 1px solid var(--rule);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 14px;
  margin: 0;
}

.case-facts dt { color: var(--ink-muted); margin-bottom: 4px; }
.case-facts dd { margin: 0; }

.case-gallery {
  padding: 0 var(--gutter) 120px;
  max-width: var(--shell-narrow);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.case-gallery .image-slot { aspect-ratio: 4 / 5; }

.footer--case a { color: inherit; }
.footer--case a:hover { color: var(--green); }
.footer--case .footer__next { color: var(--green); }

/* --- footer -------------------------------------------------------------- */

.footer {
  padding: 40px var(--gutter);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-muted);
}
.footer a { color: inherit; }
.footer a:hover { color: var(--green); }

/* --- contact modal ------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }

.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 15, 0.55);
}

.modal__panel {
  position: relative;
  background: var(--paper);
  width: 100%;
  max-width: 460px;
  padding: 40px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: oklch(0.4 0.01 80);
  font-family: inherit;
}

.modal__eyebrow {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 10px;
  min-height: 1em;
}

.modal__title {
  font-family: var(--times);
  font-weight: 400;
  font-size: 32px;
  margin: 0 0 24px;
}

.modal__sent {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0;
}

.modal__form { display: flex; flex-direction: column; gap: 14px; }

.modal__form input,
.modal__form textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: inherit;
  border-radius: 0;
}
.modal__form textarea { resize: vertical; }
.modal__form ::placeholder { color: var(--ink-muted); }

body.is-modal-open { overflow: hidden; }

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1100px) {
  .card { flex: 0 0 calc(70% - (var(--gap) / 2)); }
}

@media (max-width: 900px) {
  :root { --gutter: 28px; --gap: 24px; }

  .nav { flex-wrap: wrap; gap: 14px; padding: 18px var(--gutter); }
  .nav__links { gap: 20px; }

  .hero { height: 80vh; }
  .hero__inner { gap: 28px; padding-bottom: 36px; }
  .hero__word {
    transform: scaleY(1.35);
    /* Drop the clamp floor — 11 letters of Arial Black at 56px overflow a
       phone. Purely proportional keeps the whole word on screen. */
    font-size: min(10.5vw, 134px);
  }

  .about {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 56px var(--gutter) 90px;
  }
  .about__body   { font-size: 19px; }
  .about__closer { font-size: 22px; margin-top: 32px; }

  .card { flex: 0 0 100%; }
  .carousel__arrow--prev { left: 0; }
  .carousel__arrow--next { right: 0; }
  .carousel__arrow { width: 44px; height: 44px; opacity: 0.92; }

  .vault {
    padding: 80px var(--gutter);
    margin-top: 60px;
  }
  .vault__grid { grid-template-columns: 1fr; gap: 40px; }
  .vault__heading { font-size: 28px; }

  .shot__caption { opacity: 1; }

  .case-head { padding: 56px var(--gutter) 40px; }
  .case-hero { margin-bottom: 56px; }
  .case-body {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 60px;
  }
  .case-facts {
    border-left: none;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 28px;
  }
  .case-gallery {
    grid-template-columns: 1fr;
    padding-bottom: 72px;
  }

  .footer { flex-direction: column; align-items: flex-start; }

  .modal__panel { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Drop the autoplaying hero footage back to its still poster frame. */
  .hero__video { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
