/* ==================================================================
   HIMACHALNAMA · Design A "Patti"
   ------------------------------------------------------------------
   1. Fonts            5. Hero               9. Channels          13. Community (follower counts)
   2. Colours & type   6. Woven border      10. Footer            14. Latest videos (player)
   3. Base             7. Sections          11. Animation         15. FAQ
   4. Header           8. Cards and grids   12. 404 page
   ================================================================== */


/* 1. FONTS ---------------------------------------------------------
   Self-hosted from assets/fonts. Both families are licensed under the
   SIL Open Font License 1.1 (https://openfontlicense.org):
     Anek Devanagari, Copyright 2021 The Anek Project Authors
       (https://github.com/EkType/Anek)
     Mukta, Copyright (c) 2014, Girish Dalvi, Ek Type
   ------------------------------------------------------------------ */

@font-face {
  font-family: 'Anek Devanagari'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/anek-devanagari-devanagari-700-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: 'Anek Devanagari'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/anek-devanagari-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Anek Devanagari'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/anek-devanagari-devanagari-800-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: 'Anek Devanagari'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/anek-devanagari-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Mukta'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/mukta-devanagari-400-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: 'Mukta'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/mukta-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Mukta'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/mukta-devanagari-500-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: 'Mukta'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/mukta-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Mukta'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/mukta-devanagari-600-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: 'Mukta'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/mukta-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* 2. COLOURS & TYPE ------------------------------------------------- */

:root {
  /* Change the brand colours here and they update everywhere.
     (The woven border has its own copy in assets/img/patti.svg.) */
  --ground: #F3F4F1;      /* page background, snow white */
  --ink: #15171A;         /* text and dark sections */
  --red: #B3202A;         /* Kullu red, main accent */
  --red-deep: #8F1820;
  --green: #1E5B45;       /* deodar green, second accent */
  --marigold: #E8A317;    /* highlight on dark backgrounds only */
  --white: #FFFFFF;
  --body: #33373D;        /* paragraph text */
  --muted: #4B5057;       /* small labels */
  --line: #D5D8D1;        /* hairlines on light */
  --dark-surface: #22252A;
  --dark-line: #3A3E45;
  --on-dark-muted: #C4C8C1;
  --slate: #8C918A;       /* WhatsApp's colour in the follower counts */

  --font-display: 'Anek Devanagari', 'Noto Sans Devanagari', 'Nirmala UI', sans-serif;
  --font-body: 'Mukta', 'Noto Sans Devanagari', 'Nirmala UI', system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-pad: clamp(56px, 7vw, 100px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}


/* 3. BASE ----------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.12; }
p { text-wrap: pretty; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.section--dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--marigold); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--thin { stroke-width: 1.6; }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 12px 16px; background: var(--ink); color: var(--white);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  font-size: 18px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn--small { min-height: 44px; padding: 0 16px; font-size: 15px; gap: 8px; }
.btn--red { background: var(--red); color: var(--white); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--white { background: var(--white); color: var(--ink); }
.btn--red:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.btn--ink:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--red); }
.btn--white:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 17px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px;
}
.text-link .icon { transition: transform .25s var(--ease); }
.text-link:hover { color: var(--red); }
.text-link:hover .icon { transform: translateY(3px); }

/* Small section labels: Hindi line over an English line */
.label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.label__hi { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.4; color: var(--red); }
.label__en { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.label--on-dark .label__hi { color: var(--marigold); }
.label--on-dark .label__en { color: var(--on-dark-muted); }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--green);
}
.eyebrow__mark { flex: none; width: 12px; height: 12px; background: var(--red); }


/* 4. HEADER --------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 244, 241, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 6px solid var(--red);
  transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(21, 23, 26, .5); }

/* Reading progress: green thread running over the red stripe */
.progress { position: absolute; left: 0; right: 0; top: -6px; height: 6px; overflow: hidden; }
.progress__bar { display: block; height: 100%; background: var(--green); transform: scaleX(0); transform-origin: left center; }

.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-height: 72px; padding-block: 10px; }

.brand {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 44px; margin-right: auto; text-decoration: none;
}
.brand__hi { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.15; }
.brand__en { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }

