/* ===========================================================================
   Simple front page (2026-11-02). Loaded after living.css by views/layout/site.php.

   1. The two buttons on the welcome page: «پارەدان» (big, gold, first) and the
      sign-in button for people who have already paid (smaller, outlined).
   2. The members' front page: a short heading and a grid of big course cards.
      Only the page layout is set here (columns, spacing); the card itself is
      styled with the courses page (simple-courses.css).

   To undo: remove the <link> line that loads this file. Nothing else depends on it.
   =========================================================================== */

/* ---- 1. welcome page buttons ------------------------------------------------ */
.sh-actions-wrap { inline-size: 100%; }
.sh-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  inline-size: 100%;
  max-inline-size: 24rem;
  margin-inline: auto;
}
.sh-actions .btn { white-space: normal; text-wrap: balance; overflow-wrap: anywhere; }

/* the pay button: the biggest thing on the page after the title */
.sh-actions .sh-pay {
  inline-size: 100%;
  min-block-size: 66px;
  padding: 12px 32px;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0;
}
[lang="ckb"] .sh-actions .sh-pay { font-size: 1.42rem; }

/* sign in, for those who have paid: clearly second, still easy to tap */
.sh-actions .sh-login {
  inline-size: min(100%, 19rem);
  min-block-size: 50px;
  padding: 10px 22px;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--gold-2);
  border-color: rgba(223, 180, 73, 0.55);
  background: rgba(0, 0, 0, 0.18);
}
.sh-actions .sh-login:hover { background: rgba(223, 180, 73, 0.1); color: var(--ink); }

/* the closing copy under the trailers: same pair, a little more air above */
.lv-welcome-closing { padding-block-start: 26px; }
.lv-welcome-closing .sh-actions .btn { font-weight: inherit; }
.lv-welcome-closing .sh-actions .sh-pay { font-weight: 700; }

/* the note under the buttons sits a little closer to them */
.sh-actions-wrap + .lv-note { margin-block-start: 20px; }

/* ---- 2. the header ------------------------------------------------------------
   Members: wordmark, language, music, account chip and the ☰ menu. Everyone
   else: wordmark, music, and (signed in, not paid) a small sign-out button.

   The ☰ button takes the top-RIGHT corner in both languages (owner, 2026-11-02).
   It is the last child of .header-inner: in English (left to right) that is
   already the right edge; in Kurdish (right to left) `order: -1` makes it the
   first item, which is the right edge there, with the wordmark next to it and
   the other buttons pushed to the far left by `margin-inline-start: auto`. */
.site-header.is-member .header-inner { justify-content: flex-start; }
.site-header.is-member .header-actions { margin-inline-start: auto; }
[dir="rtl"] .site-header .header-inner > .menu-btn { order: -1; }
/* the phone menu lines up under the ☰ button, on the right, in English too */
[dir="ltr"] .mobile-nav a { justify-content: flex-end; }
[dir="ltr"] .mobile-nav { text-align: end; }
.header-actions .sh-hdr-out { margin: 0; display: block; }
.header-actions .sh-hdr-out .btn { display: inline-flex; min-block-size: 40px; padding-inline: 14px; font-size: 0.86rem; }

.sh-chip { position: relative; }
.sh-chip > summary { list-style: none; }
.sh-chip > summary::-webkit-details-marker { display: none; }
.sh-chip-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 3px 4px;
  padding-inline-end: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.sh-chip-btn:hover, .sh-chip[open] .sh-chip-btn { border-color: var(--gold); }
