/* styles.css
*/

:root {
  --bg: #0b0f14;
  --card: #101824;
  --text: #e6edf3;
  --muted: #b3c2d1;
  --line: rgba(255, 255, 255, .10);
  --accent: #7dd3fc;

  --max: 1100px;
  --r: 16px;

  /* Single source of truth for when desktop nav collapses */
  --nav-collapse: 980px;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

html,
body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(125, 211, 252, .10), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(167, 139, 250, .10), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

a:hover {
  opacity: .95
}

.card,
p,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px
}

body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background: radial-gradient(800px 500px at 50% 15%, rgba(255,255,255,.06), transparent 60%);
  opacity:.6;
  z-index:-1;
}

.faq-list{max-width: 820px;}
@media (min-width: 981px){
  .faq-list{margin-left:auto; margin-right:auto;}
}

details.faq summary{
  cursor:pointer;
  font-weight:700;
  color:var(--text);
  list-style:none;
  padding-right: 18px;
  position:relative;
}
details.faq summary::-webkit-details-marker{display:none}

details.faq summary:after{
  content:" ⌄";
  position:relative;
  right:0;
  top:0;
  color:var(--muted);
}
details.faq[open] summary:after{content:" ⌃"}

details.faq p{
  margin:10px 0 0;
  color:var(--muted);
}


.row {
  display: flex;
  gap: 18px;
  align-items: center
}

.wrap {
  flex-wrap: wrap
}

.between {
  justify-content: space-between
}

/* ---------------- Header / Nav ---------------- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, .78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 68px;
}

/* Make sure the header row is actually flex and can shrink items safely */
.container.nav.row {
  gap: 12px;
  /* tighter header spacing */
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  min-width: 0;
  /* allows flex shrink */
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 8px
}

.logo {
  border-radius: 8px
}

.brand .name {
  letter-spacing: .2px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* Desktop nav */
header .container.nav > nav {
  white-space: nowrap;
  min-width: 0;
}

nav a {
  color: var(--muted);
  padding: 8px 8px;
  /* tighter to fit more often */
  border-radius: 10px;
}

nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, .06)
}

nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06)
}

/* Hamburger */
.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  padding: 10px 0 16px;
}

.mobile-nav a {
  display: block;
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--muted)
}

.mobile-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, .06)
}

.mobile-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06)
}

/* Hide the badge earlier to prevent header crowding (tablet widths) */
@media (max-width: 1180px) {
  .badge {
    display: none
  }
}

/* Collapse desktop nav into hamburger */
@media (max-width: 1120px) {
  header .container.nav > nav {
    display: none
  }

  .menu-btn {
    display: inline-flex
  }

  .mobile-nav.show {
    display: block
  }

  .grid.cols-3 {
    grid-template-columns: 1fr
  }

  .grid.cols-2 {
    grid-template-columns: 1fr
  }
}

/* ---------------- Hero / Buttons ---------------- */

.hero {
  padding: 60px 0 26px;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(230,237,243,.85);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  margin: 0 0 12px;
}

.hero-index{
  padding-top: 20px;
}

.grid.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hero h1 {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  margin: 0 0 12px;
}

.hero p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 70ch;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.contact-address{
  max-width: 820px;
  margin: 10px auto 0;
  text-align: center;
  opacity: .85;
}

/* Kicker spacing inside project cards */
.project .kicker{
  margin: 0 0 10px; /* was effectively tight/implicit */
}

/* If you want even more separation from the paragraph that follows */
.project p:not(.kicker){
  margin-top: 0; /* keep paragraphs tight */
}

.contact-address strong{ color: var(--text); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-weight: 600;
  transition: transform .15s, filter .15s, border-color .15s;
}

.btn.primary {
  background: linear-gradient(135deg, rgba(125, 211, 252, .22), rgba(167, 139, 250, .18));
  border-color: rgba(125, 211, 252, .35);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05)
}

/* ---------------- Layout / Cards ---------------- */

.section {
  padding: 34px 0;
}

.section+.section {
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: .2px;
}

.kicker {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px
}

.grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

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

.card {
  position: relative;
  background: rgba(16, 24, 36, .80);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: transform .15s, border-color .15s, filter .15s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0));
  opacity: .7;
}

