/* ==========================================================
   Pietro Mafrica – Portfolio
   Shared stylesheet (every page should link to this file)
   ========================================================== */

:root {
  --bg: #262626;
  --bg-deep: #2b2b2b;
  --text: #f2f2f2;
  --muted: #8d8d8d;

  --orange: #f27900;
  --coral: #e85a5a;
  --purple: #5c2e78;
  --green: #7d9a6f;

  --red: #e8383d;
  --blue: #4a8fe0;
  --magenta: #d63fd6;
  --yellow: #f0e030;
  --teal: #3ab8c0;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --gutter: clamp(14px, 2vw, 22px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 30px 14px 30px;
  background: transparent;
  transition: background-color .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}
/* Transparent over the hero, solid once the page scrolls */
.site-header.scrolled {
  background: rgba(38, 38, 38, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.logo { display: block; line-height: 0; }
.logo img { display: block; width: 198px; height: auto; }

.site-nav { display: flex; gap: 14px; padding-top: 16px; font-size: 18px; }
.site-nav a { opacity: 0.95; transition: opacity .15s, text-decoration-color .15s; text-decoration: underline transparent; text-underline-offset: 5px; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { opacity: 1; text-decoration-color: currentColor; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 700px;
  padding-top: 335px;
  overflow: hidden;
}

.hero-fingers {
  position: absolute;
  top: 0;
  left: 1.5vw;
  width: min(80vw, 1156px);
  height: auto;
  pointer-events: none;
}

.hero-title {
  position: relative;
  margin: 0 0 0 clamp(20px, 24vw, 346px);
  padding-right: 20px;
  font-size: clamp(46px, 7vw, 101px);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.circled { position: relative; display: inline-block; }
.circled svg {
  position: absolute;
  left: -22%; top: -48%;
  width: 150%; height: 200%;
  overflow: visible;
  pointer-events: none;
}

.hero-sub {
  margin: 10px 20px 0 clamp(20px, 24vw, 346px);
  max-width: 930px;
  font-size: clamp(16px, 1.9vw, 21px);
  font-weight: 400;
}
.hero-sub .dim { color: var(--muted); }

/* Doodle row */
.doodles {
  position: relative;
  margin-top: 70px;
  height: 370px;
}
.doodle { position: absolute; overflow: visible; pointer-events: none; }
.doodle-wire  { left: clamp(14px, 10.4vw, 150px); top: 0; width: clamp(260px, 42.7vw, 615px); height: auto; }
.doodle-arrow { right: clamp(80px, 21vw, 300px); top: 105px; width: clamp(70px, 11.4vw, 164px); height: auto; }

/* Mini music player */
.player {
  position: absolute;
  right: clamp(14px, 2vw, 22px);
  top: 215px;
  width: clamp(200px, 18vw, 195px);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #333;
  border-radius: 4px;
  color: #777;
}
.player button {
  all: unset;
  cursor: pointer;
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
}
.player button:focus-visible { outline: 3px solid var(--yellow); }
.player svg { width: 40px; height: 40px; fill: #555; }
.player:hover svg { fill: #666; }
.player .meta { flex: 1; min-width: 0; font-size: 16px; line-height: 1.05; }
.player .meta small { display: block; font-size: 10px; margin-top: 2px; }
.player .meta small a { text-decoration: underline; text-underline-offset: 2px; }
.player .meta small a:hover { color: #aaa; }
.player .bar { height: 4px; margin-top: 8px; background: #444; border-radius: 2px; overflow: hidden; }
.player .bar i { display: block; height: 100%; width: 0; transition: width .25s linear; background: #6b6b6b; }

/* ---------- Project cards ---------- */
.projects { display: grid; gap: 52px; padding: 0 var(--gutter); margin-top: 20px; }

.card {
  position: relative;
  display: block;
  min-height: 378px;
  padding: 20px 40px 30px 26px;
  border-radius: 8px;
  overflow: hidden;
  color: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.35); }

.card h2 {
  margin: 0 0 20px;
  font-size: clamp(26px, 2.43vw, 35px);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 1;
}
.card p {
  margin: 0 0 24px 44px;
  max-width: 910px;
  font-size: clamp(17px, 1.63vw, 23.5px);
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.card .art { position: absolute; pointer-events: none; }

.card-orange { background: var(--orange); }
.card-coral  { background: var(--coral); }
.card-purple { background: var(--purple); }
.card-green  { background: var(--green); }

.card h2 img { display: block; max-width: 100%; height: auto; }
.card-orange .art { right: clamp(14px, 4.9vw, 70px); top: 60px; width: clamp(110px, 12.4vw, 178px); height: auto; }
.card-coral  .art { right: 0; bottom: 0; height: 100%; width: auto; max-width: 400px; aspect-ratio: 400 / 378; }
.card-purple .art { right: 0; bottom: 0; width: clamp(200px, 34.8vw, 501px); height: auto; }

/* Collaby: the supplied artwork is the whole card background */
.card-green { min-height: 378px; }
.card-green .art { left: 0; right: 0; bottom: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: left bottom; z-index: 0; }
.card-green h2, .card-green p { position: relative; z-index: 1; }

/* ---------- Footer CTA ---------- */
.cta {
  position: relative;
  display: block;
  margin-top: 60px;
  padding: 150px 20px 130px;
  text-align: center;
  overflow: hidden;
}
.cta-text {
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(54px, 9.4vw, 112px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.cta-circle {
  position: absolute;
  left: 41%; top: -26%;
  width: 40%; height: 150%;
  overflow: visible;
}
.cta-arrow {
  position: absolute;
  right: clamp(-10px, 3vw, 40px);
  top: 50px;
  width: clamp(70px, 12vw, 170px);
  height: auto;
}
.cta:hover .cta-text { letter-spacing: -0.01em; }
.cta-text { transition: letter-spacing .3s ease; }

.site-footer {
  height: 110px;
  background: var(--bg-deep);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #6f6f6f;
}

/* ---------- Entrance animations (respect reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .draw path, .draw ellipse { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s .4s ease forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  .hero-title, .hero-sub { animation: rise .8s ease both; }
  .hero-sub { animation-delay: .15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .site-header { padding: 12px 16px 12px; }
  .site-nav { font-size: 16px; }
  .hero { padding-top: 190px; min-height: 0; }
  .hero-title { margin-left: 20px; }
  .hero-sub { margin-left: 20px; }
  .doodles { height: 330px; }
  .doodle-arrow { right: 8%; top: 150px; }
  .player { top: 190px; }
  .card { padding-right: 18px; min-height: 0; padding-bottom: 150px; }
  .card p { margin-left: 0; }
  .card-orange .art { top: auto; bottom: 10px; right: 14px; }
  .card-coral .art { top: auto; bottom: 0; height: 140px; }
  .card-green { aspect-ratio: auto; min-height: 340px; }
  .card-green .art { height: 62%; top: auto; object-fit: cover; object-position: left bottom; }
  .hero-fingers { width: 150vw; left: -30vw; top: 20px; }
  .hero { padding-top: 230px; }
  .doodles { margin-top: 40px; }
  .card p { font-size: 17px; }
  .cta { padding: 110px 10px 90px; }
  .cta-text { font-size: clamp(40px, 11.5vw, 70px); }
  .cta-arrow { top: 20px; right: 4px; }
}

/* ---------- About page ---------- */
.about { padding: 170px clamp(20px, 4vw, 57px) 90px; }

.about-intro { display: flex; align-items: flex-start; gap: clamp(24px, 3.5vw, 40px); }
.about-photo { flex: none; width: clamp(220px, 34.7vw, 500px); height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.about-copy { flex: 1; min-width: 0; }
.about-copy h1 { margin: -8px 0 22px; font-size: clamp(40px, 6.6vw, 96px); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.about-copy p { margin: 0 0 24px; max-width: 800px; font-size: clamp(15px, 1.55vw, 22px); line-height: 1.25; }

.skills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 46px 0 0; padding: 0; max-width: 1300px; }
.skills li { min-width: clamp(96px, 14vw, 200px); padding: 7px 16px; text-align: center; background: #333; color: #8d8d8d; border-radius: 999px; font-size: clamp(12px, 1vw, 14px); }

.about-buttons { display: flex; flex-wrap: wrap; gap: 36px; margin-top: 40px; }
.btn { display: grid; place-items: center; width: clamp(150px, 24.6vw, 355px); height: clamp(52px, 5.8vw, 84px); background: #333; color: var(--text); border-radius: 2px; font-size: clamp(20px, 2.1vw, 30px); transition: background-color .2s ease, transform .2s ease; }
.btn:hover { background: #444; transform: translateY(-2px); }

.about-details { margin-top: 60px; }
.about-details h2 { margin: 0 0 18px; font-size: clamp(36px, 4.7vw, 68px); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.about-details dl { margin: 0 0 0 clamp(8px, 1.8vw, 26px); font-size: clamp(15px, 1.4vw, 20px); line-height: 1.5; }
.about-details dl div { display: flex; flex-wrap: wrap; gap: 0 .4em; }
.about-details dt { font-weight: 700; }
.about-details dd { margin: 0; color: #d8d8d8; overflow-wrap: anywhere; }
.about-details a { text-decoration: underline transparent; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.about-details a:hover { text-decoration-color: currentColor; }
.site-nav a[aria-current="page"] { font-weight: 700; }

@media (max-width: 800px) {
  .about { padding-top: 110px; }
  .about-intro { flex-direction: column; }
  .about-photo { width: 100%; max-width: 420px; }
  .about-copy h1 { margin-top: 6px; }
  .about-buttons { gap: 14px; }
  .btn { flex: 1 1 150px; width: auto; }
}

/* ---------- Case study pages ---------- */
.case { padding: 150px clamp(20px, 5.9vw, 85px) 120px; }

.back-link { display: inline-flex; align-items: center; gap: 18px; margin-left: calc(clamp(20px, 5.9vw, 85px) * -0.6); padding: 10px 24px 10px 14px; background: #333; border-radius: 10px; font-size: clamp(16px, 1.55vw, 22px); font-weight: 600; transition: background-color .2s ease; }
.back-link:hover { background: #3d3d3d; }
.back-link svg { width: 40px; height: 24px; flex: none; }

.case-head { margin-top: 44px; }
.case-head .eyebrow { margin: 0; font-size: clamp(20px, 2.2vw, 32px); font-weight: 400; }
.case h1 { margin: 0; font-size: clamp(44px, 6.9vw, 100px); font-weight: 700; letter-spacing: -0.02em; line-height: .98; }
.case-sub { margin: -8px 0 8px; font-size: clamp(17px, 1.8vw, 26px); }

.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 0; padding: 0; }
.pills li { padding: 5px 28px; background: #333; color: #8d8d8d; border-radius: 999px; font-size: clamp(14px, 1.4vw, 20px); text-align: center; }
.pills-lg { gap: 26px 30px; margin-left: clamp(0px, 2.9vw, 41px); margin-top: 34px; }
.pills-lg li { padding: 12px 34px; color: #a8a8a8; font-size: clamp(16px, 2.1vw, 30px); }

.case-hero { margin: 70px 0 0 clamp(0px, 4.7vw, 68px); max-width: 1135px; }
.case-hero img { display: block; width: 100%; height: auto; aspect-ratio: 1135 / 851; object-fit: cover; object-position: top; border-radius: 14px; }

.case-section { margin-top: clamp(70px, 9vw, 130px); }
.case h2 { margin: 0 0 clamp(20px, 2.4vw, 34px); font-size: clamp(34px, 6.9vw, 100px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.prose { margin-left: clamp(0px, 4.7vw, 68px); max-width: 1140px; }
.prose p { margin: 0 0 clamp(36px, 6vw, 90px); font-size: clamp(17px, 2.08vw, 30px); line-height: 1.3; }
.prose p:last-child { margin-bottom: 0; }
.prose-lg { max-width: 1120px; }
.prose p:has(+ .focus) { margin-bottom: 0; }
.prose-lg p { font-size: clamp(19px, 2.5vw, 36px); line-height: 1.22; }

.goals { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: clamp(60px, 8vw, 110px) calc(clamp(20px, 5.9vw, 85px) * -1) 0; padding: clamp(36px, 5vw, 70px) 0; background: #333; }
.goals li { padding: 0 clamp(14px, 5.5vw, 80px); text-align: center; font-size: clamp(16px, 2.08vw, 30px); font-weight: 500; line-height: 1.3; display: grid; place-items: center; }
.goals li + li { border-left: 4px solid #262626; }

.focus { list-style: none; margin: 0; padding: 0; }
.focus li { margin-top: clamp(22px, 2.6vw, 38px); }
.focus h3 { position: relative; margin: 0; padding-left: clamp(30px, 3.3vw, 48px); font-size: clamp(17px, 2.08vw, 30px); font-weight: 400; line-height: 1.3; }
.focus h3::before { content: ""; position: absolute; left: clamp(12px, 1.3vw, 20px); top: .55em; width: .27em; height: .27em; border-radius: 50%; background: currentColor; }
.focus p { margin: 0; }

.gallery { display: grid; grid-template-columns: 777fr 430fr; gap: clamp(20px, 6.5vw, 75px); max-width: 1290px; margin-top: 50px; align-items: start; }
.gallery img { display: block; width: 100%; height: auto; }
.gallery-main { display: grid; gap: clamp(24px, 4.5vw, 65px); }
.gallery-main img { border-radius: 10px; }
.gallery-side { display: grid; gap: clamp(14px, 1.5vw, 22px); margin-top: min(49.2vw, 708px); }
.gallery-side img { border-radius: 12px; }

.figma-link { text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; transition: opacity .15s; }
.figma-link:hover { opacity: .75; }

@media (max-width: 900px) {
  .case { padding-top: 110px; }
  .back-link { margin-left: 0; }
  .case-hero, .prose { margin-left: 0; }
  .pills-lg { margin-left: 0; }
  .goals { grid-template-columns: 1fr; gap: 28px; }
  .goals li + li { border-left: 0; border-top: 4px solid #262626; padding-top: 28px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-side { margin-top: 0; grid-template-columns: 1fr; }
}

/* ---------- Commutemate-specific blocks ---------- */
.phones { display: grid; justify-content: center; }
.phones img { display: block; width: 100%; height: auto; border-radius: 12px; }
.phones-hero { grid-template-columns: repeat(3, minmax(0, 370px)); gap: clamp(10px, 1.9vw, 28px); margin-top: 84px; }
.phones-final { grid-template-columns: repeat(2, minmax(0, 530px)); gap: 66px clamp(20px, 7.2vw, 104px); margin-top: 90px; }

.circles { list-style: none; display: flex; justify-content: space-between; gap: 12px; margin: clamp(50px, 8vw, 115px) 0 0; padding: 0; }
.circles li { flex: none; width: clamp(76px, 15.2vw, 219px); aspect-ratio: 1; display: grid; place-items: center; padding: 0 clamp(8px, 1.6vw, 24px); border-radius: 50%; background: #333; text-align: center; font-size: clamp(13px, 2.08vw, 30px); font-weight: 500; line-height: 1.3; }

.compare-wrap { margin-top: clamp(24px, 3vw, 44px); overflow-x: auto; }
.compare { width: 100%; min-width: 860px; table-layout: fixed; border-collapse: separate; border-spacing: 0 9px; font-size: clamp(14px, 1.67vw, 24px); font-weight: 600; line-height: 1.17; }
.compare th, .compare td { padding: 14px 12px; border-right: 14px solid var(--bg); background: #333; background-clip: padding-box; color: #b6b6b6; text-align: center; vertical-align: middle; }
.compare th:last-child, .compare td:last-child { border-right: 0; }
.compare thead th { background: #5c5c5c; background-clip: padding-box; color: #c4c4c4; padding: 24px 10px; font-weight: 600; }
.compare tr.alt th, .compare tr.alt td { background: #595959; background-clip: padding-box; color: #cfcfcf; }
.compare td.top { text-align: left; vertical-align: top; }
.compare td.top ul { margin: 0; padding-left: 1.05em; }
.compare td.top li { margin-bottom: .4em; }
.compare td.top li::marker { font-size: .8em; }
.compare .competitor { font-weight: 500; font-size: .92em; }
.compare .competitor img { display: block; width: min(108px, 100%); height: auto; margin: 0 auto 6px; }
.compare-scale { margin: 14px 0 0; font-size: clamp(13px, 1.4vw, 20px); font-weight: 600; color: #707070; }

.survey-link { margin: -6px 0 0 clamp(0px, 1.3vw, 19px); font-size: clamp(11px, 1.2vw, 17px); font-weight: 600; color: #8d8d8d; overflow-wrap: anywhere; }
.survey-link a { text-decoration: underline; text-underline-offset: 3px; }
.survey-link a:hover { color: #bbb; }
.findings { list-style: none; margin: clamp(26px, 3vw, 44px) 0 0 clamp(0px, 4.3vw, 62px); padding: 0; max-width: 1160px; }
.findings li { position: relative; padding-left: clamp(30px, 4.6vw, 66px); margin-bottom: clamp(24px, 2.8vw, 40px); font-size: clamp(17px, 2.08vw, 30px); font-weight: 300; line-height: 1.3; }
.findings li::before { content: ""; position: absolute; left: 0; top: .1em; width: clamp(18px, 2.5vw, 36px); aspect-ratio: 1; background: url("assets/commutemate/diamond.svg") center / contain no-repeat; }

.goals-wide li { font-weight: 400; }
.goals-wide { margin-top: clamp(60px, 8vw, 110px); }
.case-section + .goals-wide { margin-top: clamp(60px, 8vw, 110px); }

@media (max-width: 900px) {
  .phones-hero { grid-template-columns: 1fr; margin-top: 60px; }
  .phones-hero img, .phones-final img { max-width: 420px; margin-inline: auto; }
  .phones-final { grid-template-columns: 1fr; gap: 30px; }
  .circles { flex-wrap: wrap; justify-content: center; gap: 18px; }
  .circles li { width: 120px; font-size: 16px; }
}

/* ---------- NASA Planets blocks ---------- */
.shot { margin: 70px auto 0; max-width: 1168px; }
.shot img, .stack img { display: block; width: 100%; height: auto; border-radius: 14px; }
.stack { display: grid; gap: clamp(36px, 6.7vw, 97px); justify-items: center; margin-top: 50px; }
.stack img { max-width: 1122px; }

.prose a { text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; transition: opacity .15s; }
.prose a:hover { opacity: .75; }
.bullets { margin: 0; padding-left: clamp(18px, 2.2vw, 32px); font-size: clamp(17px, 2.08vw, 30px); line-height: 1.3; }
.bullets-nested { margin-top: .3em; padding-left: clamp(26px, 6.6vw, 96px); }
.prose p + .bullets { margin-top: .3em; }
.prose p:has(+ .bullets) { margin-bottom: 0; }
.bullets li::marker { font-size: .9em; }

.trends article { margin-bottom: clamp(40px, 6vw, 86px); }
.trends article:last-child { margin-bottom: 0; }
.trends .trend-link { margin-bottom: clamp(20px, 2.7vw, 39px); }
.trends h3 { margin: 0; font-size: clamp(17px, 2.08vw, 30px); font-weight: 700; line-height: 1.3; }
.trends article p:last-child { margin-bottom: 0; }

.big-link { margin-top: clamp(20px, 2.5vw, 36px); }
.prose p.big-link { font-size: clamp(19px, 2.9vw, 42px); font-weight: 500; line-height: 1.2; }

/* ---------- Collaby blocks ---------- */
.wide { position: relative; left: 50%; transform: translateX(-50%); width: min(1316px, calc(100vw - 40px)); }
.pile { display: grid; gap: clamp(24px, 3.1vw, 44px); justify-items: center; margin: 50px 0 0; }
.pile img, .cards2 img, .joined img, .screen-row img { display: block; width: 100%; height: auto; border-radius: 10px; }
.pile img { max-width: var(--w, 1100px); }
.pile-final { gap: clamp(30px, 4.9vw, 70px); }
.joined { width: min(1023px, 100%); margin: clamp(40px, 6vw, 86px) auto 0; }
.joined img { border-radius: 0; }

.persona { display: grid; grid-template-columns: 488fr 464fr 370fr; margin-top: clamp(40px, 4.6vw, 66px); font-size: clamp(14px, 2.08vw, 30px); line-height: 1.3; }
.persona h3 { margin: 0 0 1em; font-size: inherit; font-weight: 700; }
.persona p { margin: 0; padding: 0 .3em 0 .45em; }

.unknowns { margin: clamp(60px, 8vw, 115px) 0 0 clamp(0px, 2.8vw, 41px); max-width: 1180px; font-size: clamp(17px, 2.08vw, 30px); line-height: 1.3; }
.unknowns h3 { margin: 0 0 .7em; font-size: inherit; font-weight: 700; }
.unknowns p { margin: 0 0 .9em clamp(0px, 2.8vw, 40px); }
.unknowns .bullets { margin-left: clamp(0px, 2.8vw, 40px); padding-left: clamp(18px, 2.2vw, 32px); }

.cards2 { list-style: none; padding: 0; margin-top: 50px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.cards2 .solo { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }

.screens-list { margin: 50px 0 0 clamp(0px, 4.7vw, 68px); max-width: 1212px; }
.screen-row { display: grid; grid-template-columns: 755fr 420fr; gap: clamp(18px, 2.6vw, 37px); align-items: start; margin-bottom: clamp(36px, 4.9vw, 70px); }
.screen-row:last-child { margin-bottom: 0; }
.screen-row h3 { margin: 0; font-size: clamp(17px, 2.08vw, 30px); font-weight: 700; line-height: 1.3; }
.screen-row p { margin: 0; font-size: clamp(17px, 2.08vw, 30px); line-height: 1.3; }

@media (max-width: 900px) {
  .persona { grid-template-columns: 1fr; gap: 36px; font-size: 17px; }
  .persona p { padding-left: 0; }
  .cards2 { grid-template-columns: 1fr; }
  .cards2 .solo { width: 100%; }
  .screens-list { margin-left: 0; }
  .screen-row { grid-template-columns: 1fr; gap: 16px; }
}

.case-head-roomy .case-sub { margin-top: 14px; }
.persona p { max-width: 13.3em; }
@media (max-width: 900px) { .persona p { max-width: none; } }

/* ---------- Page transition curtain ---------- */
html { --logo-w: clamp(130px, 16vw, 198px); }
html::after {
  content: "";
  position: fixed; inset: 0; z-index: 10000;
  pointer-events: none;
  transform: translateY(-100%);
  background:
    url("assets/MainLogo.svg") calc(50% + var(--logo-w) * .2) 50% / var(--logo-w) auto no-repeat,
    linear-gradient(var(--orange), var(--orange)) top / 100% 4px no-repeat,
    linear-gradient(var(--orange), var(--orange)) bottom / 100% 4px no-repeat,
    #1a1a1a;
}
@media (prefers-reduced-motion: no-preference) {
  html::after { animation: curtain-out .75s cubic-bezier(.77, 0, .18, 1) both; }
  html.is-leaving::after { animation: curtain-in .48s cubic-bezier(.77, 0, .18, 1) both; pointer-events: all; }
  @keyframes curtain-out { from { transform: translateY(0); } to { transform: translateY(-100%); } }
  @keyframes curtain-in  { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .case, .about, .wip { animation: page-rise .8s .3s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes page-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

/* ---------- Extra Work (work in progress) ---------- */
.wip { min-height: calc(100vh - 110px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 130px 20px 70px; }
.wip-eyebrow { margin: 0 0 6px; font-size: clamp(18px, 2vw, 28px); color: var(--muted); }
.wip h1 { margin: 0; font-size: clamp(44px, 7.6vw, 110px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.wip h1 span { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; color: var(--blue); }
.wip-sub { max-width: 560px; margin: 22px 0 0; font-size: clamp(17px, 1.7vw, 24px); line-height: 1.35; color: #bdbdbd; }
.wip-art { width: min(560px, 100%); height: auto; margin: clamp(36px, 5vw, 64px) 0; }
.wip .btn { flex: none; width: clamp(180px, 18vw, 260px); height: clamp(52px, 4.8vw, 68px); font-size: clamp(18px, 1.7vw, 24px); }

@media (prefers-reduced-motion: no-preference) {
  .wip-art [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: wip-draw 1.1s ease forwards; }
  .wip-frame { animation-delay: .5s !important; }
  .wip-bar { animation-delay: .9s !important; }
  .wip-card [pathLength] { animation-delay: calc(var(--d) + .9s) !important; }
  .wip-card { animation: wip-pulse 2.6s calc(var(--d) + 2.4s) ease-in-out infinite; }
  @keyframes wip-draw { to { stroke-dashoffset: 0; } }
  @keyframes wip-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
}
