/* Optimaaya responsive refinement: desktop, tablet and mobile */
:root {
  --grid-margin: clamp(18px, 4vw, 64px);
  --grid-gutter: clamp(0px, 1vw, 16px);
}
html, body, #root { width: 100%; min-width: 320px; }
html { overflow-x: clip; }
body { overflow-x: clip; }
img, video, canvas, svg { max-width: 100%; }
button, input, select, textarea { max-width: 100%; }
section, main, header, footer { min-width: 0; }
.hero, .grid12 { min-width: 0; }
.headline, .section-title, .persp-title, .wwd-title { overflow-wrap: anywhere; }
.hero-card { min-width: 0; }
.hero-card figure, .hero-card img { max-width: 100%; }
.nav { max-width: 1440px; }
.section { scroll-margin-top: calc(var(--nav-height) + 20px); }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; min-width: 0; }
.contact-form button, .contact-form .btn { min-height: 44px; }
a, button { -webkit-tap-highlight-color: transparent; }

@media (min-width: 1441px) {
  .hero-shell, main, .section, .footer-inner { max-width: 1920px; margin-inline: auto; }
}

@media (max-width: 1200px) {
  :root { --grid-margin: clamp(20px, 3.5vw, 40px); }
  .nav { left: var(--grid-margin); right: var(--grid-margin); }
  .persp-top, .persp-cards { grid-column: 1 / -1; }
  .persp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collab-intro, .founders, .contact-intro, .contact-form { grid-column: 1 / -1; }
  .founders { margin-top: 24px; }
}

@media (max-width: 900px) {
  :root { --grid-margin: clamp(16px, 3.8vw, 28px); --nav-height: 72px; }
  .nav {
    top: max(12px, env(safe-area-inset-top));
    left: var(--grid-margin);
    right: var(--grid-margin);
    height: 48px;
    padding: 0 6px 0 16px;
  }
  .brand-logo { height: 21px; max-width: min(42vw, 190px); }
  .nav-right { gap: 8px; }
  .menu-toggle { width: 40px; height: 40px; flex: 0 0 40px; }
  .nav-links { z-index: 12; }
  .menu-open .nav-links { max-height: min(70vh, 420px); overflow-y: auto; }
  .hero-shell { padding-top: var(--nav-height); }
  .hero-top { padding: clamp(42px, 8vw, 72px) 0 30px; }
  .headline { max-width: 16ch; font-size: clamp(42px, 8vw, 68px); line-height: .98; }
  .lede { width: min(100%, 42ch); padding-inline: 8px; font-size: 15px; }
  .hero-work { margin-top: 20px; }
  .hero-card { flex-basis: min(82vw, 560px); }
  .hero-card img { aspect-ratio: 4 / 3; }
  .section { padding-block: clamp(52px, 8vw, 76px); }
  .section-title, .persp-title { max-width: 19ch; font-size: clamp(36px, 6vw, 48px); }
  .persp-top { gap: 18px; }
  .persp-cards { gap: 12px; }
  .persp-card { padding: clamp(20px, 4vw, 27px); }
  .wwd-head { width: calc(100% - 2 * var(--grid-margin)); }
  .wwd-stack .scroll-stack__inner { padding-inline: var(--grid-margin); }
  .wwd-stack .scroll-stack-card.wwd-card { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wwd-card-body { padding: clamp(20px, 3vw, 30px); }
  .wwd-card-title { font-size: clamp(30px, 5vw, 42px); }
  .contact-stage { padding-inline: var(--grid-margin); }
  .contact-body { max-width: 100%; }
  .footer-bottom { padding-inline: var(--grid-margin); }
}

@media (max-width: 640px) {
  :root { --grid-margin: 18px; --grid-gutter: 0px; --nav-height: 66px; }
  .grid-overlay { display: none; }
  .nav { top: max(10px, env(safe-area-inset-top)); height: 46px; border-radius: 24px; }
  .brand-logo { height: 19px; max-width: 46vw; }
  .hero-top { padding: 42px 0 22px; }
  .headline { max-width: 13ch; font-size: clamp(38px, 10vw, 54px); line-height: .98; }
  .lede { max-width: 34ch; margin-top: 16px; font-size: 14px; line-height: 1.55; }
  .btn-square { min-height: 46px; padding: 12px 19px; font-size: 13px; }
  .hero-work { margin-inline: calc(var(--grid-margin) * -1); }
  .hero-track { --card-gap: 12px; }
  .hero-card { flex-basis: 88vw; padding: 8px; border-radius: 22px; }
  .hero-card figure { border-radius: 16px; }
  .hero-card-title { font-size: 21px; }
  .hero-tags li { padding: 6px 9px; }
  .section { padding-block: 48px; }
  .section-label { font-size: 11px; }
  .section-title, .persp-title { max-width: 16ch; font-size: clamp(34px, 9vw, 43px); line-height: 1; }
  .section-lede, .persp-lede { font-size: 14px; line-height: 1.55; }
  .persp-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .persp-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 24px; }
  .persp-card { border-radius: 22px; padding: 22px; }
  .persp-card-icon { width: 52px; height: 52px; }
  .persp-card h3 { margin-top: 28px; font-size: 26px; min-height: 0; }
  .collab-intro, .founders, .contact-intro, .contact-form { grid-column: 1 / -1; min-width: 0; }
  .founder { gap: 12px; }
  .founder-avatar { width: 52px; height: 52px; }
  .wwd { padding-bottom: 42px; }
  .wwd-title { max-width: 17ch; font-size: clamp(32px, 8.5vw, 42px); }
  .wwd-stack { margin-top: 26px; }
  .wwd-stack .scroll-stack__inner { width: 100%; padding-inline: var(--grid-margin); }
  .wwd-stack .scroll-stack__slot { position: relative !important; top: auto !important; }
  .wwd-stack .scroll-stack-card.wwd-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    margin-bottom: 14px;
    border-radius: 22px;
    transform: none !important;
  }
  .wwd-card-body { padding: 22px; }
  .wwd-card-title { margin-top: 36px; font-size: 34px; }
  .wwd-card-text { font-size: 14px; line-height: 1.5; }
  .wwd-card-tags { margin-top: 16px; }
  .wwd-card-art { min-height: 210px; aspect-ratio: 16 / 10; }
  .scroll-stack-card { height: auto; padding: 22px; }
  .contact-stage { padding: 10px 0; }
  .contact-body { width: 100%; padding: 18px; border-radius: 22px; }
  .contact-form { margin-top: 20px; padding: 0; }
  .contact-form-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .contact-form input, .contact-form textarea, .contact-form select { min-height: 46px; font-size: 16px; }
  .contact-form textarea { min-height: 120px; }
  .footer-brand, .footer-nav, .footer-contact, .footer-bottom p { grid-column: 1 / -1; }
  .footer-contact { justify-self: start; }
  .footer-bottom p { font-size: 11px; line-height: 1.5; }
}

@media (max-width: 380px) {
  :root { --grid-margin: 14px; }
  .headline { font-size: 37px; }
  .hero-card { flex-basis: 91vw; }
  .hero-card-head { padding-left: 8px; }
  .hero-card-title { font-size: 19px; }
  .wwd-card-title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track { animation: none; }
  .hero-card img, .persp-card, .menu-toggle span { transition: none; }
}
