/* responsive.css - load LAST, after site.css, inner-art.css, inner-theme.css */

/* Prevent any sideways scroll and long-word overflow */
/* No overflow rule on html/body here: site.css already handles it, and setting it on both
   makes body a scroll container, which breaks the sticky header on the Experience page. */
body{overflow-x:clip}
/* make sure the header always stays fixed at the top */
header{position:sticky!important;top:0!important}
img,svg,video{max-width:100%}
.card,.card h2,.card p,.detail-copy{overflow-wrap:anywhere}

/* Metrics: the page has 3 items, so use 3 columns (was 4 with an empty slot) */
.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.metric b{font-size:clamp(22px,4.2vw,48px)}

/* Large tablets / small laptops */
@media(max-width:1024px){
  .page{padding-left:clamp(18px,5vw,48px);padding-right:clamp(18px,5vw,48px)}
  nav{gap:16px!important}
  .logo img{width:200px!important}
}

/* Tablets and phones */
@media(max-width:760px){
  header{flex-wrap:wrap!important;align-items:center!important}
  .logo img{width:170px!important;max-width:60vw!important}
  nav{
    margin-left:0!important;width:100%;
    flex-wrap:wrap!important;gap:6px 14px!important;
    font-size:11px!important;
  }
  nav a{padding:6px 0}
  nav a.btn{padding:9px 14px}
  nav a.active{padding-bottom:4px!important}

  .page{padding-top:44px;padding-bottom:70px}
  h1{font-size:clamp(34px,10vw,52px);margin:14px 0 20px}
  .lead{font-size:clamp(16px,4.6vw,20px)}

  /* keep 3 across on tablets, borders consistent */
  .metrics{grid-template-columns:repeat(3,minmax(0,1fr));margin:40px 0 26px}
  .metric{padding:18px 10px;border-bottom:0;border-right:1px solid var(--k)}
  .metric:nth-child(2){border-right:1px solid var(--k)}
  .metric:last-child{border-right:0}
  .metric span{font-size:9px;letter-spacing:.08em;display:block;margin-top:4px}

  .grid{grid-template-columns:1fr;gap:14px}
  .card{padding:20px}
  .card h2{font-size:22px}

  .end-stripe{justify-content:center;font-size:13px;
    padding-bottom:calc(4px + env(safe-area-inset-bottom,0px))}
}

/* Small phones: stack metrics */
@media(max-width:520px){
  .metrics{grid-template-columns:1fr}
  .metric{display:flex;align-items:baseline;justify-content:space-between;gap:12px;
    border-right:0!important;border-bottom:1px solid var(--k);padding:16px 4px}
  .metric:last-child{border-bottom:0}
  .metric b{font-size:28px}
  .metric span{margin:0;text-align:right}
}

/* Very narrow screens */
@media(max-width:360px){
  nav{font-size:10px!important;gap:4px 10px!important}
  .logo img{width:150px!important}
  .card{padding:16px}
}

/* ---- Experience stats: phone layout that wins over the page's inline styles ---- */
html body .metrics{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:100%}
html body .metric{min-width:0}
html body .metric b{white-space:normal;overflow-wrap:anywhere}
@media(max-width:760px){
  html body .metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  html body .metric{border-bottom:0;border-right:1px solid var(--k)}
  html body .metric:last-child{border-right:0}
  html body .metric b{font-size:clamp(18px,4.6vw,30px)}
}
@media(max-width:560px){
  html body .metrics{grid-template-columns:1fr}
  html body .metric{display:flex;align-items:baseline;justify-content:space-between;gap:12px;
    border-right:0!important;border-bottom:1px solid rgba(18,22,20,.25);padding:16px 4px}
  html body .metric:last-child{border-bottom:0}
  html body .metric b{font-size:28px;white-space:nowrap}
  html body .metric span{margin:0;text-align:right}
}
