/*
  Florin Ciocănel portfolio — complete CSS
  Static bilingual portfolio website
  Hero rewritten for a full-width image card with smaller, frame-related overlay typography
*/

:root {
  --bg: #f5f2ec;
  --surface: #fffdf8;
  --surface-soft: #f8f4ee;
  --text: #202424;
  --muted: #646c68;
  --muted-2: #7a817d;
  --accent: #975537;
  --accent-dark: #7f432c;
  --line: rgba(32, 36, 36, 0.14);
  --line-soft: rgba(32, 36, 36, 0.08);
  --shadow: 0 18px 45px rgba(30, 25, 18, 0.10);
  --radius: 14px;
  --max-width: 1180px;
  --header-height: 88px;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

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

a:hover {
  color: var(--accent);
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

p:last-child,
h1:last-child,
h2:last-child,
h3:last-child {
  margin-bottom: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(151, 85, 55, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 999;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: var(--text);
  border-radius: 999px;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 236, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(100% - 2rem, var(--max-width));
  min-height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  gap: 0.05rem;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.brand-title {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.15;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.96rem;
}

.site-nav a {
  padding: 0.5rem 0;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--text);
}

.lang-link {
  display: inline-grid;
  place-items: center;
  min-width: 2.55rem;
  min-height: 2.55rem;
  padding: 0.2rem 0.55rem !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

/* Mobile hamburger animation
   Adapted from Jon Suh’s Hamburgers project
   Variant: hamburger--spring-r
   License: MIT
*/
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.hamburger-box {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 22px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  position: absolute;
  display: block;
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background-color: currentColor;
  transition-property: transform, opacity;
  transition-duration: 0.28s;
  transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.hamburger-inner {
  top: 50%;
  margin-top: -1px;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
}

.hamburger-inner::before {
  top: -9px;
}

.hamburger-inner::after {
  bottom: -9px;
}

.hamburger--spring-r .hamburger-inner {
  top: auto;
  bottom: 0;
  transition-delay: 0s;
  transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.hamburger--spring-r .hamburger-inner::after {
  top: -18px;
  transition: top 0.3s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1),
    opacity 0s linear;
}

.hamburger--spring-r .hamburger-inner::before {
  transition: top 0.1s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1),
    transform 0.13s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

.hamburger--spring-r.is-active .hamburger-inner {
  transform: translate3d(0, -9px, 0) rotate(-45deg);
  transition-delay: 0.22s;
  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}

.hamburger--spring-r.is-active .hamburger-inner::after {
  top: 0;
  opacity: 0;
  transition: top 0.2s cubic-bezier(0.33333, 0, 0.66667, 0.33333),
    opacity 0s 0.22s linear;
}

.hamburger--spring-r.is-active .hamburger-inner::before {
  top: 0;
  transform: rotate(90deg);
  transition: top 0.1s 0.15s cubic-bezier(0.33333, 0, 0.66667, 0.33333),
    transform 0.13s 0.22s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Layout */
.section-inner {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: clamp(3.25rem, 7vw, 6rem);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.section-header h2,
.bridge-copy h2,
.contact-cta h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 0;
}

.section-header p {
  color: var(--muted);
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Hero: full-width image card with compact proportional overlay */
.hero-card-section {
  padding-block: 0 clamp(3rem, 6vw, 5rem);
}

.hero-card {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.hero-card img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(248, 244, 238, 0.98) 0%,
    rgba(248, 244, 238, 0.94) 23%,
    rgba(248, 244, 238, 0.62) 42%,
    rgba(248, 244, 238, 0.18) 62%,
    rgba(248, 244, 238, 0) 100%
  );
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  z-index: 2;
  left: clamp(1.5rem, 6vw, 7rem);
  top: clamp(1.25rem, 3.65vw, 3.8rem);
  width: clamp(290px, 31vw, 520px);
  max-width: 38vw;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-overlay h1 {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-size: clamp(1.55rem, 2.35vw, 2.65rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero-intro {
  width: min(100%, 470px);
  max-width: 100%;
  margin-top: clamp(0.65rem, 1.1vw, 1rem);
}

.hero-intro p {
  margin: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: clamp(0.72rem, 0.82vw, 0.92rem);
  line-height: 1.52;
}

.hero-intro p + p {
  margin-top: clamp(0.45rem, 0.7vw, 0.7rem);
}

.hero-overlay .button-row {
  margin-top: clamp(0.8rem, 1.25vw, 1.2rem);
  gap: clamp(0.45rem, 0.65vw, 0.7rem);
}

.hero-overlay .button {
  padding: clamp(0.52rem, 0.72vw, 0.72rem) clamp(0.7rem, 1vw, 0.95rem);
  font-size: clamp(0.7rem, 0.78vw, 0.86rem);
}

/* Buttons */
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.78rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(151, 85, 55, 0.35);
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.82);
}

.button.primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.button.primary:hover {
  color: #fff;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

/* Work cards */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.project-card,
.download-card,
.focus-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(30, 25, 18, 0.04);
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body,
.download-card,
.focus-card {
  padding: clamp(1.15rem, 2.4vw, 1.6rem);
}

.project-card h3,
.download-card h3,
.focus-card h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.project-card p,
.download-card p,
.focus-card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

/* Bridge */
.bridge {
  background: rgba(255, 255, 255, 0.35);
  border-block: 1px solid var(--line-soft);
}

.bridge-copy {
  max-width: 900px;
}

.bridge-copy h2 {
  max-width: 780px;
  margin-bottom: 1.4rem;
}

.bridge-copy p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

/* Focus and downloads */
.focus-grid,
.download-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.4rem);
}

.download-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.focus-card {
  min-height: 100%;
}

.focus-card p,
.download-card p {
  margin-bottom: 0;
}

.download-card .button-row {
  margin-top: 1.25rem;
}

/* Contact CTA */
.contact-cta {
  background: var(--surface-soft);
}

.contact-cta .section-inner {
  display: grid;
  gap: 1rem;
  max-width: 860px;
}

.contact-cta p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

/* Footer */
.site-footer {
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  background: #ece8df;
}

.footer-inner {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.footer-title {
  margin: 0 0 0.2rem;
  font-weight: 800;
}

.footer-meta,
.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.copyright {
  margin-top: 1rem;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--accent-dark);
}

/* Placeholder/simple pages */
.page-hero,
.placeholder-page {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.page-hero h1,
.placeholder-page h1 {
  max-width: 880px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.page-hero p,
.placeholder-page p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 1200px) {
  .hero-overlay {
    left: clamp(1.25rem, 5vw, 4rem);
    top: clamp(1.1rem, 3.2vw, 2.8rem);
    width: clamp(270px, 35vw, 460px);
    max-width: 40vw;
  }

  .hero-overlay h1 {
    font-size: clamp(1.45rem, 2.35vw, 2.25rem);
  }

  .hero-intro p {
    font-size: clamp(0.68rem, 0.86vw, 0.84rem);
  }
}

@media (max-width: 980px) {
  .section-header {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 74px;
  }

  .header-inner {
    width: min(100% - 1.25rem, var(--max-width));
    position: relative;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .brand-title {
    font-size: 0.8rem;
  }

  .hamburger {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 1px);
    display: grid;
    gap: 0;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    background: rgba(245, 242, 236, 0.98);
    box-shadow: var(--shadow);
    transform: translateY(-0.75rem);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .site-nav a {
    padding: 0.85rem 0.75rem;
    border-radius: 8px;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.55);
  }

  .lang-link {
    justify-self: start;
    margin-top: 0.2rem;
  }

  .hero-card {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .hero-card::before {
    display: none;
  }

  .hero-card img {
    order: 2;
  }

  .hero-overlay {
    position: static;
    order: 1;
    width: auto;
    max-width: none;
    padding: 1.4rem 1rem 1.6rem;
    background: var(--surface);
  }

  .hero-overlay h1 {
    max-width: none;
    font-size: clamp(1.9rem, 8vw, 2.75rem);
    line-height: 1.08;
  }

  .hero-intro {
    width: auto;
    max-width: none;
    margin-top: 1rem;
  }

  .hero-intro p {
    max-width: none;
    font-size: 0.95rem;
  }

  .hero-overlay .button-row {
    margin-top: 1.25rem;
  }

  .hero-overlay .button {
    font-size: 0.9rem;
    padding: 0.78rem 1rem;
  }

  .section {
    padding-block: 3rem;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .section-inner {
    width: min(100% - 1rem, var(--max-width));
  }

  .button-row {
    align-items: stretch;
  }

  .button-row .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
/* Hero fine-tuning: subtle type increase + safer breakpoint */
@media (min-width: 961px) {
  .hero-overlay h1 {
    max-width: 500px;
    font-size: clamp(2.1rem, 2.55vw, 2.85rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
  }

  .hero-intro {
    max-width: 470px;
    margin-top: 1rem;
  }

  .hero-intro p {
    max-width: 470px;
    font-size: clamp(0.88rem, 0.92vw, 0.98rem);
    line-height: 1.55;
  }

  .hero-intro p + p {
    margin-top: 0.65rem;
  }

  .hero-overlay .button-row {
    margin-top: 1.15rem;
  }

  .hero-overlay .button {
    padding: 0.7rem 0.95rem;
    font-size: 0.9rem;
  }
}

/* Switch before the buttons start overflowing */
@media (max-width: 960px) {
  .hero-card {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .hero-card::before {
    display: none;
  }

  .hero-card img {
    order: 2;
    width: 100%;
    height: auto;
  }

  .hero-overlay {
    position: static;
    order: 1;
    width: auto;
    max-width: none;
    padding: clamp(1.4rem, 4vw, 2rem);
    background: var(--surface);
    transform: none;
  }

  .hero-overlay h1 {
    max-width: 680px;
    font-size: clamp(2.1rem, 6vw, 3rem);
    line-height: 1.08;
  }

  .hero-intro {
    max-width: 640px;
    margin-top: 1rem;
  }

  .hero-intro p {
    max-width: 640px;
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .hero-overlay .button-row {
    margin-top: 1.2rem;
  }
}

/* Mobile refinement */
@media (max-width: 640px) {
  .hero-overlay {
    padding: 1.25rem;
  }

  .hero-overlay h1 {
    font-size: clamp(1.9rem, 8vw, 2.5rem);
  }

  .hero-intro p {
    font-size: 0.95rem;
  }

  .hero-overlay .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-overlay .button {
    width: 100%;
    justify-content: center;
  }
}
/* =========================================================
   Hero as proportional image-card composition
   Desktop/tablet: text scales with the hero card
   Mobile: text stacks above image
   ========================================================= */

   .hero-card-section {
    padding-block: 0 clamp(3rem, 5vw, 4.5rem);
  }
  
  .hero-card {
    container-type: inline-size;
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    box-shadow: none;
  }
  
  .hero-card img {
    display: block;
    width: 100%;
    height: auto;
  }
  
  /* Soft readability gradient over the left side */
  .hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
      90deg,
      rgba(248, 244, 238, 0.98) 0%,
      rgba(248, 244, 238, 0.93) 24%,
      rgba(248, 244, 238, 0.64) 42%,
      rgba(248, 244, 238, 0.18) 64%,
      rgba(248, 244, 238, 0) 100%
    );
  }
  
  /* The whole text block is positioned and sized in relation to the card */
  .hero-overlay {
    position: absolute;
    z-index: 2;
  
    left: 7.5cqw;
    top: 11cqw;
  
    width: 35cqw;
    max-width: none;
  
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
  }
  
  /* H1 scales from the hero card width */
  .hero-overlay h1 {
    margin: 0;
    max-width: none;
  
    font-size: 3.05cqw;
    line-height: 1.06;
    letter-spacing: -0.025em;
  }
  
  /* Copy scales from the same card frame */
  .hero-intro {
    width: 100%;
    max-width: none;
    margin-top: 1.35cqw;
  }
  
  .hero-intro p {
    max-width: none;
    margin: 0;
  
    font-size: 1.02cqw;
    line-height: 1.55;
  }
  
  .hero-intro p + p {
    margin-top: 0.85cqw;
  }
  
  /* Buttons also scale with the card */
  .hero-overlay .button-row {
    margin-top: 1.65cqw;
    gap: 0.75cqw;
  }
  
  .hero-overlay .button {
    padding: 0.78cqw 1.05cqw;
    font-size: 0.88cqw;
  }
  
  /* Slightly tighter proportional layout for medium desktop/tablet widths */
  @media (max-width: 960px) {
    .hero-overlay {
      left: 6cqw;
      top: 9cqw;
      width: 39cqw;
    }
  
    .hero-overlay h1 {
      font-size: 3.25cqw;
    }
  
    .hero-intro p {
      font-size: 1.12cqw;
    }
  
    .hero-overlay .button {
      font-size: 0.98cqw;
      padding: 0.9cqw 1.1cqw;
    }
  }
  
  /* Mobile: stop treating it as one picture because text becomes too small */
  @media (max-width: 640px) {
    .hero-card {
      display: flex;
      flex-direction: column;
      overflow: visible;
    }
  
    .hero-card::before {
      display: none;
    }
  
    .hero-card img {
      order: 2;
    }
  
    .hero-overlay {
      position: static;
      order: 1;
  
      width: auto;
      padding: 1.35rem;
      background: var(--surface);
    }
  
    .hero-overlay h1 {
      font-size: clamp(1.9rem, 8vw, 2.55rem);
      line-height: 1.08;
      letter-spacing: -0.025em;
    }
  
    .hero-intro {
      margin-top: 1rem;
    }
  
    .hero-intro p {
      font-size: 0.95rem;
      line-height: 1.6;
    }
  
    .hero-intro p + p {
      margin-top: 0.65rem;
    }
  
    .hero-overlay .button-row {
      flex-direction: column;
      align-items: stretch;
      margin-top: 1.25rem;
      gap: 0.65rem;
    }
  
    .hero-overlay .button {
      width: 100%;
      justify-content: center;
      font-size: 0.95rem;
      padding: 0.8rem 1rem;
    }
  }
  /* Hero proportional adjustment after screenshot review */
.hero-card-section {
  padding-block: 0 clamp(2.75rem, 4vw, 4rem);
}

.hero-overlay {
  left: 7.5cqw;
  top: 7.2cqw;
  width: 36cqw;
  max-width: none;
}

.hero-overlay h1 {
  font-size: 2.65cqw;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.hero-intro {
  margin-top: 1.05cqw;
}

.hero-intro p {
  font-size: 0.88cqw;
  line-height: 1.5;
}

.hero-intro p + p {
  margin-top: 0.65cqw;
}

.hero-overlay .button-row {
  margin-top: 1.15cqw;
  gap: 0.65cqw;
}

.hero-overlay .button {
  padding: 0.68cqw 0.95cqw;
  font-size: 0.78cqw;
}

/* Keep proportional hero longer on tablet, stack only on narrow screens */
@media (max-width: 960px) {
  .hero-overlay {
    left: 6cqw;
    top: 6.5cqw;
    width: 38cqw;
  }

  .hero-overlay h1 {
    font-size: 2.75cqw;
  }

  .hero-intro p {
    font-size: 0.95cqw;
  }

  .hero-overlay .button {
    font-size: 0.85cqw;
    padding: 0.75cqw 0.95cqw;
  }
}

/* Mobile: switch to readable stacked layout */
@media (max-width: 640px) {
  .hero-card {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .hero-card::before {
    display: none;
  }

  .hero-card img {
    order: 2;
  }

  .hero-overlay {
    position: static;
    order: 1;
    width: auto;
    padding: 1.35rem;
    background: var(--surface);
  }

  .hero-overlay h1 {
    font-size: clamp(1.9rem, 8vw, 2.55rem);
    line-height: 1.08;
  }

  .hero-intro {
    margin-top: 1rem;
  }

  .hero-intro p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .hero-intro p + p {
    margin-top: 0.65rem;
  }

  .hero-overlay .button-row {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.25rem;
    gap: 0.65rem;
  }

  .hero-overlay .button {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
  }
}
/* Mobile hero correction: image first, text second */
@media (max-width: 640px) {
  .hero-card-section {
    padding-block: 0 2.75rem;
  }

  .hero-card {
    display: flex;
    flex-direction: column;
    overflow: visible;
    background: var(--surface);
  }

  .hero-card::before {
    display: none;
  }

  .hero-card img {
    order: 1;
    display: block;
    width: 100%;
    height: auto;
  }

  .hero-overlay {
    position: static;
    order: 2;
    width: auto;
    max-width: none;
    padding: 1.35rem;
    background: var(--surface);
    transform: none;
  }

  .hero-overlay h1 {
    max-width: none;
    font-size: clamp(1.9rem, 8vw, 2.55rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  .hero-intro {
    width: auto;
    max-width: none;
    margin-top: 1rem;
  }

  .hero-intro p {
    max-width: none;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .hero-intro p + p {
    margin-top: 0.65rem;
  }

  .hero-overlay .button-row {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.25rem;
    gap: 0.65rem;
  }

  .hero-overlay .button {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
  }
}

/* Stage 2: Work and case study page styles */
.stage2-main {
  background: var(--bg);
}

.stage2-page-header {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}

.stage2-page-header h1 {
  max-width: 920px;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 1.04;
}

.stage2-intro {
  max-width: 780px;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.stage2-intro p + p {
  margin-top: 0.85rem;
}

.stage2-section {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.work-feature-list {
  display: grid;
  gap: 1.25rem;
}

.work-feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.work-feature-media {
  display: block;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface-soft);
}

.work-feature-media img,
.case-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.work-feature-copy {
  padding: clamp(0.25rem, 1vw, 0.75rem);
}

.work-feature-copy h2,
.stage2-cta h2,
.case-section h2 {
  max-width: 760px;
}

.work-feature-copy p {
  margin-top: 0.75rem;
  color: var(--muted);
}

.stage2-kicker {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.work-feature-copy .stage2-kicker {
  margin-top: 0;
}

.role-note {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.case-preview {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.case-media-grid {
  display: grid;
  gap: 1rem;
}

.case-content-grid {
  display: grid;
  gap: 1rem;
}

.case-section {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.case-section p {
  max-width: 820px;
  margin-top: 0.85rem;
  color: var(--muted);
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.placeholder-panel {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-weight: 700;
}

.stage2-cta-section {
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.stage2-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
}

.stage2-cta p {
  max-width: 680px;
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.76);
}

.stage2-cta .button {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
}

.stage2-cta .button.primary {
  border-color: #fff;
  background: #fff;
  color: var(--text);
}

@media (max-width: 900px) {
  .work-feature-card,
  .stage2-cta {
    grid-template-columns: 1fr;
  }

  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .stage2-cta .button-row {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .stage2-page-header {
    padding-top: 3rem;
  }

  .stage2-page-header h1 {
    font-size: clamp(2.25rem, 10vw, 3.25rem);
  }

  .work-feature-copy {
    padding: 0.25rem;
  }
}


/* =========================================================
   Final merge overrides: navbar logo, tablet menu, mobile hero
   ========================================================= */

/* Ensure the brand logo is visible consistently across all pages */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  gap: 0.05rem;
}

/* Tablet navigation: use hamburger from 960px down */
@media (max-width: 960px) {
  :root {
    --header-height: 74px;
  }

  .header-inner {
    width: min(100% - 1.25rem, var(--max-width));
    position: relative;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .brand-title {
    font-size: 0.8rem;
  }

  .hamburger {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 1px);
    display: grid;
    gap: 0;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    background: rgba(245, 242, 236, 0.98);
    box-shadow: var(--shadow);
    transform: translateY(-0.75rem);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.18s ease, opacity 0.18s ease, visibility 0.18s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .site-nav a {
    padding: 0.85rem 0.75rem;
    border-radius: 8px;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.55);
  }

  .lang-link {
    justify-self: start;
    margin-top: 0.2rem;
  }
}

/* Make <picture> behave like the original hero image on desktop/tablet */
.hero-card picture {
  display: block;
  width: 100%;
}

/* Mobile hero: use dedicated square mobile artwork with smaller overlay */
@media (max-width: 640px) {
  .hero-card-section {
    padding-block: 0 2.5rem;
  }

  .hero-card {
    container-type: inline-size;
    position: relative;
    display: block;
    width: 100%;
    min-height: 152cqw;
    overflow: hidden;
    background: var(--surface);
  }

  .hero-card::before {
    display: block;
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(248, 244, 238, 0.98) 0%,
      rgba(248, 244, 238, 0.94) 38%,
      rgba(248, 244, 238, 0.58) 58%,
      rgba(248, 244, 238, 0.10) 100%
    );
  }

  .hero-card picture {
    display: block;
    width: 100%;
    margin-top: 34cqw;
  }

  .hero-card img {
    display: block;
    width: 100%;
    height: auto;
  }

  .hero-overlay {
    position: absolute;
    z-index: 2;
    left: 6cqw;
    top: 7cqw;
    width: 82cqw;
    max-width: none;
    padding: 0;
    margin: 0;
    background: transparent;
    transform: none;
  }

  .hero-overlay h1 {
    max-width: none;
    margin: 0;
    font-size: 6.1cqw;
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  .hero-intro {
    width: 100%;
    max-width: none;
    margin-top: 2.3cqw;
  }

  .hero-intro p {
    max-width: none;
    margin: 0;
    font-size: 2.55cqw;
    line-height: 1.55;
  }

  .hero-intro p + p {
    margin-top: 1.45cqw;
  }

  .hero-overlay .button-row,
  .hero-overlay .button-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.45cqw;
    margin-top: 2.6cqw;
  }

  .hero-overlay .button {
    width: 100%;
    justify-content: center;
    font-size: 2.65cqw;
    padding: 2.05cqw 2.5cqw;
  }
}

@media (max-width: 420px) {
  .hero-card {
    min-height: 158cqw;
  }

  .hero-card picture {
    margin-top: 38cqw;
  }

  .hero-overlay h1 {
    font-size: 5.85cqw;
  }

  .hero-intro p {
    font-size: 2.48cqw;
  }
}
/* Mobile hero: H1/copy over image, buttons below image */
@media (max-width: 640px) {
  .hero-card-section {
    padding-block: 0 2.5rem;
  }

  .hero-card {
    container-type: inline-size;
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: var(--surface);
  }

  .hero-card::before {
    display: block;
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 1;
    width: 100%;
    height: 62%;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(248, 244, 238, 0.98) 0%,
      rgba(248, 244, 238, 0.9) 38%,
      rgba(248, 244, 238, 0.56) 72%,
      rgba(248, 244, 238, 0) 100%
    );
  }

  .hero-card picture,
  .hero-card > img {
    display: block;
    width: 100%;
    margin-top: 8rem; /* moves image slightly higher */
  }

  .hero-card picture img,
  .hero-card > img {
    display: block;
    width: 100%;
    height: auto;
  }

  /* Remove figcaption box, but keep its children usable */
  .hero-overlay {
    display: contents;
    position: static;
    width: auto;
    max-width: none;
    padding: 0;
    background: transparent;
    transform: none;
  }

  .hero-overlay h1 {
    position: absolute;
    z-index: 2;
    left: 6cqw;
    top: 6cqw;
    width: 82cqw;
    max-width: none;
    margin: 0;

    font-size: 7.2cqw;
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  .hero-intro {
    position: absolute;
    z-index: 2;
    left: 6cqw;
    top: 31cqw;
    width: 82cqw;
    max-width: none;
    margin: 0;
  }

  .hero-intro p {
    max-width: none;
    margin: 10cqw 0 0 0;
    font-size: 3.15cqw;
    line-height: 1.55;
  }

  .hero-intro p + p {
    margin-top: 2.2cqw;
  }

  /* Buttons below image */
  .hero-overlay .button-row {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.45rem;

    width: auto;
    margin: 0;
    padding: 0.95rem 1.35rem 1.35rem;
    background: var(--surface);
  }

  .hero-overlay .button {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    justify-content: center;

    padding: 0.72rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
    text-align: center;
  }
}
/* Mobile hero buttons: compact row with 2-line middle button */
@media (max-width: 640px) {
  .hero-overlay .button-row {
    position: relative;
    z-index: 3;

    display: grid;
    grid-template-columns: 1fr 1.08fr 1fr;
    gap: 1.4cqw;

    width: auto;
    margin: 0;
    padding: 3cqw 6cqw 5cqw;
    background: var(--surface);
  }

  .hero-overlay .button {
    width: 100%;
    min-width: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 2.2cqw 1.1cqw;
    font-size: 3cqw;
    line-height: 1.05;
    text-align: center;
    white-space: nowrap;
  }

  /* Force only the second button to appear on two lines */
  .hero-overlay .button-row .button:nth-child(2) {
    font-size: 0;
    white-space: normal;
    padding: 1.7cqw 1cqw;
  }

  .hero-overlay .button-row .button:nth-child(2)::before {
    content: "Download\A Packaging PDF";
    white-space: pre;
    font-size: 3cqw;
    line-height: 1.08;
    text-align: center;
  }
}
/* Mobile final tuning: hero buttons spacing + project card buttons */
@media (max-width: 640px) {
  /* Hero buttons: reduce bottom space */
  .hero-overlay .button-row {
    padding: 3cqw 6cqw 3cqw;
  }

  .hero-overlay .button {
    font-size: 3cqw;
  }

  .hero-overlay .button-row .button:nth-child(2)::before {
    font-size: 3cqw;
  }

  /* Project cards: keep buttons on same row */
  .project-card .button-row,
  .card-body .button-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.4cqw;
    width: 100%;
    margin-top: 4cqw;
  }

  .project-card .button,
  .card-body .button {
    flex: 1 1 0;
    min-width: 0;
    width: auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 2.2cqw 1.1cqw;
    font-size: 3cqw;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }
}/* Mobile spacing correction: reduce gap after hero */
@media (max-width: 640px) {
  .hero-card-section {
    padding-block: 0 0;
  }

  .hero-card {
    margin-bottom: 0;
  }

  .hero-overlay .button-row {
    padding: 3cqw 6cqw 2.2cqw;
  }

  /* This is the real gap before Selected Work */
  .hero-card-section + .section {
    padding-top: 2rem;
  }
}

/* Homepage bridge + focus cards merge */
.bridge-with-focus {
  max-width: 920px;
}

.bridge-with-focus .bridge-text {
  max-width: 780px;
}

.bridge-with-focus .bridge-text p {
  max-width: 780px;
}

.bridge-focus-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.4rem);
  width: min(100%, 780px);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.bridge-focus-grid .focus-card {
  min-height: 100%;
}

.bridge-focus-grid .focus-card h3 {
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
}

.bridge-focus-grid .focus-card p {
  font-size: 0.98rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .bridge-with-focus,
  .bridge-with-focus .bridge-text,
  .bridge-with-focus .bridge-text p,
  .bridge-focus-grid {
    max-width: none;
    width: 100%;
  }

  .bridge-focus-grid {
    grid-template-columns: 1fr;
    margin-top: 1.75rem;
  }
}


/* =========================================================
   Final mobile hero correction for 640px viewport
   Keeps iPhone-size behavior intact; reduces type only near 640px.
   ========================================================= */
@media (min-width: 561px) and (max-width: 640px) {
  .hero-overlay h1 {
    font-size: 6.35cqw;
    line-height: 1.08;
  }

  .hero-intro {
    top: 30cqw;
  }

  .hero-intro p {
    margin-top: 8cqw;
    font-size: 2.75cqw;
    line-height: 1.52;
  }

  .hero-intro p + p {
    margin-top: 1.7cqw;
  }
}

/* =========================================================
   Stage 3: integrated project visuals + About / Contact pages
   ========================================================= */
.case-hero-image {
  box-shadow: var(--shadow);
}

.case-visual-flow {
  gap: clamp(1rem, 2vw, 1.35rem);
}

.case-section-with-media {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: center;
}

.case-section-with-media:nth-child(even) {
  grid-template-columns: minmax(320px, 1.1fr) minmax(0, 0.9fr);
}

.case-section-with-media:nth-child(even) .case-section-copy {
  order: 2;
}

.case-inline-media,
.case-image-grid figure,
.simple-hero-card {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.case-inline-media img,
.case-image-grid img,
.simple-hero-card img {
  display: block;
  width: 100%;
  height: auto;
}

.case-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.case-image-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-image-caption {
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.case-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.summary-card {
  padding: clamp(1rem, 2vw, 1.35rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-card h2,
.summary-card h3 {
  margin: 0;
  font-size: 1rem;
}

.summary-card p {
  margin-top: 0.55rem;
  color: var(--muted);
}

.simple-hero-section {
  padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.simple-hero-card {
  position: relative;
  border-radius: 0;
  border-inline: 0;
  box-shadow: none;
}

.simple-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(248, 244, 238, 0.98) 0%,
    rgba(248, 244, 238, 0.92) 26%,
    rgba(248, 244, 238, 0.52) 46%,
    rgba(248, 244, 238, 0.12) 68%,
    rgba(248, 244, 238, 0) 100%
  );
}

.simple-hero-copy {
  position: absolute;
  z-index: 2;
  left: 7.5cqw;
  top: 8cqw;
  width: 38cqw;
  max-width: none;
}

.simple-hero-card {
  container-type: inline-size;
}

.simple-hero-copy h1 {
  margin: 0;
  font-size: 3.2cqw;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.simple-hero-copy p {
  margin-top: 1.2cqw;
  color: var(--muted);
  font-size: 1.02cqw;
  line-height: 1.55;
}

.simple-hero-copy .button-row {
  margin-top: 1.6cqw;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.info-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.info-card p,
.info-card li {
  color: var(--muted);
}

.info-card ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.contact-links-large {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.contact-links-large a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  font-weight: 800;
}

@media (max-width: 900px) {
  .case-section-with-media,
  .case-section-with-media:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .case-section-with-media:nth-child(even) .case-section-copy {
    order: initial;
  }

  .case-image-grid,
  .case-image-grid.three-up,
  .case-summary-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .simple-hero-section {
    padding-top: 0;
  }

  .simple-hero-card {
    display: flex;
    flex-direction: column;
    border-radius: 0;
  }

  .simple-hero-card::before {
    display: none;
  }

  .simple-hero-copy {
    position: static;
    width: auto;
    padding: 1.35rem;
    order: 1;
  }

  .simple-hero-card img {
    order: 2;
  }

  .simple-hero-copy h1 {
    font-size: clamp(2rem, 8vw, 2.65rem);
    line-height: 1.08;
  }

  .simple-hero-copy p {
    margin-top: 1rem;
    font-size: 0.95rem;
  }

  .simple-hero-copy .button-row {
    margin-top: 1.25rem;
  }

  .case-section-with-media {
    gap: 1rem;
  }

  .case-inline-media,
  .case-image-grid figure {
    border-radius: 12px;
  }
}


/* =========================================================
   Final requested refinements: page hero sizing, Plintech summary, spacing
   ========================================================= */

/* Keep About / Contact image heroes attached to the navbar like the homepage */
.simple-hero-section {
  padding-top: 0;
}

/* Bring the first homepage section closer to the hero image */
.hero-card-section + .section {
  padding-top: clamp(1.75rem, 3.5vw, 3rem);
}

/* Make non-homepage hero titles closer to the approved homepage hero scale */
.stage2-page-header h1,
.page-hero h1,
.placeholder-page h1 {
  max-width: 760px;
  font-size: clamp(1.55rem, 2.35vw, 2.65rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

/* About / Contact hero titles use the same proportional image-card logic as the homepage */
.simple-hero-copy h1 {
  font-size: 2.65cqw;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.simple-hero-copy p {
  font-size: 0.88cqw;
  line-height: 1.5;
}

/* Plintech summary cards: same dark visual family as the case-study CTA */
.case-summary-grid .summary-card {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.case-summary-grid .summary-card h2,
.case-summary-grid .summary-card h3 {
  color: #fff;
}

.case-summary-grid .summary-card p {
  color: rgba(255, 255, 255, 0.76);
}

@media (max-width: 768px) {
  .stage2-page-header h1,
  .page-hero h1,
  .placeholder-page h1 {
    font-size: clamp(1.9rem, 8vw, 2.55rem);
    line-height: 1.08;
  }
}

@media (max-width: 640px) {
  .hero-card-section + .section {
    padding-top: 1.5rem;
  }

  .simple-hero-copy h1 {
    font-size: clamp(1.9rem, 8vw, 2.55rem);
    line-height: 1.08;
  }

  .simple-hero-copy p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}


/* =========================================================
   Requested refinements: CV, colored focus cards, Plintech overview, red back buttons
   ========================================================= */

:root {
  --dark-red: #7f2f2a;
  --dark-red-hover: #6d251f;
}

/* Homepage focus-card color accents */
.bridge-focus-grid .focus-card {
  border-color: rgba(32, 36, 36, 0.12);
}

.bridge-focus-grid .focus-card:nth-child(1) {
  background: #fff3e8;
}

.bridge-focus-grid .focus-card:nth-child(2) {
  background: #eef4ec;
}

.bridge-focus-grid .focus-card:nth-child(3) {
  background: #edf2f5;
}

.bridge-focus-grid .focus-card:nth-child(4) {
  background: #f4eef3;
}

.bridge-focus-grid .focus-card h3 {
  color: var(--text);
}

.bridge-focus-grid .focus-card p {
  color: rgba(32, 36, 36, 0.72);
}

/* Slightly safer 640px homepage hero typography */
@media (min-width: 561px) and (max-width: 640px) {
  .hero-overlay h1 {
    font-size: 5.75cqw;
    line-height: 1.08;
  }

  .hero-intro {
    top: 28cqw;
  }

  .hero-intro p {
    margin-top: 7cqw;
    font-size: 2.45cqw;
    line-height: 1.5;
  }

  .hero-intro p + p {
    margin-top: 1.4cqw;
  }
}

/* About / Contact heroes now use picture for desktop + mobile art */
.simple-hero-card picture {
  display: block;
  width: 100%;
}

.simple-hero-card picture img {
  display: block;
  width: 100%;
  height: auto;
}

/* Plintech overview visual inserted after intro copy */
.plintech-overview-frame {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plintech-overview-frame picture,
.plintech-overview-frame img {
  display: block;
  width: 100%;
}

/* Dark CTA variant for packaging final download block */
.packaging-download-cta.stage2-cta {
  display: grid;
  gap: 1rem;
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.packaging-download-cta.stage2-cta h2 {
  color: #fff;
}

.packaging-download-cta.stage2-cta p {
  color: rgba(255, 255, 255, 0.76);
}

/* Dark red back buttons inside final CTA cards */
.button.danger,
.stage2-cta .button.danger,
.packaging-download-cta .button.danger {
  color: #fff;
  border-color: var(--dark-red);
  background: var(--dark-red);
}

.button.danger:hover,
.stage2-cta .button.danger:hover,
.packaging-download-cta .button.danger:hover {
  color: #fff;
  border-color: var(--dark-red-hover);
  background: var(--dark-red-hover);
}

.recruiter-cv-card {
  grid-column: 1 / -1;
}

.recruiter-cv-card .button-row {
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  .plintech-overview-frame {
    border-radius: 0;
    margin-inline: calc((100vw - 100%) / -2);
  }
}

/* Final correction: packaging CTA should behave as a single-column card, not a two-column CTA grid. */
.packaging-download-cta.stage2-cta {
  grid-template-columns: 1fr;
  align-items: start;
}

@media (max-width: 640px) {
  .simple-hero-card picture {
    order: 2;
  }
}


/* =========================================================
   Stage 5 corrections: mobile bridge width, hero spacing,
   overview image shadows, and About/Contact mobile overlays
   ========================================================= */

/* Homepage bridge section: keep text/cards aligned with normal mobile content width */
@media (max-width: 640px) {
  .bridge .section-inner.bridge-with-focus {
    width: min(100% - 2rem, var(--max-width));
    margin-inline: auto;
  }

  .bridge-with-focus,
  .bridge-with-focus .bridge-text,
  .bridge-with-focus .bridge-text p,
  .bridge-focus-grid {
    max-width: 100%;
    width: 100%;
  }

  .bridge-copy h2 {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .bridge .section-inner.bridge-with-focus {
    width: min(100% - 1rem, var(--max-width));
  }
}

/* Homepage hero buttons: tighten bottom space under the button row */
@media (max-width: 640px) {
  .hero-overlay .button-row {
    padding: 3cqw 6cqw 1.35cqw;
  }
}

/* Plintech and Packaging overview frames: no shadow, stable responsive behavior */
.plintech-overview-frame,
.packaging-overview-frame {
  box-shadow: none;
}

.packaging-overview-frame picture,
.packaging-overview-frame img {
  display: block;
  width: 100%;
}

@media (max-width: 640px) {
  .plintech-overview-frame,
  .packaging-overview-frame {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .plintech-overview-frame img,
  .packaging-overview-frame img {
    width: 100%;
    max-width: 100%;
  }
}

/* About / Contact mobile heroes: text overlaps the mobile artwork, like homepage */
@media (max-width: 640px) {
  .simple-hero-section {
    padding: 0 0 2.5rem;
  }

  .simple-hero-card {
    container-type: inline-size;
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: var(--surface);
  }

  .simple-hero-card::before {
    display: block;
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 1;
    width: 100%;
    height: 62%;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(248, 244, 238, 0.98) 0%,
      rgba(248, 244, 238, 0.90) 42%,
      rgba(248, 244, 238, 0.50) 74%,
      rgba(248, 244, 238, 0) 100%
    );
  }

  .simple-hero-card picture,
  .simple-hero-card > img {
    display: block;
    width: 100%;
    margin-top: 0;
  }

  .simple-hero-card picture img,
  .simple-hero-card > img {
    display: block;
    width: 100%;
    height: auto;
  }

  .simple-hero-copy {
    position: absolute;
    z-index: 2;
    left: 6cqw;
    top: 7cqw;
    width: 82cqw;
    max-width: none;
    padding: 0;
    margin: 0;
    background: transparent;
  }

  .simple-hero-copy .eyebrow {
    margin-bottom: 3cqw;
  }

  .simple-hero-copy h1 {
    max-width: none;
    margin: 0;
    font-size: 7.2cqw;
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  .simple-hero-copy p {
    max-width: none;
    margin-top: 4cqw;
    font-size: 3.15cqw;
    line-height: 1.55;
  }

  .simple-hero-copy .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4cqw;
    margin-top: 4cqw;
  }

  .simple-hero-copy .button {
    width: 100%;
    min-width: 0;
    padding: 2.2cqw 1.1cqw;
    font-size: 3cqw;
    line-height: 1.05;
    white-space: nowrap;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .simple-hero-copy h1 {
    font-size: 6.35cqw;
  }

  .simple-hero-copy p {
    font-size: 3cqw;
  }
}

/* Keep Contact mobile hero buttons compact enough inside the image area */
@media (max-width: 420px) {
  .simple-hero-copy .button {
    font-size: 2.85cqw;
  }
}


/* =========================================================
   Stage 6 corrections: overview outlines/margins and mobile hero actions
   ========================================================= */

/* Plintech overview: remove the visible frame/outline completely. */
.plintech-overview-frame {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* Packaging overview: reduce the vertical air around the overview image. */
.packaging-overview-section {
  padding-top: clamp(0.75rem, 1.6vw, 1.25rem);
  padding-bottom: clamp(0.85rem, 1.8vw, 1.35rem);
}

.packaging-overview-frame {
  margin-top: 0;
  margin-bottom: 0;
  box-shadow: none;
}

/* Contact hero buttons are separate from the copy so they can overlay on desktop
   and move below the image on mobile, matching the homepage behavior. */
.contact-hero-card .simple-hero-actions {
  position: absolute;
  z-index: 3;
  left: 7.5cqw;
  top: 27.5cqw;
  width: 38cqw;
  display: flex;
  gap: 0.85rem;
  margin: 0;
}

.contact-hero-card .simple-hero-actions .button {
  flex: 1 1 0;
  justify-content: center;
}

@media (max-width: 640px) {
  /* About / Contact: pull the mobile artwork lower, while keeping the copy above it. */
  .simple-hero-card picture,
  .simple-hero-card > img {
    margin-top: 34cqw;
  }

  .simple-hero-copy {
    top: 7cqw;
  }

  .simple-hero-copy p {
    margin-top: 3.4cqw;
  }

  /* Contact: buttons below the image, not over the artwork. */
  .contact-hero-card .simple-hero-actions {
    position: relative;
    z-index: 3;
    left: auto;
    top: auto;
    width: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4cqw;
    margin: 0;
    padding: 3cqw 6cqw 2.2cqw;
    background: var(--surface);
  }

  .contact-hero-card .simple-hero-actions .button {
    width: 100%;
    min-width: 0;
    padding: 2.2cqw 1.1cqw;
    font-size: 3cqw;
    line-height: 1.05;
    white-space: nowrap;
    text-align: center;
  }

  .packaging-overview-section {
    padding-top: 0.65rem;
    padding-bottom: 0.75rem;
  }

  .packaging-overview-frame {
    margin-top: 0;
    margin-bottom: 0;
  }
}

@media (max-width: 420px) {
  .simple-hero-card picture,
  .simple-hero-card > img {
    margin-top: 38cqw;
  }
}


/* =========================================================
   Stage 7 corrections: About/Contact mobile hero image spacing
   ========================================================= */

/*
  Adjustment classes for mobile hero artwork position:
  - About page:   .about-hero-card picture
  - Contact page: .contact-hero-card picture

  Lower margin-top = image moves UP, reducing the gap between copy and drawing.
  Higher margin-top = image moves DOWN, increasing the gap.
*/
@media (max-width: 640px) {
  .about-hero-card picture,
  .about-hero-card > img {
    margin-top: 30cqw;
  }

  .contact-hero-card picture,
  .contact-hero-card > img {
    margin-top: 24cqw;
  }
}

@media (max-width: 420px) {
  .about-hero-card picture,
  .about-hero-card > img {
    margin-top: 33cqw;
  }

  .contact-hero-card picture,
  .contact-hero-card > img {
    margin-top: 27cqw;
  }
}

/* =========================================================
   Stage 9 correction: Romanian mobile homepage hero spacing
   Keeps the H1 typography identical to the English homepage.
   Only pushes the Romanian copy and artwork slightly lower.

   Manual adjustment points:
   - Copy position: html[lang="ro"] .hero-intro { top: ... }
   - Copy first paragraph gap: html[lang="ro"] .hero-intro p { margin-top: ... }
   - Image position: html[lang="ro"] .hero-card picture { margin-top: ... }
   Lower values move elements UP; higher values move elements DOWN.
   ========================================================= */
@media (max-width: 640px) {
  html[lang="ro"] .hero-intro {
    top: 39cqw;
  }

  html[lang="ro"] .hero-intro p {
    margin-top: 6.5cqw;
  }

  html[lang="ro"] .hero-intro p + p {
    margin-top: 2cqw;
  }

  html[lang="ro"] .hero-card picture,
  html[lang="ro"] .hero-card > img {
    margin-top: 48cqw;
  }
}

@media (max-width: 420px) {
  html[lang="ro"] .hero-intro {
    top: 40cqw;
  }

  html[lang="ro"] .hero-card picture,
  html[lang="ro"] .hero-card > img {
    margin-top: 50cqw;
  }
}

/* =========================================================
   Stage 11 correction: Packaging category images extra wide
   Applies only to Packaging category sections, not the overview image. Adds roughly another 10–15% width over Stage 10.
   ========================================================= */
.packaging-overview-section + .case-content .case-section-with-media {
  grid-template-columns: minmax(0, 0.5fr) minmax(460px, 1.5fr);
  gap: clamp(1.25rem, 3.2vw, 2.25rem);
}

.packaging-overview-section + .case-content .case-section-with-media:nth-child(even) {
  grid-template-columns: minmax(460px, 1.5fr) minmax(0, 0.5fr);
}

.packaging-overview-section + .case-content .case-section-with-media .case-inline-media {
  align-self: stretch;
}

.packaging-overview-section + .case-content .case-section-with-media .case-inline-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .packaging-overview-section + .case-content .case-section-with-media,
  .packaging-overview-section + .case-content .case-section-with-media:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .packaging-overview-section + .case-content .case-section-with-media .case-inline-media img {
    height: auto;
    object-fit: initial;
  }
}
