/* Home Lab Tamil: experiment cards, phone swipe view, upcoming experiments.
   Uses the colours and fonts defined on each page (:root). */

/* ---------- top bar link ---------- */
.bar-right{display:flex;align-items:center;gap:6px;flex:none}
.bar-link{font-size:14px;font-weight:600;padding:7px 12px;border-radius:99px;text-decoration:none;white-space:nowrap;transition:background .2s}
.bar-link:hover{background:rgba(240,164,67,.18)}
.bar-link[aria-current="page"]{box-shadow:inset 0 0 0 1.5px currentColor}
.bar-link{display:inline-flex;align-items:center;gap:6px}
.bar-link-ic{display:none;width:20px;height:20px}
@media (max-width:560px){.bar-link{font-size:13px;padding:6px 8px}.bar-right{gap:2px}}
/* small phones: the experiments link becomes a flask icon so the support button keeps its full text */
@media (max-width:480px){.bar-link-txt{display:none}.bar-link-ic{display:block}.bar-link{padding:7px}}
@media (max-width:480px){.bar .brand{min-width:28px}}
/* the logo text never spills under the buttons */
.bar .brand-text{overflow:hidden}
.bar .brand-text b{overflow:hidden;text-overflow:ellipsis}
@media (max-width:360px){.bar .bar-cta{font-size:12px;padding:6px 10px}.bar{gap:8px}}

/* ---------- section heads ---------- */
.exps{padding:clamp(40px,5vw,64px) 0 clamp(12px,2vw,24px)}
.exps-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 40px;margin-bottom:clamp(18px,3vw,28px)}
.exps-head h2{font-size:clamp(1.8rem,4vw,3rem);margin-top:6px}
.exps-head p{font-size:1.08rem;color:var(--ink-soft);max-width:36em;margin-top:6px}

/* ---------- experiment cards ---------- */
.exp-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}   /* cards hug their content: no empty space at the bottom */
.exp-track.wide{grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr))}
.exp-card{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:14px;row-gap:10px;align-items:center;align-content:start;
  padding:16px;border-radius:20px;background:var(--cream);color:var(--ink);min-width:0;box-shadow:0 0 0 1px var(--line),0 24px 50px -32px rgba(42,32,24,.5)}
.exp-head{min-width:0;display:flex;flex-direction:column;gap:2px}
.exp-sum,.exp-card .exp-go{grid-column:1 / -1}
.exp-art{flex:none;width:76px;height:76px;border-radius:18px;background:var(--night);color:var(--ember);display:grid;place-items:center;overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(255,248,236,.06)}
.exp-art svg{width:56px;height:56px;overflow:visible}
.exp-art img{width:100%;height:100%;object-fit:cover}
.exp-meta{display:flex;flex-wrap:wrap;gap:2px 12px;font-size:13px;color:var(--ink-soft);line-height:1.5}
.exp-topic{color:var(--clay);font-weight:600}
.exp-title{font-family:var(--serif-ta);font-size:1.06rem;line-height:1.5;font-weight:700}
html[lang="en"] .exp-title{font-family:var(--display-en);font-weight:600;font-size:1.14rem;letter-spacing:-.01em}
.exp-sum{font-size:15px;line-height:1.75;color:var(--ink-soft)}
.exp-go{justify-self:start;display:inline-flex;align-items:center;gap:6px;margin-top:0;padding:7px 14px;border-radius:99px;
  font-weight:600;font-size:14px;color:var(--clay);text-decoration:none;box-shadow:inset 0 0 0 1.5px rgba(168,73,42,.45);transition:background .2s,color .2s,box-shadow .2s}
.exp-go:hover{background:var(--clay);color:var(--cream);box-shadow:none}
.exp-go svg{width:16px;height:16px;transition:transform .3s}
.exp-go:hover svg{transform:translate(2px,-2px)}
.exp-more{display:flex;justify-content:center;margin-top:clamp(18px,3vw,28px)}
.exp-more .btn svg{transition:transform .3s}
.exp-more .btn:hover svg{transform:translateX(4px)}
.exp-nav{display:none}

