/* ---------------------------------------------------------------------------
   Focusity blog — index page (/blog)
   ---------------------------------------------------------------------------
   Loaded by public/blog/index.html only, after blog.css. Kept out of
   blog.css on purpose: that file is shared by every article, the English
   blog and the tools pages, and generic names like .grid, .tool and .bar
   would leak into all of them.

   The layout: one photo grid, newest first, with the four semester stages
   as tabs in a toolbar that floats under the top bar next to the search.
   While nothing is filtered the newest guide is shown bigger, in whichever
   shape keeps every row full (see .grid[data-lead] below).

   Hebrew: no letter-spacing anywhere below -- tracking pulls Hebrew letters
   apart instead of opening the word up the way it does for Latin caps.
--------------------------------------------------------------------------- */

:root{
  /* One hue per semester stage, for tags, tab dots and the card hover. The
     text shade is the dark end of each ramp so a .74rem tag still clears
     4.5:1 on its tint. */
  --plan:#4338ca;  --plan-soft:#eef0fe;  --plan-deep:#312e81;   /* 1 before   */
  --learn:#047857; --learn-soft:#e6f6ef; --learn-deep:#064e3b;  /* 2 during   */
  --exam:#be123c;  --exam-soft:#fdecef;  --exam-deep:#881337;   /* 3 exams    */
  --life:#b45309;  --life-soft:#fdf1e3;  --life-deep:#78350f;   /* 4 life     */
  --tool:#0369a1;  --tool-soft:#e5f3fb;  --tool-deep:#0c4a6e;

  --wide:1120px;
  --focus:0 0 0 3px #fff, 0 0 0 5px var(--indigo);
}
.t-plan {--c:var(--plan); --c-soft:var(--plan-soft); --c-deep:var(--plan-deep);}
.t-learn{--c:var(--learn);--c-soft:var(--learn-soft);--c-deep:var(--learn-deep);}
.t-exam {--c:var(--exam); --c-soft:var(--exam-soft); --c-deep:var(--exam-deep);}
.t-life {--c:var(--life); --c-soft:var(--life-soft); --c-deep:var(--life-deep);}
.t-tool {--c:var(--tool); --c-soft:var(--tool-soft); --c-deep:var(--tool-deep);}

.wrap{max-width:var(--wide);}

/* JS filtering toggles [hidden]; the card rules set display, so make sure
   the attribute still wins. */
[hidden]{display:none!important;}

/* --- Focus ---------------------------------------------------------------- */
/* Cards are whole-surface links; without this the only keyboard cue is the
   browser default ring clipped by the rounded corners. */
:where(a,button,input):focus-visible{outline:none;box-shadow:var(--focus);}

.skip{
  position:fixed;inset-block-start:14px;inset-inline-start:14px;z-index:200;
  background:var(--indigo);color:#fff;padding:10px 16px;border-radius:10px;
  font-family:'Rubik',sans-serif;font-weight:600;text-decoration:none;
}
/* Visually hidden until focused -- not parked off-screen, which some
   capture and zoom paths still paint. */
.skip:not(:focus){
  inline-size:1px;block-size:1px;padding:0;overflow:hidden;
  clip-path:inset(50%);white-space:nowrap;
}

/* Visually hidden, still read by screen readers. */
.vh{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}

/* --- Top bar: wider, with a real way into the product ---------------------- */
.topbar-inner{max-width:var(--wide);}
.topnav{display:flex;align-items:center;gap:4px;}
.topnav a{
  font-size:.9rem;font-weight:500;color:var(--muted);
  padding:8px 14px;border-radius:999px;
  transition:background .5s var(--ease),color .5s var(--ease);
}
.topnav a:hover{background:var(--indigo-soft);color:var(--indigo);}
.topnav a[aria-current="page"]{color:var(--ink);font-weight:700;}
.topnav .try{
  background:var(--indigo);color:#fff;font-family:'Rubik',sans-serif;font-weight:600;
  margin-inline-start:6px;
}
.topnav .try:hover{background:#4338ca;color:#fff;}
@media(max-width:560px){
  .topnav .opt{display:none;}
  .topnav .try{padding-inline:12px;}
}

/* --- Tags, badges, meta ---------------------------------------------------- */
.tag{
  display:inline-flex;align-items:center;gap:6px;
  font-family:'Rubik',sans-serif;font-weight:600;font-size:.74rem;line-height:1;
  padding:6px 10px;border-radius:999px;
  color:var(--c);background:var(--c-soft);
}
.tag::before{content:"";inline-size:6px;block-size:6px;border-radius:50%;background:currentColor;}
.new{
  font-family:'Rubik',sans-serif;font-weight:700;font-size:.7rem;line-height:1;
  color:#fff;background:var(--ink);padding:5px 9px;border-radius:999px;
}

.meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;
  font-size:.84rem;color:var(--faint);
}
.meta .sep{inline-size:3px;block-size:3px;border-radius:50%;background:currentColor;opacity:.6;}
/* Dates are digits and dots -- weak characters that can drift to the wrong
   side of a neighbouring Hebrew word. Isolate them. */