.card:hover {
  border-color: rgba(255, 255, 255, .18);
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px
}

.card p {
  margin: 0;
  color: var(--muted)
}

/* ---------------- Projects / Chips ---------------- */

.project {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

/* CHANGE this existing block */
.project img {
  /* delete width/height here, keep border/background if you want */
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px
}

.chip {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}

@media (max-width: 520px) {
  .project {
    flex-direction: column
  }

  .project img {
    width: 100%;
    height: auto
  }
}

/* Project logos should not be forced into screenshot sizing */
.project img.logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 10px;
}

/* Screenshot-style images (if you have them) should use a different class */
.project img.preview {
  width: 120px;
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
}

/* ---------------- Separators / Footer ---------------- */

hr.sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0
}

footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------- Forms ---------------- */

form {
  display: grid;
  gap: 12px
}

label {
  font-size: 13px;
  color: var(--muted)
}

input,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
}

textarea {
  min-height: 140px;
  resize: vertical
}

.small {
  font-size: 12px;
  color: var(--muted)
}

.notice {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--muted)
}

.notice.ok {
  border-color: rgba(34, 197, 94, .35)
}

.notice.err {
  border-color: rgba(239, 68, 68, .35)
}

/* --- Services hero split --- */
.hero-split {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 16px;
  align-items: start;
}

.hero-card {
  padding: 18px
}

.grid.cols-1 {
  grid-template-columns: 1fr
}

/* Softer inner cards (used in services hero) */
.card.soft {
  background: rgba(255, 255, 255, .03);
  box-shadow: none;
}

.card.soft:before {
  display: none
}

.card.soft:hover {
  transform: none;
  filter: none
}

/* Responsive */
@media (max-width: 980px) {
  .hero-split {
    grid-template-columns: 1fr
  }
}

/*Contact-specific layout helpers*/
.contact-form-grid{grid-template-columns: repeat(2, minmax(0,1fr));}
.contact-details-grid{grid-template-columns: repeat(3, minmax(0,1fr));}

@media (max-width: 860px){
  .contact-form-grid{grid-template-columns:1fr;}
  .contact-details-grid{grid-template-columns:1fr;}
}



/* Contact layout — single centered column */
.contact-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  align-items:start;
  max-width: 820px;
  margin: 0 auto;
}
/* Center details under the form */
.contact-details-centered{
  max-width: 820px;
  margin: 16px auto 0;
  text-align: center;
}
/* Modal (more readable) */
.modal{
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(920px, calc(100vw - 24px));
}

.modal::backdrop{
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}

/* Modal surface: opaque enough to read */
.modal-inner{
  max-height: min(86vh, 920px);
  overflow: auto;

  background: rgba(16, 24, 36, .96);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
    outline: 1px solid rgba(255,255,255,.06);
}

/* optional: slightly reduce the glossy overlay inside modals */
.modal-inner::before{
  opacity: .35;
}

/* -------- Modal gallery layout -------- */
#pmGallery{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

#pmGallery img{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  object-fit: cover;
}

/* Tablet */
@media (max-width: 1024px){
  #pmGallery{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ps-block{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}

.ps-divider{
  flex:0 0 auto;
  padding-top: 35px;  
  padding-right: 30px; 
  color: var(--accent);
  font-size: 48px;
  font-weight: 700;
  opacity: .85;
}

/* Highlights row: match Problem/Solution two equal columns */
.hi-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* Left column */
.hi-main{
  grid-column: 1;
  min-width: 0;
}

/* Align the top of both columns in the Highlights row */
.ps-block--hi .ps-item > h4{
  margin: 0 0 8px; /* matches your JS header margin */
}

.ps-block--hi #pmUseCases h4{
  margin: 0 0 8px; /* safety: enforce same header spacing */
}

/* Also remove default UL top margin so the list doesn't push down */
.ps-block--hi .bullets{
  margin: 0;
}
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.page-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  object-position: 50% 60%; /* 0% = top, 50% = center, 100% = bottom */
}

.page-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

/* Ensure header/main read well */
header, main, footer {
  position: relative;
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .page-bg-video { display: none; }
  .page-bg {
    background: url("../assets/hero.jpg") center/cover no-repeat;
  }
}