/* every experiment card is the same size: as tall as the longest summary; the reel button sits at the bottom */
.exp-track{align-items:stretch;grid-auto-rows:1fr}
.exp-card{grid-template-rows:auto 1fr auto;align-content:stretch;min-height:var(--exp-card-h,0)}
.exp-card .exp-sum{align-self:start}
.exp-card .exp-go{align-self:end}

/* topic filters (experiments page) */
.exp-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:22px}
.exp-filters button{padding:7px 14px;border-radius:99px;background:var(--cream);box-shadow:0 0 0 1px var(--line);font-size:14px;font-weight:600;white-space:nowrap;transition:background .2s,color .2s}
.exp-filters button small{font-weight:500;opacity:.6;margin-left:2px}
.exp-filters button[aria-pressed="true"]{background:var(--ink);color:var(--paper);box-shadow:none}

/* tablets: the 3 preview cards stack, full width */
@media (max-width:980px){.exp-track{grid-template-columns:minmax(0,1fr)}}

/* phone: on the main page one card at a time (swipe or arrows);
   on the experiments page (.wide) the cards simply stack and scroll down */
@media (max-width:720px){
  .exp-track:not(.wide){display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:4px 2px 10px;margin:0 -2px}
  .exp-track:not(.wide)::-webkit-scrollbar{display:none}
  .exp-track:not(.wide) .exp-card{flex:0 0 100%;scroll-snap-align:center;scroll-snap-stop:always}
  .exp-track.wide{grid-template-columns:minmax(0,1fr);gap:12px}
  .exp-art{width:64px;height:64px;border-radius:14px}
  .exp-art svg{width:46px;height:46px}
  .exp-nav{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:10px}
  .exp-nav button{width:44px;height:44px;border-radius:50%;background:var(--cream);box-shadow:0 0 0 1px var(--line);display:grid;place-items:center;color:var(--ink)}
  .exp-nav button:disabled{opacity:.35;cursor:default}
  .exp-nav svg{width:20px;height:20px}
  .exp-count{min-width:4.5em;text-align:center;font-size:14px;color:var(--ink-soft);font-variant-numeric:tabular-nums}
  .exp-filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 calc(var(--gutter) * -1) 18px;padding:2px var(--gutter)}
  .exp-filters::-webkit-scrollbar{display:none}
  .exp-more .btn{width:100%}
}

/* ---------- main page: photo strip right below the opening screen ---------- */
.exp-strip{position:relative;z-index:2;margin-top:-2px;background:var(--night);color:var(--cream);padding:0 0 clamp(18px,3vw,28px)}
.strip-link{display:flex;align-items:center;gap:14px 28px;padding:16px 20px;border-radius:20px;text-decoration:none;color:inherit;
  background:rgba(255,248,236,.05);box-shadow:inset 0 0 0 1px rgba(255,248,236,.12);transition:background .2s,box-shadow .2s}