.sh-chip-face {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #efd380, #d5a234);
  color: var(--ink-on-gold);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  flex: none;
}
.sh-chip-face svg { inline-size: 22px; block-size: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sh-chip-name { max-inline-size: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
.sh-chip-menu {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 50;
  min-inline-size: 13rem;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.sh-chip-menu a, .sh-chip-menu button {
  display: flex;
  align-items: center;
  min-block-size: 46px;
  padding-inline: 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-align: start;
  inline-size: 100%;
  cursor: pointer;
}
.sh-chip-menu a:hover, .sh-chip-menu button:hover { background: var(--surface-2); color: var(--gold-2); }
.sh-chip-menu form { margin: 0; border-block-start: 1px solid var(--line); padding-block-start: 4px; margin-block-start: 4px; }
@media (max-width: 420px) {
  .sh-chip-name { display: none; }
  .sh-chip-btn { padding-inline-end: 4px; }
}
/* A member's phone header has five things in a row; the school's name would be
   cut to "A…", so on a phone the seal alone stands for it (it still links home). */
@media (max-width: 520px) {
  .site-header.is-member .brand-name { display: none; }
}
/* the same on the smallest phones for a signed-in visitor's bare header (seal + sign out) */
@media (max-width: 400px) {
  .site-header.is-bare .header-actions:has(.sh-hdr-out) { margin-inline-start: auto; }
  .site-header.is-bare:has(.sh-hdr-out) .brand-name { display: none; }
}

/* ---- 3. members' front page --------------------------------------------------
   Quiet and close-up: no picture behind the top, so it is plainly not the
   welcome page. */
.sh-member { padding-block: var(--sp-5) var(--sp-9, 72px); }
.sh-hello {
  margin: 0 0 var(--sp-5);
  font-size: clamp(1.6rem, 6.4vw, 2.3rem);
  line-height: 1.3;
  color: var(--ink);
}
.sh-block + .sh-block { margin-block-start: var(--sp-7, 40px); }
.sh-block-title {
  margin: 0 0 var(--sp-4);
  font-size: clamp(1.15rem, 4.4vw, 1.45rem);
  color: var(--gold-2);
  font-weight: 600;
}

/* continue: one wide card, picture first */
.sh-resume {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius, 16px);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.3s, transform 0.4s;
}
.sh-resume:hover { border-color: var(--gold); transform: translateY(-2px); }
.sh-resume-pic { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg-3); overflow: hidden; }
.sh-resume-pic img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.sh-resume-play {
  position: absolute;
  inset: 0;
  margin: auto;
  inline-size: 64px;
  block-size: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(19, 7, 10, 0.62);
  border: 1px solid rgba(244, 221, 154, 0.6);
}
.sh-resume-play svg { inline-size: 28px; block-size: 28px; fill: var(--gold-2); }
/* a play sign points right in both languages, like on every video player */
.sh-resume-bar { position: absolute; inset-inline: 0; inset-block-end: 0; block-size: 5px; background: rgba(255, 255, 255, 0.18); }
.sh-resume-bar i { display: block; block-size: 100%; background: var(--gold); }
.sh-resume-text { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.sh-resume-course { color: var(--dim); font-size: 0.9rem; }
.sh-resume-lesson { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.4; color: var(--ink); }
.sh-resume-btn { align-self: flex-start; margin-block-start: 8px; min-block-size: 46px; padding-inline: 26px; font-size: 1rem; font-weight: 600; }

/* courses: phone one per row so every picture is big; 2 then 3 columns */
.sh-grid.course-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }

@media (min-width: 700px) {
  .sh-grid.course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); }
  .sh-resume { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; }
  .sh-resume-text { padding: var(--sp-5) var(--sp-6); }
}
@media (min-width: 1100px) {
  .sh-grid.course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .sh-member { padding-block-start: var(--sp-7, 40px); }
  .sh-hello { margin-block-end: var(--sp-6); }
}

/* ---- 5. how to pay (owner, 2026-11-03) ----------------------------------------
   The link under the welcome page's text, and the /how-to-pay page: tutorial
   videos (one per row on a phone, side by side from 700px), the problems box, and
   the Telegram QR + username. Logical properties only, so it mirrors in English. */