/* Pilot card: make it feel like a "next step" */
.pilot {
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.pilot h2 {
  letter-spacing: -0.02em;
}

.pilot p {
  max-width: 70ch;
}

/* Right column: both share the same cell */
#pmUseCases,
#pmQrWrap{
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-width: 0;
}

/* QR should sit at the left edge of the right column, not pushed outward */
#pmQrWrap{
  justify-self: start;   /* important: was end */
  text-align: center;
  width: 140px;
}

/* If pmUseCases is empty, hide it */
#pmUseCases:empty{
  display: none;
}

@media (max-width: 640px){
  .hi-row{ grid-template-columns: 1fr; }
  #pmUseCases, #pmQrWrap{
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

@media (max-width: 640px){
  .hero{ padding: 34px 0 18px; }
}

@media (max-width: 640px){
  .card{ padding: 16px; }
  .btn{ width: 100%; } /* optional: improves tap targets */
}


.hi-qr{
  width: 170px;
  text-align:center;
  padding:10px;
  border-radius:14px;
}

/* About: centered single column layout */
.about-wrap{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  max-width: var(--max);   /* was 920px */
  margin: 0 auto;
}

/* fixed square that clips */
.avatar{
  width:56px;
  height:56px;
  border-radius:16px;
  overflow:hidden;                 /* critical */
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  flex:0 0 auto;
}

/* image fills wrapper; scale affects only image pixels */

.avatar-img{
  width:170%;
  height:170%;
  display:block;
  object-fit:cover;

  /* default crop center */
  object-position: 40% 50%;
}

/* zoom presets */
.avatar-zoom-120{ transform: scale(1.25); }
.avatar-zoom-95 { transform: scale(1); }

/* Make “chips that are links” look clickable */
.link-chip{
  border-color: rgba(125,211,252,.28);
  background: rgba(125,211,252,.08);
  color: var(--text);
}

.link-chip:hover{
  filter: brightness(1.08);
}

/* Ensure soft cards don’t stretch oddly */
.about-people .card.soft{
  height:100%;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.9;
}

.lang-switch a {
  text-decoration: none;
}

.lang-switch .sep {
  opacity: 0.5;
}

/* Hide desktop switch on small screens if needed */
@media (max-width: 1120px) {
  .lang-switch { display: none; }
  .lang-switch.mobile { display: flex; margin-top: 12px; }
}

.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(16, 24, 36, 0.95);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 8px 34px 8px 10px;
  font: inherit;
  line-height: 1.2;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.lang-switch select:focus {
  outline: 2px solid rgba(255,255,255,0.25);
  outline-offset: 2px;
}

.lang-switch select option {
  background-color: #101824;
  color: var(--text);
}

/* visually-hidden utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Hide desktop select when menu button shows; keep mobile inside menu */
@media (max-width: 1120px) {
  .lang-switch { display: none; }
  .lang-switch.mobile { display: block; margin-top: 12px; }
}

.ta-wrap {
  position: relative;
  margin-bottom: 24px; /* reserve space for status below */
}

.ta-wrap textarea {
  padding-right: 180px;
  padding-bottom: 54px;
}

/* Mic button */
.mic-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  top: auto !important;
  height: 40px;
  min-width: 120px;
  max-width: 160px;
  padding: 0 12px;
  border-radius: 999px;
  z-index: 3;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mic-btn .mic-ic {
  width: 18px;
  text-align: center;
  flex: 0 0 auto;
}

.mic-btn .mic-txt {
  min-width: 56px;
  text-align: center;
}

.mic-btn:hover {
  background: rgba(255,255,255,0.10);
}

.mic-btn.recording {
  border-color: rgba(255,80,80,0.55);
}

.mic-btn.disabled,
.mic-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Status sits below textarea, not inside layout flow */
.voice-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  margin: 0;
  text-align: left;
  opacity: 0.9;
  pointer-events: none;
}

/* Note stays below the whole field */
.voice-note {
  opacity: 0.7;
  margin-top: 6px;
  text-align: right;
}