.strip-link:hover{background:rgba(255,248,236,.09);box-shadow:inset 0 0 0 1px rgba(240,164,67,.45)}
.strip-link:focus-visible{outline:2px solid var(--ember);outline-offset:3px}
.strip-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:0 1 auto}
.strip-k{font-family:var(--serif-ta);font-weight:700;font-size:1.12rem;line-height:1.4}
html[lang="en"] .strip-k{font-family:var(--display-en);font-weight:600;font-size:1.2rem}
.strip-n{font-size:14px;color:rgba(255,248,236,.72)}
.strip-photos{display:flex;gap:8px;flex:1 1 auto;justify-content:center;min-width:0}
.strip-photos i{flex:none;width:60px;height:60px;border-radius:14px;overflow:hidden;background:#1d1610;box-shadow:0 0 0 1px rgba(255,248,236,.1)}
.strip-photos img,.strip-photos svg{width:100%;height:100%;object-fit:cover;display:block}
.strip-go{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:10px 18px;border-radius:99px;background:var(--ember);color:var(--night);font-weight:600;font-size:15px;white-space:nowrap}
.strip-go svg{width:16px;height:16px;transition:transform .3s}
.strip-link:hover .strip-go svg{transform:translateX(3px)}
.strip-link:active{transform:scale(.99)}
@media (max-width:900px){.strip-photos i:nth-child(n+5){display:none}}
/* phone: heading + round arrow on top, 5 photos filling one row below */
@media (max-width:720px){
  .strip-link{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"text go" "photos photos";gap:12px;padding:14px}
  .strip-text{grid-area:text}
  .strip-go{grid-area:go;align-self:center;width:44px;height:44px;padding:0;justify-content:center}
  .strip-go > span{display:none}
  .strip-go svg{width:20px;height:20px}
  .strip-photos{grid-area:photos;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
  .strip-photos i,.strip-photos i:nth-child(n+5){display:block;width:auto;height:auto;aspect-ratio:1;border-radius:12px}
  .strip-photos i:nth-child(n+6){display:none}
}
@media (prefers-reduced-motion:reduce){.strip-link,.strip-go svg{transition:none}.strip-link:active{transform:none}}

/* ---------- upcoming ideas: a short list, no cards ---------- */
.upcoming{padding:clamp(20px,3vw,36px) 0 clamp(36px,5vw,56px)}
.up-ideas{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 32px}
.up-ideas li{display:flex;align-items:flex-start;gap:12px;font-size:1.02rem;line-height:1.7;color:var(--ink)}
.up-ic{flex:none;width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:var(--night);color:var(--ember);margin-top:2px}
.up-ic svg{width:20px;height:20px}
.up-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:clamp(16px,2.5vw,24px);font-size:1rem;color:var(--ink-soft)}
.up-foot a{font-weight:600;color:var(--clay)}
@media (max-width:720px){.up-ideas{grid-template-columns:minmax(0,1fr);gap:10px}}

/* ---------- UI UX Pro Max checklist fixes (both pages) ---------- */
/* jump links (#support, #ideas…) land below the fixed top bar, and keyboard focus is never hidden under it */
html{scroll-padding-top:84px}
/* no 300ms tap delay on phones */
a,button{touch-action:manipulation}
/* "skip to content" link for keyboard users: hidden until focused */
.skip{position:fixed;left:12px;top:-80px;z-index:100;padding:12px 18px;border-radius:12px;background:var(--ink);color:var(--paper);font-weight:600;text-decoration:none;box-shadow:0 10px 30px -10px rgba(0,0,0,.5);transition:top .2s}
.skip:focus{top:12px}
.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}
/* 44px tap targets: an invisible hit area around small links, so the look stays the same */
.bar .brand,.bar-link,.bar-cta,.eyebrow,.up-foot a,footer nav a,footer nav button,footer .brand{position:relative}
.bar .brand::after,.bar-link::after,.bar-cta::after,.eyebrow::after,.up-foot a::after,footer nav a::after,footer nav button::after,footer .brand::after{
  content:"";position:absolute;left:50%;top:50%;width:max(100%,44px);height:max(100%,44px);transform:translate(-50%,-50%)}
/* real 44px height where the control is a button */
.exp-go{min-height:44px;padding:10px 16px}
.exp-filters button{min-height:44px;padding:9px 16px}
/* no text smaller than 12px */
body .brand-text small{font-size:12px}
.exp-filters button small{font-size:12.5px}
/* pressed feedback on touch */
.btn:active,.bar-cta:active,.exp-go:active,.exp-nav button:active,.exp-filters button:active{transform:scale(.97)}
@media (prefers-reduced-motion:reduce){
  html{scroll-padding-top:84px;scroll-behavior:auto}
  .exp-go,.exp-go svg,.exp-filters button,.skip{transition:none}
  .btn:active,.bar-cta:active,.exp-go:active,.exp-nav button:active,.exp-filters button:active{transform:none}
}