.site-nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 3px;
  background: var(--red); transform: scaleX(0); transform-origin: left center;
  transition: transform .25s var(--ease);
}
.site-nav a:hover::after, .site-nav a.is-current::after { transform: scaleX(1); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 2px solid var(--ink); color: var(--ink); cursor: pointer;
}
.nav-toggle__bars { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.nav-toggle__bars span { display: block; height: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 899px) {
  .site-header__inner { gap: 4px 10px; min-height: 64px; }
  .brand__hi { font-size: 23px; }

  /* Without JavaScript the links simply wrap onto a second row. */
  .site-nav { order: 3; width: 100%; }

  /* With JavaScript they fold into a menu. */
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; width: auto;
    flex-direction: column; flex-wrap: nowrap; gap: 0;
    padding: 4px var(--gutter) 16px;
    background: var(--ground); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 24px -20px rgba(21, 23, 26, .5);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .js .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .js .site-nav a { min-height: 52px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .js .site-nav a:last-child { border-bottom: 0; }
  .js .site-nav a::after { display: none; }
  .js .site-nav a.is-current { color: var(--red); }
}
@media (max-width: 479px) {
  .hide-on-small { display: none; }
}
@media (max-width: 359px) {
  .site-header__inner { gap: 4px 8px; }
  .site-header__cta { padding: 0 10px; }
  .brand__hi { font-size: 21px; }
  .brand__en { font-size: 10px; letter-spacing: .12em; }
}


/* 5. HERO ----------------------------------------------------------- */

.hero { padding: clamp(28px, 3.4vw, 48px) 0 clamp(44px, 4.6vw, 64px); }

/* The name, in Hindi with the English spelling beneath. This is the
   page's main heading (h1), so the brand is the first thing search
   engines read. */
.hero__wordmark {
  /* The top padding leaves room for the tall "ि" stroke above the headline. */
  margin-top: 4px; padding-top: .16em;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(48px, 14vw, 190px); line-height: 1.15;
  white-space: nowrap;
}
.hero__wordmark-hi { display: block; }
.hero__wordmark-en {
  /* Mixed case on purpose, so the name reads "HimachalNama" exactly as the channels spell it. */
  display: block; margin-top: .02em;
  font-family: var(--font-body); font-size: clamp(14px, 1.4vw, 18px); font-weight: 600;
  letter-spacing: .22em; line-height: 1.3; color: var(--muted);
}

.hero__lower { margin-top: 24px; display: grid; gap: 28px 64px; align-items: start; }
@media (min-width: 860px) { .hero__lower { grid-template-columns: 1fr 1fr; } }

.hero__tagline-en {
  font-family: var(--font-display); font-weight: 800; text-wrap: balance;
  font-size: clamp(32px, 4.4vw, 64px); line-height: 1.04;
}
.hero__tagline-hi {
  margin-top: 12px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.6vw, 36px); line-height: 1.4; color: var(--red);
}
.hero__intro > p { max-width: 540px; font-size: clamp(17px, 1.4vw, 20px); color: var(--body); }
.hero__actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }


/* 6. WOVEN BORDER ---------------------------------------------------- */

.patti { overflow: hidden; background: var(--ink); border-style: solid; border-width: 8px 0; }
.patti--red-green { border-top-color: var(--red); border-bottom-color: var(--green); }
.patti--green-red { border-top-color: var(--green); border-bottom-color: var(--red); }
.patti__weave {
  height: 64px; width: calc(100% + 128px);
  background: url('../img/patti.svg') 0 0 / 64px 64px repeat-x;
  will-change: transform;
}


/* 7. SECTIONS -------------------------------------------------------- */

.section { padding: var(--section-pad) 0; }
.section--white { background: var(--white); border-block: 1px solid var(--line); }
.section--dark { background: var(--ink); color: var(--white); }

.section__head { margin-bottom: clamp(32px, 3.4vw, 48px); }
.section__head--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--ink); font-size: 15px; font-weight: 600;
}

