/* =========================================================
   Juanita Ocampo — Portfolio
   Shared styles for every page
   ========================================================= */

:root {
  /* Colors */
  --yellow: #eeec88;
  --yellow-soft: rgba(238, 236, 136, 0.6);
  --olive: #737a64;
  --paper: #f5f7f6;
  --ink: #000000;
  --white: #ffffff;
  --hero-tint: rgba(83, 45, 53, 0.2);

  /* Type */
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-display: "Epilogue", "DM Sans", sans-serif;

  /* Layout */
  --gutter: clamp(20px, 5vw, 100px);
  --max: 1263px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--yellow); color: var(--ink); padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 3.5vw, 70px);
  background: transparent;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
/* Soft glass behind the header (on a pseudo-element so the mobile menu still works) */
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -30px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(245, 247, 246, 0.14), rgba(245, 247, 246, 0));
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  /* fade the glass out to 0 at the bottom, no hard edge */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
}
.site-header.is-open::before { display: none; }
/* Header follows the scroll over the hero, then slides away */
.site-header.is-hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }
.logo {
  font-size: 23px; letter-spacing: -0.06em; color: var(--yellow); white-space: nowrap;
}
.nav { display: flex; gap: clamp(8px, 2vw, 36px); }
.nav a {
  font-size: 20px; color: var(--yellow-soft); padding: 12px 4px;
  transition: color .2s ease;
}
.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] { color: var(--yellow); }

.menu-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  color: var(--yellow); font: inherit; font-size: 18px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(100vh, 900px);
  display: flex; align-items: center;
  padding: 160px var(--gutter) 120px;
  background: var(--olive) url("../assets/home-hero.jpg") center / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-tint); }
.hero__inner { position: relative; max-width: var(--max); margin: 0 auto; width: 100%; }
.hero__title {
  margin: 0 0 clamp(24px, 3.5vw, 50px);
  font-weight: 600; color: var(--yellow);
  font-size: clamp(32px, 4.4vw, 64px); line-height: 1.25; letter-spacing: 0.04em;
}
.hero__services {
  margin: 0; color: var(--yellow); font-weight: 500; font-style: italic;
  font-size: clamp(16px, 1.65vw, 24px);
}

/* ---------- Latest work ---------- */
.work {
  padding: clamp(64px, 7vw, 100px) var(--gutter);
  display: flex; flex-direction: column; align-items: center; gap: clamp(36px, 4vw, 60px);
}
.section-title {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 2.2vw, 32px); line-height: 1.3; color: var(--olive); text-align: center;
}
.work-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 381px));
  gap: 40px 30px; justify-content: center; width: 100%;
}

