:root {
  --page: #f4f5f2;
  --surface: #ffffff;
  --ink: #101615;
  --ink-soft: #52605d;
  --line: #d8e2df;
  --mint: #c9faeb;
  --mint-strong: #93efd2;
  --green: #188b74;
  --green-dark: #0b5548;
  --blue-soft: #d9f0f4;
  --pink-soft: #ffe0e9;
  --yellow-soft: #ffedc8;
  --focus: #075ee8;
  --shadow: 0 20px 60px rgba(13, 53, 46, 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Manrope", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mint-strong); color: var(--ink); }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--page); }
::-webkit-scrollbar-thumb { border: 3px solid var(--page); border-radius: 999px; background: #9db4ae; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.case-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 50;
  display: grid;
  width: min(calc(100% - 2rem), 560px);
  min-height: 58px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 35px rgba(14, 41, 36, 0.13);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  transform: translateX(-50%);
}
.case-brand {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}
.back-link {
  justify-self: center;
  padding: 0.68rem 0.88rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.back-link:hover { background: rgba(16, 22, 21, 0.07); }
.language-switch { display: flex; gap: 0.12rem; padding: 0.2rem; border-radius: 999px; background: rgba(16, 22, 21, 0.07); }
.language-switch button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #68706e;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.language-switch button[aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 4px 12px rgba(12, 40, 34, 0.14); }

main { width: min(calc(100% - 2rem), 1440px); margin: 1rem auto; overflow: clip; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.banco-hero,
.project-meta,
.story-layout,
.more-work,
.case-contact,
.case-footer { width: min(100% - 3rem, 1240px); margin-inline: auto; }

.banco-hero {
  display: grid;
  min-height: auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: 9rem 4rem;
}
.banco-hero::before {
  position: absolute;
  inset: 1rem auto auto 1rem;
  z-index: -1;
  width: min(48vw, 690px);
  height: min(48vw, 690px);
  border-radius: 46% 54% 62% 38% / 44% 45% 55% 56%;
  background: var(--mint);
  content: "";
  filter: blur(0.2px);
}
.banco-hero-copy { position: relative; z-index: 1; }
.banco-hero h1 {
  margin: 0;
  font-size: clamp(3.6rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.94;
  text-wrap: balance;
}
.banco-hero-copy > p { max-width: 65ch; margin: 1.5rem 0 2rem; color: #28423d; font-size: clamp(1.125rem, 1.5vw, 1.25rem); }
.outline-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.2rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-weight: 800;
  text-decoration: none;
  transition: transform 220ms var(--ease), background-color 220ms var(--ease);
}
.outline-button:hover { background: rgba(255,255,255,0.7); transform: translateY(-2px); }
.outline-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.hero-frame { margin: 0; overflow: hidden; border-radius: 16px; background: white; box-shadow: 0 26px 70px rgba(9, 74, 62, 0.2); }
.hero-frame img { width: 100%; height: auto; }

.project-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: 16px; background: var(--line); }
.project-meta div { min-height: 118px; padding: 1.35rem 1.5rem; background: #eef7f4; }
.project-meta span { display: block; margin-bottom: 0.42rem; color: var(--ink-soft); font-size: 0.72rem; font-weight: 700; }
.project-meta strong { font-size: 0.95rem; }

.story-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding-block: 7rem; }
.chapter-nav { position: sticky; top: 7.5rem; align-self: start; display: grid; gap: 0.2rem; }
.chapter-nav a { padding: 0.72rem 0.85rem; border-radius: 10px; color: var(--ink-soft); font-size: 0.8rem; font-weight: 700; text-decoration: none; transition: background-color 220ms var(--ease), color 220ms var(--ease); }
.chapter-nav a[aria-current="true"] { background: var(--mint); color: var(--green-dark); }
.story-content { min-width: 0; }
.story-section { scroll-margin-top: 7rem; padding-bottom: 8rem; }
.story-section:last-child { padding-bottom: 0; }
.section-copy { max-width: 850px; margin-bottom: 2rem; }
.split-copy { display: grid; max-width: none; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 1.25rem; }
.section-copy h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.12; text-wrap: balance; }
.section-copy p { max-width: 65ch; margin: 1.25rem 0 0; color: var(--ink-soft); font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.7; }
.split-copy p { margin: 0; }
.problem-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: 16px; background: var(--line); }
.problem-grid article { min-height: 230px; padding: 1.5rem; background: #f5faf8; }
.problem-grid article:nth-child(2) { background: #f0f7fa; }
.problem-grid article:nth-child(3) { background: #fff4e2; }
.problem-grid strong { color: var(--green); font-size: 0.8rem; }
.problem-grid h3 { margin: 2.5rem 0 0.6rem; font-size: 1.55rem; letter-spacing: -0.03em; }
.problem-grid p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

.project-frame { margin: 0; overflow: hidden; border-radius: 16px; background: #eff6f4; box-shadow: 0 14px 40px rgba(17, 57, 49, 0.1); }
.project-frame img { width: 100%; height: auto; }
.project-frame figcaption { padding: 0.9rem 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.75rem; font-weight: 700; }
.project-frame-wide { width: 100%; }
.paired-frames { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.paired-frames > :first-child { grid-column: 1 / -1; }
.survey-findings { margin: 0; }
.survey-findings > div { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.survey-findings dt { margin-bottom: 0.6rem; font-size: 1.25rem; font-weight: 700; }
.survey-findings dd { max-width: 65ch; margin: 0; color: var(--ink-soft); font-size: 1.125rem; line-height: 1.7; }
.banco-palette { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.banco-palette li { display: grid; gap: 0.75rem; font-size: 1rem; font-weight: 600; }
.palette-swatch { display: block; height: 140px; border-radius: 10px; }
.palette-primary { background: var(--green); }
.palette-secondary { background: #25b4bd; }
.palette-tertiary { background: #ff8199; }
.palette-warning { background: #ffd082; }
.system-note { max-width: 65ch; margin: 1.5rem 0 0; font-size: 1.125rem; line-height: 1.7; color: var(--ink-soft); }

.prototype-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.prototype-tabs button { min-height: 44px; padding: 0.65rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink-soft); font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.prototype-tabs button[aria-selected="true"] { border-color: var(--green); background: var(--mint); color: var(--green-dark); }
.prototype-stage { overflow: hidden; border-radius: 16px; background: #eef8f6; box-shadow: 0 18px 55px rgba(11, 75, 62, 0.14); }
.prototype-stage img { width: 100%; height: auto; opacity: 1; transform: scale(1); transition: opacity 280ms ease, transform 520ms var(--ease); }
.prototype-stage.is-changing img { opacity: 0; transform: scale(0.992); }

.more-work { padding-block: 7rem; border-top: 1px solid var(--line); }
.more-work > div:first-child { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-bottom: 2rem; }
.more-work h2, .more-work p { margin: 0; }
.more-work h2 { font-size: clamp(2.3rem, 4.6vw, 4.6rem); letter-spacing: -0.04em; line-height: 0.98; }
.more-work p { color: var(--ink-soft); }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.more-card { position: relative; display: grid; overflow: hidden; border-radius: 16px; background: #eef4f2; text-decoration: none; transition: transform 260ms var(--ease), box-shadow 260ms var(--ease); }
.more-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.more-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.more-card span { justify-self: start; margin: 1rem 1rem 0; padding: 0.4rem 0.68rem; border-radius: 999px; background: var(--pink-soft); font-size: 0.68rem; font-weight: 800; }
.more-card:first-child span { background: var(--mint); }
.more-card h3 { margin: 0.8rem 1rem 1.2rem; font-size: clamp(1.5rem, 3vw, 2.3rem); letter-spacing: -0.03em; }

.case-contact { display: grid; justify-items: center; gap: 1.2rem; margin-bottom: 1.5rem; padding: clamp(2rem, 6vw, 5rem); border-radius: 16px; background: var(--blue-soft); text-align: center; }
.case-contact h2 { max-width: 780px; margin: 0; font-size: clamp(2.2rem, 4.5vw, 4.5rem); letter-spacing: -0.04em; line-height: 1; text-wrap: balance; }
.case-contact p { max-width: 56ch; margin: 0; color: #365d64; }
.case-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; padding: 1.5rem; border-radius: 16px; background: #f0f4f2; color: var(--ink-soft); font-size: 0.8rem; }
.case-footer p { margin: 0; }
.footer-social { display: flex; gap: 0.5rem; }
.social-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; text-decoration: none; transition: transform 220ms var(--ease); }
.social-icon:hover { transform: translateY(-2px); }
.social-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.social-email { background: var(--mint); color: #206b5a; }
.social-behance { background: #dce8ff; color: #1769ff; font-weight: 800; }
.social-dribbble { background: var(--pink-soft); color: #ea4c89; }

@media (max-width: 980px) {
  .banco-hero { grid-template-columns: 1fr; gap: 3rem; padding-top: 9rem; }
  .banco-hero::before { width: 78vw; height: 78vw; }
  .banco-hero-copy > p { max-width: 54ch; }
  .project-meta { grid-template-columns: 1fr 1fr; }
  .story-layout { grid-template-columns: 1fr; }
  .chapter-nav { position: sticky; top: 5.6rem; z-index: 20; display: flex; overflow-x: auto; padding: 0.4rem; border-radius: 12px; background: rgba(255,255,255,0.86); box-shadow: 0 8px 25px rgba(17, 57, 49, 0.1); backdrop-filter: blur(16px); }
  .chapter-nav a { flex: 0 0 auto; }
}

@media (max-width: 720px) {
  main { width: 100%; margin: 0; border-radius: 0; box-shadow: none; }
  .case-header { top: 0.75rem; width: calc(100% - 2rem); }
  .banco-hero,
  .project-meta,
  .story-layout,
  .more-work,
  .case-contact,
  .case-footer { width: calc(100% - 4rem); }
  .banco-hero { min-height: auto; padding-block: 8.5rem 4rem; }
  .banco-hero h1 { font-size: clamp(3.4rem, 17vw, 5rem); }
  .hero-frame { transform: none; }
  .story-layout { gap: 3rem; padding-block: 4.5rem; }
  .split-copy { grid-template-columns: 1fr; align-items: start; gap: 1rem; }
  .split-copy p { margin: 0; }
  .problem-grid, .paired-frames, .more-grid { grid-template-columns: 1fr; }
  .banco-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-section { padding-bottom: 5.5rem; }
  .more-work > div:first-child { align-items: flex-start; flex-direction: column; gap: 0.6rem; }
  .case-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .back-link { padding-inline: 0.35rem; font-size: 0.68rem; }
  .case-brand { width: 39px; height: 39px; }
  .project-meta { grid-template-columns: 1fr; }
  .project-meta div { min-height: 96px; }
  .outline-button { width: 100%; }
  .chapter-nav { width: calc(100vw - 1rem); margin-left: -1.5rem; border-radius: 0; }
  .prototype-tabs { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