/* Who we are */
.about__top { display: grid; gap: 28px 64px; align-items: start; }
@media (min-width: 860px) { .about__top { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.about__copy { display: grid; gap: 20px; font-size: clamp(17px, 1.4vw, 20px); color: var(--body); }
.about__copy p { max-width: 620px; }
.about__closing { margin-top: 28px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; line-height: 1.45; text-wrap: balance; }


/* 8. CARDS AND GRIDS -------------------------------------------------- */

/* Faith, land, politics */
.triad { margin-top: clamp(40px, 4vw, 56px); display: grid; gap: 16px; }
@media (min-width: 760px) { .triad { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.triad__tile { display: flex; flex-direction: column; gap: 8px; min-height: 200px; padding: 28px; color: var(--white); }
.triad__tile--red { background: var(--red); }
.triad__tile--green { background: var(--green); }
.triad__tile--ink { background: var(--ink); }
.triad__hi { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 4vw, 56px); line-height: 1.3; }
.triad__en { font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.triad__text { margin-top: 4px; font-size: 17px; line-height: 1.5; }

/* Objectives */
.objectives { display: grid; gap: 32px; }
@media (min-width: 860px) { .objectives { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.objective { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 4px solid var(--ink); }
.objective__num { font-family: var(--font-display); font-weight: 800; font-size: 60px; line-height: 1.1; }
.objective__num--red { color: var(--red); }
.objective__num--green { color: var(--green); }
.objective h3 { font-weight: 700; font-size: 26px; line-height: 1.25; }
.objective p { color: var(--body); }

/* What we cover */
.topics { display: grid; gap: 24px; }
@media (min-width: 620px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.topic {
  --bar: var(--ink);
  display: flex; flex-direction: column; padding: 28px;
  background: var(--white); border: 1px solid var(--line); border-top: 8px solid var(--bar);
}
.topic, a.channel { transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s; }
.topic--red { --bar: var(--red); }
.topic--green { --bar: var(--green); }
.topic h3 { font-size: 32px; line-height: 1.4; }
.topic__en { margin-top: 6px; font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.topic__text { margin-top: 14px; color: var(--body); }
@media (hover: hover) {
  .topic:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--bar); }
}


/* 9. CHANNELS -------------------------------------------------------- */

.channels { display: grid; gap: 24px; }
@media (min-width: 900px) { .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.channel-feature {
  display: flex; flex-direction: column; gap: 8px;
  padding: clamp(24px, 2.6vw, 36px); background: var(--red); color: var(--white);
}
.channel-feature h3 { margin-top: 12px; font-size: 44px; line-height: 1.15; }
.channel-feature__handle { font-weight: 600; }
.channel-feature__text { margin: 8px 0 28px; max-width: 380px; }
.channel-feature .btn { align-self: flex-start; margin-top: auto; }

.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.channel {
  display: flex; flex-direction: column; gap: 4px; min-height: 190px; padding: 20px;
  background: var(--dark-surface); color: var(--white); text-decoration: none;
}
.channel__name { margin-top: 12px; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.3; }
.channel__meta { font-size: 15px; color: var(--on-dark-muted); overflow-wrap: anywhere; }
.channel__action {
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px;
  font-size: 15px; font-weight: 600; color: var(--marigold);
}
.channel__action .icon { transition: transform .25s var(--ease); }
.channel__soon {
  align-self: flex-start; margin-top: auto; padding: 4px 10px;
  background: var(--marigold); color: var(--ink); font-size: 13px; font-weight: 600;
}
@media (hover: hover) {
  a.channel:hover { background: #2B2F35; transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--marigold); }
  a.channel:hover .channel__action .icon { transform: translateX(4px); }
}

/* The line under the cards naming the official accounts and short links */
.channels__note { margin-top: clamp(28px, 3vw, 40px); max-width: 72ch; font-size: 16px; color: var(--on-dark-muted); }
.channels__note a { color: var(--white); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.channels__note a:hover { color: var(--marigold); }


/* 10. FOOTER ---------------------------------------------------------- */

.site-footer { background: var(--ink); color: var(--white); border-top: 1px solid var(--dark-line); padding: 40px 0 48px; }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 4px; }
.site-footer__hi { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.3; }
.site-footer__tag { font-size: 16px; color: var(--on-dark-muted); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.site-footer__nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; text-decoration: none; }
.site-footer__nav a:hover { color: var(--marigold); }
.site-footer__bottom {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--dark-line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  font-size: 15px; color: var(--on-dark-muted);
}
.site-footer__bottom a:hover { color: var(--marigold); }

/* Social links, one bordered chip per platform */
.site-footer__social { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 28px; }
.site-footer__social a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--dark-line); font-size: 15px; font-weight: 600; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.site-footer__social a:hover { border-color: var(--marigold); color: var(--marigold); }


/* 11. ANIMATION ------------------------------------------------------- */

@keyframes hn-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes hn-weave-in { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% -5% -20% 0); } }
@keyframes hn-drift { to { transform: translateX(-128px); } }

/* Hero entrance */
.hero__eyebrow { animation: hn-rise .7s var(--ease) .05s both; }
.hero__wordmark { animation: hn-weave-in 1.1s var(--ease) .15s both; }
.hero__tagline { animation: hn-rise .8s var(--ease) .55s both; }
.hero__intro { animation: hn-rise .8s var(--ease) .7s both; }

/* The woven border drifts slowly, like cloth on a loom */
.patti__weave { animation: hn-drift 26s linear infinite; }
.patti__weave--reverse { animation-direction: reverse; }

/* Sections rise into place as they scroll into view */
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .2s var(--ease), background-color .2s;
  transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.is-settled { transition-delay: 0s; transition-duration: .2s; }

/* Visitors who ask their device for less motion get a still page */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__eyebrow, .hero__wordmark, .hero__tagline, .hero__intro, .patti__weave { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .topic, .channel, .text-link .icon, .channel__action .icon,
  .player__play, .faq__item summary::after, .site-footer__social a { transition: none; }
}


/* 12. 404 PAGE --------------------------------------------------------- */

.notfound { min-height: 100vh; display: flex; flex-direction: column; }
.notfound__body { flex: 1; display: flex; align-items: center; padding: var(--section-pad) 0; }
.notfound p.notfound__code { margin: 0; max-width: none; font-family: var(--font-display); font-weight: 800; font-size: clamp(96px, 20vw, 200px); line-height: 1; color: var(--red); }
.notfound h1 { margin-top: 8px; font-size: clamp(30px, 4vw, 52px); line-height: 1.2; }
.notfound p { margin-top: 12px; max-width: 520px; font-size: clamp(17px, 1.4vw, 20px); color: var(--body); }
.notfound .btn { margin-top: 28px; }
.notfound .notfound__links { margin-top: 28px; font-size: 16px; }
.notfound__links a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.notfound__links a:hover { color: var(--red); }


/* 13. COMMUNITY (FOLLOWER COUNTS) -------------------------------------
   The white band under the hero: the total following, a thread showing
   each channel's share, and one count per channel. The numbers come
   from index.html (data-count) and are worked out by main.js.
   ------------------------------------------------------------------ */

/* Each channel's colour, set by data-tone in index.html. It colours the
   channel's swatch (phones), its top rule (wider screens) and its
   stretch of the thread. */
[data-tone="red"]      { --c: var(--red); }
[data-tone="green"]    { --c: var(--green); }
[data-tone="ink"]      { --c: var(--ink); }
[data-tone="marigold"] { --c: var(--marigold); }
[data-tone="slate"]    { --c: var(--slate); }

/* Total on the left, the sentence beside it; stacked on phones */
.community__top { display: grid; gap: 8px 48px; align-items: end; }
@media (min-width: 760px) { .community__top { grid-template-columns: auto minmax(0, 1fr); } }

/* The top padding keeps the tall digits clear of the label above. */
.community__total {
  padding-top: .08em;
  font-size: clamp(84px, 15vw, 184px); line-height: .9; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.community__k { color: var(--red); }

.community__say { display: grid; gap: 6px; padding-bottom: .5em; }
.community__line { font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; line-height: 1.3; max-width: 30ch; text-wrap: balance; }
.community__hi { font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.4; color: var(--green); }

/* The thread: one stretch per channel, as wide as its share of the
   total (main.js sets flex-grow to the count). The minimum width keeps
   a small channel visible. Empty, and so hidden, if the script fails. */
.community__thread { display: flex; gap: 3px; height: 12px; margin-top: clamp(24px, 3vw, 36px); }
.community__thread:empty { display: none; }
.community__seg { flex-basis: 0; min-width: 8px; background: var(--c); }

/* Per-channel counts. On phones, a list: swatch, name, number on the right. */
.counts { display: grid; margin-top: 18px; }
.count {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding-block: 14px; border-top: 1px solid var(--line);
}
.count::before { content: ""; width: 14px; height: 14px; background: var(--c); }
.count__name {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.count__value { justify-self: end; display: flex; align-items: baseline; gap: 8px; text-align: right; }
.count__num { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.count__unit { font-size: 15px; color: var(--muted); }
.count__soon {
  justify-self: end; padding: 4px 10px;
  background: var(--marigold); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap;
}

/* No count yet (empty data-count): dashed swatch and "Newly
   launched" in place of a number. main.js sets this class from data-count. */
.count--soon::before { background: none; border: 2px dashed var(--line); }
.count--soon .count__value,
.count:not(.count--soon) .count__soon { display: none; }

/* Wider screens: five columns, each under a thick rule in its colour. */
@media (min-width: 760px) {
  .counts { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 20px; margin-top: 14px; }
  .count { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; padding-block: 16px 4px; border-top: 4px solid var(--c); }
  .count--soon { border-top: 4px dashed var(--line); }
  .count::before { display: none; }
  .count__value { justify-self: start; flex-direction: column; gap: 0; text-align: left; }
  .count__num { font-size: clamp(30px, 3.2vw, 42px); }
  .count__soon { justify-self: start; margin-top: 8px; }
}

.community__asof { margin-top: 18px; font-size: 15px; color: var(--muted); }


/* 14. LATEST VIDEOS (PLAYER) --------------------------------------------
   A 16:9 box. It starts as a dark panel with a play button (a plain
   link to the channel); main.js swaps in YouTube's player when the
   visitor presses it. The woven strip along the bottom echoes the
   borders between sections.
   ------------------------------------------------------------------ */

.player {
  position: relative; max-width: 960px; min-height: 240px; margin-inline: auto;
  aspect-ratio: 16 / 9; background: var(--ink); color: var(--white);
}
.player__facade {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 24px 24px 56px; text-align: center; text-decoration: none; color: var(--white);
}
.player__facade::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32px;
  border-top: 4px solid var(--red); background: url('../img/patti.svg') 0 0 / 32px 32px repeat-x;
}
.player__hi { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4vw, 48px); line-height: 1.3; }
.player__en { font-size: clamp(14px, 1.3vw, 17px); color: var(--on-dark-muted); }
.player__play {
  display: grid; place-items: center; width: 72px; height: 72px; margin: 10px 0 6px;
  background: var(--red); color: var(--white);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.player__play svg { fill: currentColor; }
.player__hint { font-size: 13px; line-height: 1.4; color: var(--on-dark-muted); max-width: 40ch; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (hover: hover) {
  .player__facade:hover .player__play { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--marigold); }
}
@media (max-width: 479px) {
  .player__play { width: 60px; height: 60px; }
  .player__hint { display: none; }
}
.watch__note { margin-top: 18px; text-align: center; font-size: 15px; color: var(--muted); }


/* 15. FAQ -------------------------------------------------------------
   Native <details> elements: each question is a row, the answer opens
   beneath it. No script needed.
   ------------------------------------------------------------------ */

.faq { max-width: 860px; border-top: 2px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 18px 0; cursor: pointer; list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { font-weight: 700; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.3; }
.faq__item summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin: 8px 6px 0 0;
  border-right: 3px solid var(--red); border-bottom: 3px solid var(--red);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq__item[open] summary::after { transform: translateY(6px) rotate(-135deg); }
.faq__item summary:hover h3 { color: var(--red); }
.faq__item > p { max-width: 70ch; padding: 0 40px 22px 0; color: var(--body); }
.faq__item > p a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.faq__item > p a:hover { color: var(--red); }