@media (max-width: 520px) {
  .ta-wrap {
    margin-bottom: 24px;
  }

  .ta-wrap textarea {
    padding-right: 64px;
    padding-bottom: 56px;
  }

  .mic-btn {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    right: 10px;
    bottom: 10px;
  }

  .mic-btn .mic-txt {
    display: none;
  }

  .voice-status {
    text-align: left;
    bottom: -20px;
  }

  .voice-note {
    text-align: left;
  }
}

.form-helper {
  margin: 4px 0 10px;
  opacity: 0.85;
}

.hi-qr img{
  width:120px;
  height:120px;
  object-fit:contain;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  margin:0 auto;
}

@media (max-width: 760px){
  .hi-row{ grid-template-columns: 1fr; }
  .hi-qr{ width: 100%; text-align:center; display:flex; gap:12px; align-items:center; }
  .hi-qr img{ width:84px; height:84px; margin:0; }
}

.ps-item h3{
  margin:0 0 6px;
  font-size: 12px;
  min-width: 0;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ps-item p{ margin:0; }

.ps item{
  flex:1 1 0;
  min-width:0; 
}

/* Mobile: stack vertically and center the arrow */
@media (max-width: 640px){
  .ps-block{
    grid-template-columns: 1fr;
  }
  .ps-divider{
    text-align:center;
    padding: 6px 0;
  }
}

/* Mobile */
@media (max-width: 640px){
  #pmGallery{
    grid-template-columns: 1fr;
  }
}

.modal[open] ~ *{
  /* nothing, dialog is top layer; rule is here to show intent */
}

@media (max-width: 980px){
  .contact-layout{grid-template-columns:1fr;}
  .contact-side-card{position:static;}
}

/* Form feels less “stretched” */
textarea{min-height:120px;}
@media (min-width: 981px){
  textarea{min-height:150px;}
}

/* -------- Modal text color normalization -------- */
.modal,
.modal *{
  color: var(--text);
}

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

.modal h1,
.modal h2,
.modal h3{
  color: var(--text);
}

.modal .kicker{
  color: var(--muted);
}

.modal strong{
  color: var(--text);
  font-weight: 600;
}

/* Chips + links inside modal */
.modal .chip{
  color: var(--muted);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
}

.modal a.chip{
  color: var(--text);
}

/* Bullets inside modal */
.modal .bullets{
  color: var(--muted);
  padding-left: 18px; 

}

.modal .bullets li::marker{
  color: rgba(255,255,255,.35);
}

/* Click affordance */
#pmGallery img{
  cursor: zoom-in;
}

/* Lightbox */
#imgModal{
  border:0;
  padding:0;
  background:transparent;
  max-width: min(980px, calc(100vw - 24px));
}

.img-modal-inner{
  background: rgba(16,24,36,.98);
}

.img-stage{
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

#imFull{
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}

.img-nav{
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

@media (max-width: 640px){
  .img-stage{
    grid-template-columns: 1fr;
  }
  .img-nav{
    width: 100%;
    height: auto;
    padding: 10px 12px;
  }
}

/* === MOBILE REFINEMENTS (after everything else) =============== */

/* 1) Global spacing tweaks */
@media (max-width: 640px){
  .hero { padding: 46px 0 22px; }            /* slightly tighter */
  .section{ padding: 28px 0; }
  .actions{ gap: 10px; }
  .btn{ width: 100%; max-width: 420px; }     /* full-width but capped */
}

/* 2) Headline scales down more aggressively */
@media (max-width: 480px){
  .hero h1{ font-size: clamp(22px, 8vw, 34px); }
}

@media (max-width: 760px){
  .hi-qr{
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
  }

  .hi-qr img{
    width: 84px;
    height: 84px;
    margin: 0 auto;
  }
}

/* 3) Grids collapse earlier so cards get breathing room */
@media (max-width: 640px){
  .grid.cols-3,
  .grid.cols-2{
    grid-template-columns: 1fr;
  }
  /* project cards – allow image to shrink */
  .project img{ width: 100%; height: auto; }
}

/* 4) Form grid – single column on small phones */
@media (max-width: 480px){
  .contact-form-grid{ grid-template-columns: 1fr; }
}

/* 5) Modal – arrow & side panel behaviour */
@media (max-width: 640px){
  /* hide decorative arrow */
  .ps-divider{ display:none; }
  /* QR / use-cases stack under highlights */
  #pmUseCases,
  #pmQrWrap{
    #pmQrWrap{ display:none !important; }
  }
}