.meta time{unicode-bidi:isolate;}

/* --- Topic glyph ---------------------------------------------------------- */
.glyph{
  inline-size:40px;block-size:40px;border-radius:12px;flex:none;
  display:grid;place-items:center;
  color:var(--c);background:var(--c-soft);
}
.glyph svg{inline-size:21px;block-size:21px;}

/* --- Tool tiles ----------------------------------------------------------- */
.tools{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));}
.tool{
  display:flex;flex-direction:column;gap:12px;
  padding:18px;border-radius:20px;text-decoration:none;color:inherit;
  background:var(--white);border:1px solid var(--hairline);box-shadow:var(--shadow-rest);
  transition:transform .6s var(--ease),box-shadow .6s var(--ease),border-color .6s var(--ease);
}
.tool:hover{transform:translateY(-3px);box-shadow:var(--shadow-lift);border-color:rgba(3,105,161,.25);}
.tool b{font-family:'Rubik',sans-serif;font-weight:600;font-size:.98rem;line-height:1.35;color:var(--ink);}
.tool span{font-size:.86rem;line-height:1.5;color:var(--muted);}

/* --- App CTA band --------------------------------------------------------- */
.appband{
  position:relative;overflow:hidden;isolation:isolate;
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:22px 26px;
  padding:30px 32px;border-radius:var(--r-shell);
  background:linear-gradient(135deg,#140b30 0%,#20124f 60%,#2b1a6b 100%);
  color:#fff;
}
/* Soft glow, purely decorative. Physical position on purpose: it is light,
   not layout, and looks the same mirrored or not. */
.appband::after{
  content:"";position:absolute;z-index:-1;inset-block-start:-80px;inset-inline-end:-60px;
  inline-size:320px;block-size:320px;border-radius:50%;
  background:radial-gradient(closest-side,rgba(124,58,237,.55),transparent);
}
.appband img{inline-size:58px;block-size:58px;border-radius:16px;background:#fff;box-shadow:0 10px 30px -10px rgba(0,0,0,.6);}
.appband h2{font-size:1.32rem;margin:0 0 6px;color:#fff;}
.appband p{margin:0;color:rgba(255,255,255,.74);font-size:.97rem;line-height:1.65;}
.appband .btn{background:#fff;color:var(--ink);box-shadow:none;white-space:nowrap;}
.appband .btn i{background:var(--indigo-soft);color:var(--indigo);}
.appband .btn:hover{background:#eef0fe;}
@media(max-width:760px){
  .appband{grid-template-columns:auto 1fr;padding:24px 22px;}
  .appband .btn{grid-column:1 / -1;justify-self:start;}
}

/* --- Section heading ------------------------------------------------------ */
.sec-head{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-block-end:20px;}
.sec-head h2{font-size:clamp(1.25rem,2.6vw,1.6rem);margin:0;}
.sec-head p{margin:4px 0 0;color:var(--muted);font-size:.95rem;}
.sec-head .more{
  font-family:'Rubik',sans-serif;font-weight:600;font-size:.9rem;color:var(--indigo);
  text-decoration:none;display:inline-flex;align-items:center;gap:6px;
}
.sec-head .more:hover{text-decoration:underline;}
.sec-head .more svg{inline-size:14px;block-size:14px;}
/* The chevrons are drawn for RTL, where "forward" points left; /en/blog
   reuses this file, so flip this one there, as blog.css does for the rest. */
html[dir="ltr"] .sec-head .more svg{transform:scaleX(-1);}

/* --- "In progress", one line ---------------------------------------------- */
.soon-line{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  color:var(--muted);font-size:.92rem;
  padding:14px 18px;border:1px dashed rgba(21,26,48,.16);border-radius:16px;
}
.soon-line b{font-family:'Rubik',sans-serif;font-weight:600;color:var(--ink);}

/* --- Photo card ----------------------------------------------------------- */
/* Every article gets the same box: 16:9 photo, tag row, title, two lines of
   summary, meta pinned to the bottom. Same height in a row, whatever the
   title length -- that sameness is most of what makes the grid read as
   tidy. */
.pcard{
  display:flex;flex-direction:column;text-decoration:none;color:inherit;
  background:var(--white);border:1px solid var(--hairline);border-radius:24px;
  overflow:hidden;box-shadow:var(--shadow-rest);
  transition:transform .7s var(--ease),box-shadow .7s var(--ease),border-color .7s var(--ease);
}
.pcard:hover{transform:translateY(-4px);box-shadow:var(--shadow-lift);border-color:color-mix(in srgb,var(--c,var(--indigo)) 30%,transparent);}
.pcard .ph{position:relative;aspect-ratio:16/9;overflow:hidden;background:var(--c-soft,#eef0fe);}
.pcard .ph img{
  display:block;inline-size:100%;block-size:100%;object-fit:cover;
  transition:transform 1.2s var(--ease);
}
.pcard:hover .ph img{transform:scale(1.04);}
.pcard .ph .new{position:absolute;inset-block-start:12px;inset-inline-start:12px;box-shadow:0 4px 14px -4px rgba(0,0,0,.4);}
.pcard .bd{display:flex;flex-direction:column;gap:10px;padding:18px 20px 20px;flex:1;}
.pcard .tag{align-self:flex-start;}
.pcard h3{
  font-family:'Rubik',sans-serif;font-size:1.08rem;line-height:1.38;margin:0;
  transition:color .5s var(--ease);
}
.pcard:hover h3{color:var(--c,var(--indigo));}
.pcard p{
  margin:0;color:var(--muted);font-size:.92rem;line-height:1.6;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.pcard .meta{margin-block-start:auto;padding-block-start:4px;}

/* --- Search box (light) --------------------------------------------------- */
.sbox{position:relative;}
.sbox .ico{
  position:absolute;inset-block-start:50%;inset-inline-start:18px;transform:translateY(-50%);
  inline-size:20px;block-size:20px;color:var(--faint);pointer-events:none;
}
.sbox input{
  inline-size:100%;font:500 1.02rem/1.2 'Heebo',sans-serif;color:var(--ink);
  padding:16px 50px;border-radius:18px;background:var(--white);
  border:1px solid var(--line);box-shadow:var(--shadow-rest);
  transition:border-color .4s var(--ease),box-shadow .4s var(--ease);
}
.sbox input::placeholder{color:var(--faint);}
.sbox input::-webkit-search-cancel-button{display:none;}
.sbox input:focus-visible{border-color:var(--indigo);box-shadow:0 0 0 4px rgba(79,70,229,.14);}
.sbox .clear{
  position:absolute;inset-block-start:50%;inset-inline-end:10px;transform:translateY(-50%);
  inline-size:34px;block-size:34px;border-radius:50%;border:0;cursor:pointer;
  background:var(--bg);color:var(--muted);display:none;place-items:center;
}
.sbox .clear svg{inline-size:15px;block-size:15px;}
.sbox.has-q .clear{display:grid;}
.sbox kbd{
  position:absolute;inset-block-start:50%;inset-inline-end:16px;transform:translateY(-50%);
  font:600 .76rem/1 'Rubik',sans-serif;color:var(--faint);
  border:1px solid var(--line);border-block-end-width:2px;border-radius:7px;padding:5px 8px;
}
.sbox.has-q kbd{display:none;}
@media(max-width:640px){.sbox kbd{display:none;}}

/* Search needs JS; without it the box would be a dead input, so it only
   appears once a script has confirmed it can run. */
.js-only{display:none!important;}
html.js .js-only{display:revert!important;}
html.js .sbox.js-only{display:block!important;}

.noresult{
  text-align:center;padding:48px 24px;margin-block:12px;
  border:1px dashed var(--line);border-radius:24px;background:var(--white);
}
.noresult b{display:block;font-family:'Rubik',sans-serif;font-size:1.1rem;margin-block-end:6px;}
.noresult p{color:var(--muted);font-size:.95rem;margin:0 0 16px;}
.noresult button{
  appearance:none;cursor:pointer;font:600 .9rem/1 'Rubik',sans-serif;color:var(--indigo);
  background:var(--indigo-soft);border:0;padding:11px 16px;border-radius:999px;
}

/* --- Hero ------------------------------------------------------------------ */
.hero{padding-block:68px 30px;display:grid;grid-template-columns:1fr auto;align-items:end;gap:24px 48px;}
.hero h1{font-size:clamp(2.1rem,5.4vw,3.5rem);margin:0 0 14px;letter-spacing:normal;}
.hero .sub{max-width:58ch;}
.facts{display:flex;gap:28px;margin:0;padding:0;list-style:none;}
.facts li{display:flex;flex-direction:column;gap:2px;}
.facts b{font-family:'Rubik',sans-serif;font-weight:700;font-size:1.85rem;line-height:1;color:var(--ink);}
.facts span{font-size:.84rem;color:var(--muted);}

/* --- Floating toolbar ---------------------------------------------------- */
.bar{
  position:sticky;inset-block-start:88px;z-index:40;
  display:flex;align-items:center;justify-content:space-between;gap:10px 16px;
  padding:8px;margin-block-end:14px;
  background:rgba(255,255,255,.86);
  -webkit-backdrop-filter:blur(16px) saturate(1.5);backdrop-filter:blur(16px) saturate(1.5);
  border:1px solid var(--hairline);border-radius:22px;box-shadow:var(--shadow-rest);
}
.tabs{display:flex;gap:4px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;}
.tabs::-webkit-scrollbar{display:none;}
.tab{
  appearance:none;border:0;background:transparent;cursor:pointer;flex:none;white-space:nowrap;
  display:inline-flex;align-items:center;gap:8px;
  font:500 .9rem/1 'Heebo',sans-serif;color:var(--muted);
  padding:11px 14px;border-radius:15px;
  transition:background .4s var(--ease),color .4s var(--ease);
}
.tab::before{content:"";inline-size:7px;block-size:7px;border-radius:50%;background:var(--c,var(--ink));}
.tab[data-filter="all"]::before{display:none;}
.tab:hover{background:var(--bg);color:var(--ink);}
.tab .n{font-family:'Rubik',sans-serif;font-weight:600;font-size:.76rem;opacity:.65;}
.tab[aria-pressed="true"]{background:var(--c,var(--ink));color:#fff;}
.tab[aria-pressed="true"]::before{background:#fff;}
.bar .sbox{flex:0 1 330px;}
.bar .sbox input{padding-block:12px;border-radius:15px;box-shadow:none;background:var(--bg);border-color:transparent;font-size:.96rem;}
.bar .sbox input:focus-visible{background:#fff;border-color:var(--indigo);}

.status{margin:0 4px 18px;font-size:.88rem;color:var(--faint);min-block-size:1.4em;}

/* --- Grid ----------------------------------------------------------------- */
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;}
/* Lead card: the newest guide, shown bigger while nothing is filtered. The
   script in index.html sets data-lead to whichever shape leaves no
   half-empty last row for the current count and column count:
     wide  two columns, photo beside the text
     big   two columns by two rows, photo on top
     full  the whole row, photo beside the text
   No data-lead (filtered, searching, phones, no JS) = a plain even grid. */
.grid[data-lead] .pcard:first-child .bd{padding:30px 30px 28px;justify-content:center;gap:14px;}
.grid[data-lead] .pcard:first-child h3{font-size:clamp(1.3rem,2.2vw,1.65rem);line-height:1.3;}
.grid[data-lead] .pcard:first-child p{font-size:1rem;-webkit-line-clamp:3;}
.grid[data-lead="wide"] .pcard:first-child{grid-column:span 2;flex-direction:row;}
.grid[data-lead="full"] .pcard:first-child{grid-column:1 / -1;flex-direction:row;}
.grid[data-lead="wide"] .pcard:first-child .ph,
.grid[data-lead="full"] .pcard:first-child .ph{flex:0 0 54%;aspect-ratio:auto;}
.grid[data-lead="big"] .pcard:first-child{grid-column:span 2;grid-row:span 2;}
.grid[data-lead="big"] .pcard:first-child .ph{flex:1 1 auto;aspect-ratio:auto;min-block-size:240px;}
.grid[data-lead="big"] .pcard:first-child .bd{flex:0 0 auto;}

.block{margin-block-start:72px;}

@media(max-width:980px){
  .hero{grid-template-columns:1fr;}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px){
  .bar{position:static;flex-direction:column;align-items:stretch;padding:8px;}
  .bar .sbox{flex:none;order:-1;}
}
@media(max-width:600px){
  .hero{padding-block:48px 22px;}
  .facts{gap:22px;}
  .facts b{font-size:1.5rem;}
  .grid{grid-template-columns:1fr;gap:16px;}
  .block{margin-block-start:56px;}
}