.sh-howto-wrap { margin: 18px 0 0; text-align: center; }
.sh-howto {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-block-size: 48px; padding: 8px 26px;
  border: 1px solid rgba(223, 180, 73, 0.55); border-radius: 999px;
  background: rgba(223, 180, 73, 0.1); color: var(--gold-2);
  font-size: 1.05rem; font-weight: 600; text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.sh-howto:hover, .sh-howto:focus-visible { background: rgba(223, 180, 73, 0.2); color: var(--ink); }
.sh-howto svg { inline-size: 20px; block-size: 20px; fill: currentColor; flex: none; }

/* On the welcome page the link is the first thing a visitor should see (owner, 2026-11-04: "so people
   can see it easily and clearly"). PHONE: it sits just above the seal (30px over it), inside .lv-seal,
   over the lower part of the picture, so the pill gets a near-solid dark backing and a soft shadow to
   stay readable on any of the three pictures. WIDE SCREEN (>= 900px): a second copy of the link sits in
   the bottom of the picture column (owner: first "the middle of the right on web", then he circled the dark strip at the bottom); the phone copy is hidden
   there and the wide copy is hidden on a phone, so there is only ever one link on screen. */
.lv-hero--welcome .sh-howto-wrap {
  position: absolute; inset-inline: -60px; inset-block-end: calc(100% + 30px);
  margin: 0; display: flex; justify-content: center; z-index: 4;
}
.lv-hero--welcome .sh-howto {
  white-space: nowrap; font-size: 1.1rem; min-block-size: 44px; padding: 6px 24px;
  background: rgba(16, 11, 9, 0.9);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(223, 180, 73, 0.14);
}
.lv-hero--welcome .sh-howto:hover, .lv-hero--welcome .sh-howto:focus-visible { background: rgba(48, 34, 14, 0.94); }
.lv-hero--welcome .sh-howto-wrap.sh-howto-wrap--side { display: none; }
@media (min-width: 900px) {
  .lv-hero--welcome .lv-seal .sh-howto-wrap { display: none; }
  /* Pin the two original grid items to their cells first, so the third item (the link) cannot push them around. */
  .lv-hero--welcome .lv-stage { grid-column: 1; grid-row: 1; }
  .lv-hero--welcome .lv-copy { grid-column: 2; grid-row: 1; }
  /* The hero is a two-column grid: the picture column is column 1 in both directions, so the link goes
     into the same cell as the picture, centred across it and sitting low in the dark strip at the bottom of the
     picture (owner circled that spot on a screenshot, 2026-11-04). Right half in Kurdish, left in English. */
  .lv-hero--welcome .sh-howto-wrap.sh-howto-wrap--side {
    display: flex; position: relative; inset: auto; grid-column: 1; grid-row: 1;
    place-self: end center; z-index: 7; margin: 0 0 48px; justify-content: center;
  }
  .lv-hero--welcome .sh-howto-wrap--side .sh-howto { font-size: 1.25rem; min-block-size: 54px; padding: 8px 32px; }
}

/* The trailer in the welcome page's «بەرهەمەکانمان» section is a Bunny player (iframe): same white-sliver fix as
   the lesson player and the how-to-pay player - a light colour-scheme on the iframe and a black box behind it. */
.welcome-video-frame iframe { color-scheme: light; background: #000; }

/* The videos: a YouTube-style list, one under the other (owner, 2026-11-03). Each row is a small
   16:9 thumbnail with the title beside it (under it on a phone). A tap opens the player IN the
   row (assets/js/howto.js), also 16:9, with Bunny's own controls: full screen, speed, quality.
   Nothing is loaded from Bunny, and nothing plays, until a row is tapped. */
.howto-list { display: grid; gap: var(--sp-4); max-inline-size: 760px; margin-inline: auto; }
.howto-item { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.howto-open { display: grid; grid-template-columns: 148px minmax(0, 1fr); align-items: center; color: inherit; text-decoration: none; }
@media (min-width: 640px) { .howto-open { grid-template-columns: 300px minmax(0, 1fr); } }
.howto-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg-3); overflow: hidden; }
.howto-thumb img {
  display: block; inline-size: 100%; block-size: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.howto-open:hover .howto-thumb img, .howto-open:focus-visible .howto-thumb img { transform: scale(1.04); }
.howto-open:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.howto-play { position: absolute; inset: 0; display: grid; place-items: center; }
.howto-play::before {
  content: ""; position: absolute; inline-size: 38px; block-size: 38px; border-radius: 50%;
  background: rgba(47, 10, 16, 0.72); box-shadow: 0 0 0 2px var(--gold) inset, 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: background-color var(--dur-fast) var(--ease);
}
.howto-play svg { position: relative; inline-size: 18px; block-size: 18px; fill: var(--gold-2); margin-inline-start: 2px; transition: fill var(--dur-fast) var(--ease); }
@media (min-width: 640px) {
  .howto-play::before { inline-size: 56px; block-size: 56px; }
  .howto-play svg { inline-size: 26px; block-size: 26px; margin-inline-start: 3px; }
}
.howto-open:hover .howto-play::before, .howto-open:focus-visible .howto-play::before { background: var(--gold); }
.howto-open:hover .howto-play svg, .howto-open:focus-visible .howto-play svg { fill: var(--ink-on-gold); }
.howto-meta { display: grid; gap: 6px; justify-items: start; padding: var(--sp-2) var(--sp-3); }
@media (min-width: 640px) { .howto-meta { gap: 8px; padding: var(--sp-3) var(--sp-5); } }
.howto-name { color: var(--ink); font-size: 0.9rem; font-weight: 600; line-height: 1.55; }
@media (min-width: 640px) { .howto-name { font-size: 1.05rem; line-height: 1.6; } }
.howto-logos { --k: 0.6; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; background: #fffdf8; }
.howto-logos img { display: block; inline-size: auto; max-inline-size: 100%; }
/* opened: the row becomes a title bar with a close button, then the 16:9 player */
.howto-item.is-open > .howto-open { display: none; }
.howto-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-block: 8px; padding-inline: var(--sp-4) 8px; }
.howto-bar-title { font-size: 1rem; font-weight: 600; line-height: 1.5; }
.howto-bar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.howto-close, .howto-full {
  display: inline-grid; place-items: center; flex: none; inline-size: 40px; block-size: 40px; border-radius: 50%; padding: 0;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.howto-full[hidden] { display: none; }
.howto-full svg { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.howto-close:hover, .howto-close:focus-visible, .howto-full:hover, .howto-full:focus-visible { background: var(--gold-soft); border-color: var(--gold); }
.howto-frame { aspect-ratio: 16 / 9; background: #000; }
/* full screen (our button): the frame fills the screen and the player inside fills the frame, so a vertical video is big */
.howto-frame:fullscreen { aspect-ratio: auto; inline-size: 100%; block-size: 100%; }
.howto-frame:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; }
/* color-scheme: light and a black ground: without them Chrome paints WHITE side bars beside a
   vertical video inside the light Bunny player on this dark page (same fix as the lesson player). */
.howto-frame iframe { display: block; inline-size: 100%; block-size: 100%; border: 0; color-scheme: light; background: #000; }

.howto-help { display: grid; gap: var(--sp-6); max-inline-size: 640px; margin-inline: auto; }
.howto-telegram { display: grid; gap: var(--sp-4); justify-items: center; text-align: center; padding: 28px; }
.howto-telegram .lead { margin: 0; }
.howto-qr { display: block; inline-size: min(100%, 300px); }
.howto-qr img { display: block; inline-size: 100%; block-size: auto; }
.howto-handle { direction: ltr; font-size: 1.15rem; font-weight: 600; letter-spacing: 0.02em; }