.card { position: relative; display: flex; flex-direction: column; gap: 24px; }
.card__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #e6e2dc; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__info {
  /* sits exactly on top of the square image */
  position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 20px;
  padding: 28px 20px;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; transition: opacity .35s ease;
}
.card__desc { margin: 0; font-size: 19px; line-height: 1.35; letter-spacing: 0.05em; max-width: 265px; }
.card__meta { margin: 0; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 19px; }
.card__title {
  margin: 0; font-weight: 600; font-style: italic; font-size: 24px;
  letter-spacing: 0.03em; color: var(--olive);
}
.card:hover .card__info,
.card:focus-visible .card__info { opacity: 1; }
.card:focus-visible { outline: 2px solid var(--olive); outline-offset: 6px; }
.card--soon { cursor: default; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--olive); color: var(--yellow);
  padding: clamp(80px, 11vw, 160px) clamp(20px, 3.5vw, 50px) 40px;
}
.footer__inner { max-width: 1230px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.footer__lead { margin: 0; font-size: clamp(18px, 1.65vw, 24px); }
.footer__email {
  font-weight: 800; font-size: clamp(20px, 5.6vw, 92px); line-height: 1.1;
  text-align: center; overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em;
}
.footer__bar {
  width: 100%; margin-top: 24px; padding-top: 24px;
  border-top: 1px solid rgba(238, 236, 136, 0.5);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 15px;
}
.footer__links { display: flex; gap: 32px; }
.footer__bar a:hover { text-decoration: underline; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 800px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: 30;
    flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: var(--olive);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .nav a { font-size: 32px; color: var(--yellow); }
  .site-header.is-open .nav { opacity: 1; pointer-events: auto; }
  .site-header.is-open .menu-toggle { position: relative; z-index: 40; }

  .hero { min-height: 85vh; padding-top: 120px; }

  .work-grid { grid-template-columns: 1fr; max-width: 420px; }

  .footer__bar { flex-direction: column; text-align: center; }
  .footer__links { gap: 24px; }
}

/* Touch screens: no hover, so show the description under the image */
@media (hover: none) {
  .card__info {
    position: static; opacity: 1; background: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    padding: 0; color: var(--ink); gap: 6px; order: 3;
  }
  .card__media { order: 1; }
  .card__title { order: 2; }
  .card__desc { font-size: 16px; max-width: none; }
  .card__meta { font-size: 17px; color: var(--olive); }
  .card { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Under construction (Playground) ---------- */
.construction {
  position: relative; overflow: hidden;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 140px var(--gutter) 100px;
  background: var(--olive) url("../assets/home-hero.jpg") center / cover no-repeat;
  color: var(--yellow);
}
.construction::before { content: ""; position: absolute; inset: 0; background: rgba(83, 45, 53, 0.35); }
.construction__inner { position: relative; max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.construction__tag {
  margin: 0; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border: 1px solid var(--yellow); border-radius: 999px;
  font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
}
.construction__tag::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.construction__title {
  margin: 0; font-weight: 600; letter-spacing: 0.02em; line-height: 1;
  font-size: clamp(56px, 11vw, 160px);
}
.construction__text {
  margin: 0; font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: clamp(20px, 2.2vw, 30px); line-height: 1.35;
}
.construction__link {
  margin-top: 8px; font-size: 18px;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
  transition: opacity .2s ease;
}
.construction__link:hover { opacity: .7; }

/* ---------- Page hero (About, Contact, …) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  min-height: 700px; display: flex; flex-direction: column; justify-content: flex-end; gap: 24px;
  padding: 120px var(--gutter) 90px clamp(20px, 10.6vw, 155px);
  background: var(--olive) url("../assets/home-hero.jpg") center / cover no-repeat;
  color: var(--yellow);
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-tint); }
.page-hero > * { position: relative; margin: 0; }
.page-hero__title { font-weight: 600; font-size: clamp(56px, 6.6vw, 96px); letter-spacing: -0.01em; line-height: 1; }
.page-hero__sub { font-weight: 500; font-style: italic; font-size: clamp(17px, 1.65vw, 24px); }

/* ---------- About: how I see the world ---------- */
.lenses { padding: clamp(64px, 6vw, 90px) var(--gutter) clamp(80px, 9vw, 140px); }
.lenses__intro { max-width: 900px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 28px; }
.lenses__title { margin: 0; font-weight: 300; font-size: clamp(20px, 1.65vw, 24px); letter-spacing: 0.05em; line-height: 1.4; }
.lenses__cv { margin: 0; font-size: 16px; letter-spacing: 0.03em; color: rgba(0, 0, 0, 0.7); }
.lenses__cv a {
  color: var(--ink); font-weight: 500; font-style: italic;
  text-decoration: underline; text-underline-offset: 3px;
}
.lenses__cv a:hover { opacity: .7; }

.lens-stage {
  max-width: 1243px; margin: clamp(60px, 7vw, 110px) auto 0;
  display: grid; grid-template-columns: 1fr 380px 1fr; column-gap: 30px;
}
.lens-col { display: flex; flex-direction: column; gap: 120px; }
.lens-col--left { align-items: flex-start; }
.lens-col--right { align-items: flex-end; padding-top: 40px; }
.lens-col--left .lens:nth-child(2) { margin-left: 70px; }
.lens-col--right .lens:nth-child(2) { margin-right: 53px; }
.portrait { margin: 140px 0 0; align-self: start; aspect-ratio: 380 / 600; background: #d9d9d9; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.lens { position: relative; width: 340px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; outline: none; }
.lens__media { position: relative; aspect-ratio: 340 / 440; background: #d9d9d9; overflow: hidden; }
.lens__media video, .lens__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lens__info {
  position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 340 / 440;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 16px;
  padding: 24px 24px 28px; color: var(--paper);
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; transition: opacity .35s ease;
}
.lens__text { margin: 0; font-size: 16px; line-height: 1.4; letter-spacing: 0.02em; }
.lens__label { margin: 0; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 17px; }
.lens__title { margin: 0; font-style: italic; font-weight: 400; font-size: 16px; }
.lens:hover .lens__info, .lens:focus-visible .lens__info { opacity: 1; }
.lens:focus-visible { outline: 2px solid var(--olive); outline-offset: 6px; }

@media (max-width: 1100px) {
  .lens-stage { grid-template-columns: 1fr 1fr; row-gap: 60px; max-width: 760px; }
  .portrait { grid-column: 1 / -1; grid-row: 1; margin: 0 auto; width: min(380px, 100%); }
  .lens-col { gap: 60px; }
  .lens-col--right { padding-top: 0; align-items: flex-start; }
  .lens-col--left .lens:nth-child(2), .lens-col--right .lens:nth-child(2) { margin: 0; }
  .lens { width: 100%; }
}
@media (max-width: 720px) {
  .page-hero { min-height: 70vh; padding-bottom: 60px; }
  .lens-stage { grid-template-columns: 1fr; max-width: 420px; }
}
@media (hover: none) {
  .lens__info {
    position: static; aspect-ratio: auto; opacity: 1; background: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    padding: 0; color: var(--ink); order: 3;
  }
  .lens__media { order: 1; }
  .lens__title { order: 2; font-weight: 600; font-size: 18px; }
  .lens__label { display: none; }
  .lens { gap: 12px; }
}

/* ---------- Contact ---------- */
.contact { padding: clamp(56px, 6vw, 90px) var(--gutter) clamp(80px, 8vw, 120px); }
.contact__grid {
  max-width: 1153px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 13vw, 200px); align-items: start;
}
.contact__title {
  margin: 0 0 30px; font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(32px, 2.8vw, 40px); letter-spacing: 0.04em; line-height: 1.2;
}
.contact__text p { margin: 0 0 1.2em; font-size: 16px; line-height: 1.5; letter-spacing: 0.05em; }

.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field__label { font-size: 16px; letter-spacing: 0.05em; }
.field__hint { margin: 0; font-size: 12px; line-height: 1.4; color: rgba(0, 0, 0, 0.7); }
.field input, .field textarea, .field select {
  width: 100%; padding: 16px; border: 1px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink);
  font: 300 14px/1.4 var(--font-sans); letter-spacing: 0.02em;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, #000 50%), linear-gradient(135deg, #000 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field ::placeholder { color: rgba(0, 0, 0, 0.6); }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--olive); outline-offset: 2px; }
.form__send {
  align-self: flex-start; padding: 8px 28px; border: 1px solid var(--ink); border-radius: 4px;
  background: transparent; font: 300 14px var(--font-sans); cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.form__send:hover, .form__send:focus-visible { background: var(--ink); color: var(--paper); }
.hidden { display: none; }
.form__success {
  padding: 24px; border: 1px solid var(--olive); color: var(--olive);
  font-family: var(--font-serif); font-style: italic; font-size: 22px; line-height: 1.4;
}

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
}
.page-hero--short { min-height: 480px; }
@media (max-width: 720px) { .page-hero--short { min-height: 52vh; } }

/* =========================================================
   Case study pages
   ========================================================= */
.cs-hero { position: relative; height: min(902px, 92vh); min-height: 520px; overflow: hidden; background: #8c857e; }
.cs-hero > video, .cs-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(247,244,244,0.05) 0%, rgba(151,145,141,0.4) 50%, rgba(79,71,64,0.7) 85%, rgba(55,46,39,0.8) 100%);
}
.cs-hero__title {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: clamp(24px, 4vw, 40px);
  margin: 0; padding: 0 20px; text-align: center; color: var(--paper);
  font-family: var(--font-serif); font-weight: 500; letter-spacing: 0.07em; line-height: 1.05;
  font-size: clamp(44px, 6.6vw, 96px);
}

.cs-overview { padding: clamp(48px, 6vw, 90px) var(--gutter) clamp(40px, 5vw, 60px); }
.cs-overview__inner { max-width: 955px; margin: 0 auto; text-align: center; }
.cs-meta { margin: 0 0 1.2em; font-weight: 500; font-style: italic; font-size: 16px; letter-spacing: 0.03em; }
.cs-body p, .cs-overview p.cs-lead { margin: 0 0 1em; font-size: 16px; line-height: 1.55; letter-spacing: 0.05em; }

.cs-h2 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: clamp(30px, 2.8vw, 40px); letter-spacing: 0.04em; line-height: 1.2; }

.cs-challenge { padding: 50px clamp(20px, 10vw, 150px); }
.cs-challenge__grid { max-width: 1163px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 55px; align-items: center; }
.cs-challenge__text { display: flex; flex-direction: column; gap: 30px; }
.cs-challenge__text strong { font-weight: 500; }
.cs-media { width: 100%; height: 100%; object-fit: cover; display: block; background: #e6e2dc; }
.cs-challenge__img { aspect-ratio: 554 / 557; overflow: hidden; }

.cs-scope { padding: 55px var(--gutter); }
.cs-scope__inner { max-width: 1153px; margin: 0 auto; display: flex; flex-direction: column; gap: 50px; }
.cs-scope__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cs-scope__item { display: flex; flex-direction: column; gap: 20px; }
.cs-scope__img { height: 350px; overflow: hidden; background: #000; }
.cs-card-title { margin: 0 0 1em; font-weight: 500; font-style: italic; font-size: 16px; letter-spacing: 0.03em; }
.cs-card-text { margin: 0; font-size: 16px; line-height: 1.5; letter-spacing: 0.05em; }

.cs-collage { height: clamp(320px, 54vw, 781px); overflow: hidden; }

.cs-quote {
  position: relative; padding: clamp(120px, 20vw, 300px) var(--gutter);
  background: #2b2623 center / cover no-repeat; color: var(--paper); text-align: center;
}
.cs-quote::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.cs-quote__inner { position: relative; max-width: 1173px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(30px, 4vw, 60px); }
.cs-quote__text { margin: 0; font-weight: 300; font-size: clamp(20px, 2.1vw, 30px); line-height: 1.4; letter-spacing: 0.05em; white-space: pre-line; }
.cs-quote__sub { margin: 0; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(19px, 1.75vw, 25px); }

.cs-features { padding: 50px var(--gutter); }
.cs-features__grid { max-width: 1153px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cs-feature { display: flex; flex-direction: column; gap: 70px; }
.cs-feature:first-child { padding-bottom: 250px; }
.cs-feature:last-child { padding-top: 250px; flex-direction: column-reverse; justify-content: flex-end; }
.cs-feature__img { height: 650px; overflow: hidden; background: #000; }
.cs-feature__text { display: flex; flex-direction: column; gap: 24px; }
.cs-label { margin: 0; font-size: 12px; letter-spacing: 0.04em; }
.cs-h3 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 2.35vw, 34px); line-height: 1.2; }

/* Gallery strip: slides sideways in a continuous loop (like the Figma prototype) */
.cs-strip { --strip-h: 420px; padding: 20px 0; overflow: hidden; }
.cs-strip__track { display: flex; gap: 10px; width: max-content; will-change: transform;
  animation: cs-marquee var(--marquee-duration, 45s) linear infinite; }
.cs-strip:hover .cs-strip__track, .cs-strip:focus-within .cs-strip__track { animation-play-state: paused; }
.cs-strip__track > div { flex: 0 0 auto; height: var(--strip-h); aspect-ratio: var(--ar, 3 / 4); overflow: hidden; background: #2b2623; }
.cs-strip__track .cs-media { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes cs-marquee { to { transform: translateX(calc(-50% - 5px)); } }
@media (prefers-reduced-motion: reduce) {
  .cs-strip { overflow-x: auto; }
  .cs-strip__track { animation: none; }
  .cs-strip__track > [data-clone] { display: none; }
}

.cs-collab { padding: 30px var(--gutter) 60px clamp(20px, 10.6vw, 155px); display: flex; flex-direction: column; gap: 24px; }
.cs-collab p { margin: 0; font-size: 16px; letter-spacing: 0.05em; }
.cs-collab__label { font-weight: 700; }

.cs-next {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap;
  padding: 40px var(--gutter) 90px clamp(20px, 10.6vw, 155px);
  border-top: 1px solid rgba(0,0,0,0.12);
}
.cs-next span, .cs-next a { font-size: 16px; letter-spacing: 0.05em; }
.cs-next span { color: rgba(0,0,0,0.6); }
.cs-next a { color: var(--ink); text-underline-offset: 4px; }
.cs-next a:hover, .cs-next a:focus-visible { text-decoration: underline; }

@media (max-width: 1000px) {
  .cs-scope__grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .cs-strip { --strip-h: 320px; }
}
@media (max-width: 720px) {
  .cs-challenge__grid, .cs-features__grid { grid-template-columns: 1fr; }
  .cs-scope__grid { grid-template-columns: 1fr; }
  .cs-scope__img { height: 280px; }
  .cs-feature, .cs-feature:first-child, .cs-feature:last-child { padding: 0; gap: 28px; flex-direction: column; }
  .cs-features__grid { gap: 56px; }
  .cs-feature__img { height: auto; aspect-ratio: 4 / 5; }
  .cs-strip { --strip-h: 240px; }
}