/* About: story block readability */
.story-grid {
  align-items: start;
}

.story-text {
  padding: 14px;
}

.story-text p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.story-text p:last-child {
  margin-bottom: 0;
}

.story-photo figure {
  margin: 0;
}

/* Improve readability for longer translations */
.card h3 { line-height: 1.25; }
.card p { line-height: 1.55; }
.project { gap: 12px; }

.story-photo img {
  width: 100%;
  height: 380px;          /* fixed height gives predictable cropping */
  object-fit: cover;      /* keeps it fill */
  object-position: 50% 35%; /* move crop window up/down; 25% shows more top */
  border-radius: 12px;
  display: block;
  transform: scale(0.83); /* zoom out slightly */
  transform-origin: center;
}

.story-proof {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  gap: 10px;
}

.story-proof-item .kicker {
  margin: 0 0 4px;
}

.story-proof-item .small {
  margin: 0;
  opacity: 0.9;
}
@media (max-width: 820px) {
  .story-photo img {
    max-height: 240px;
  }
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(0px);
  transform: scale(1.02); /* avoids edge gaps on some browsers */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55); /* ensures text readability */
}

.hero > *:not(.hero-media) {
  position: relative;
  z-index: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
  .hero-media {
    background: url("../assets/hero.jpg") center/cover no-repeat;
  }
}

.ps-divider{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top: 56px;
  padding-right: 0;
  font-size: 0;          /* hides the literal HTML arrow text */
  color: transparent;    /* extra safety */
}

.ps-divider::before{
  content:"->";
  font-size: 34px;
  color: var(--accent);
  line-height: 1;
}

/* Mobile modal header: pin X top-right, prevent overlap */
@media (max-width: 640px){
  .modal-inner .row.between{
    position: relative;
    align-items: flex-start;
  }

  .modal-inner #pmTitle{
    padding-right: 52px; /* reserve space for the X */
    line-height: 1.1;
  }

  .mobile-nav .lang-switch.mobile{
  margin: 6px 0 16px;
}

.mobile-nav{
  padding: 12px 0 18px;
}

  .modal-inner .pm-close{
    position: absolute;
    top: 0;
    right: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
  }
}

@media (max-width: 640px){
  .project { gap: 10px; }
  .card { padding: 16px; }
  .card h3 { margin-bottom: 6px; }
  .kicker { margin-bottom: 8px; }
}

.card h3 { line-height: 1.25; }
.kicker { line-height: 1.35; }

/* Modal header: pin close top-right always */
.modal-inner .row.between {
  position: relative;
  align-items: flex-start;
}

.what-card { padding: 20px; }
.what-card h3 { font-size: 16px; margin-bottom: 8px; }
.what-card p { margin-bottom: 12px; }
.what-proof{
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: var(--text);
  opacity: .9;
}

.modal-inner #pmTitle {
  padding-right: 72px; /* reserve space for close */
}

.pm-close{
  position:absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  .modal-inner .row.between{
  position: relative;
  align-items: flex-start;
  padding-right: 52px; /* reserve for X button */
}
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items:center;
  justify-content:center;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.risk-strip { padding: 20px; }
.risk-grid .card.soft { padding: 16px; }
.risk-grid h3 { margin: 0 0 6px; }
.risk-grid p { margin: 0; }
/* Risk strip: add breathing room between header/kicker and cards */
.risk-head{
  margin-bottom: 16px;
}

/* Optional: slightly more card separation inside risk strip */
.risk-grid{
  gap: 18px; /* default grid gap is 16px */
}

.pm-close::before{ content:"x"; } /* ASCII */

/* Index page: tighten the first section after the hero */
.hero-index + .section{
  padding-top: 6px; /* was 34px */
}

.cta-subtext{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  max-width: 70ch;
}

/* Mobile: show icon-only */
@media (max-width: 640px){
  .pm-close {
    width: 40px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
  }
  .pm-close::before { content: "x"; }  /* ASCII-only */
  .pm-close { color: transparent; }    /* hides translated word */
  .pm-close::before { color: var(--text); }
}
