/* Handloom Haat, the website.
   ------------------------------------------------------------------
   The kiosk house style, adapted for browsers and phones. The tokens,
   typefaces and palette are carried over from framework/kiosk.css so the
   site and the gallery read as one identity; what changes is everything
   the kiosk assumed and a browser cannot:

     cursor        the kiosk hides it (cursor: none) because a panel has no
                   mouse. A website must show it.
     zoom          the kiosk locks scale (user-scalable=no) so a visitor
                   cannot strand a panel at 4x. On the web that is an
                   accessibility failure, so zoom is allowed.
     viewport      the kiosk is a known 1920x1080 or 1080x1920 panel. The
                   web is 360px phones upward, so every layout here is
                   fluid first and enhanced at wider widths.
     scrolling     kiosk screens never scroll (overflow: hidden, fixed
                   layers). Web pages scroll, so the fixed-inset layer
                   model is replaced with normal document flow.
     touch floor   64px targets are kept: they are right for phones too.
     18px floor    kept, for the same reason: readability is not a kiosk
                   concern, it is a reader concern. */

:root {
  --bg: #16130f;
  --bg-raised: #211d17;
  --bg-card: #2a251d;
  --ink: #ede5d8;
  --ink-dim: #b3a895;
  --ink-faint: #9c9280;
  --gold: #c9a24b;
  --madder: #c25a41;
  --indigo: #6f8fbe;
  --madder-deep: #a8442f;
  --indigo-deep: #3d5a80;
  --serif: 'EB Garamond', 'Noto Serif Devanagari', Georgia, serif;
  --display: 'Cormorant Garamond', 'Noto Serif Devanagari', Georgia, serif;
  --sans: 'Lato', 'Noto Sans Devanagari', system-ui, sans-serif;
  --radius: 14px;
  --touch: 64px;
  --measure: 68ch;
  --gutter: clamp(1.1rem, 4vw, 3rem);
}

@font-face { font-family: 'Cormorant Garamond'; src: url('../framework/fonts/CormorantGaramond-var.ttf'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('../framework/fonts/EBGaramond-var.ttf'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('../framework/fonts/EBGaramond-Italic-var.ttf'); font-style: italic; font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../framework/fonts/Lato-Regular.ttf'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../framework/fonts/Lato-Light.ttf'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../framework/fonts/Lato-Black.ttf'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Noto Serif Devanagari'; src: url('../framework/fonts/NotoSerifDevanagari-Regular.ttf'); font-display: swap; }
@font-face { font-family: 'Noto Sans Devanagari'; src: url('../framework/fonts/NotoSansDevanagari-Regular.ttf'); font-display: swap; }

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 300;
  /* 18px floor kept from the kiosk: it is a readability rule, not a panel rule. */
  font-size: clamp(18px, 1.05vw + 14px, 21px);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }

/* ---------- type ---------- */
h1, .h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 6vw, 4.2rem);
          line-height: 1.05; letter-spacing: .008em; }
h2, .h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.22; }
h3, .h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.3; }
p { max-width: var(--measure); }
.lede { font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--ink-dim); line-height: 1.55; }
.eyebrow { font-family: var(--sans); font-weight: 600; font-size: max(14px, .74rem);
           letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.gold { color: var(--gold); }
.dim { color: var(--ink-dim); }

/* ---------- layout ---------- */
.wrap { width: min(100% - var(--gutter) * 2, 1180px); margin-inline: auto; }
.section { padding-block: clamp(3rem, 9vw, 6.5rem); }
.section + .section { border-top: 1px solid rgba(201,162,75,.14); }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

/* ---------- the weave rule, carried from the kiosk ---------- */
.weave-rule {
  height: 5px; border: 0; margin-block: 1.4rem; max-width: 22rem;
  background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 22px,
              var(--madder) 22px 36px, transparent 36px 44px);
  opacity: .55;
}

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22,19,15,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,162,75,.16);
}
.site-head .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.4rem; }
.site-head .brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; text-decoration: none; }
.site-head .brand img { height: 2.1rem; width: auto; }
.site-head .brand span {
  font-family: var(--display); font-size: 1.22rem; color: var(--ink); letter-spacing: .02em; white-space: nowrap;
}
.site-nav { display: flex; gap: .3rem; align-items: center; }
.site-nav a {
  font-family: var(--sans); font-size: max(15px, .8rem); font-weight: 400;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
  color: var(--ink-dim); padding: .7rem .8rem; border-radius: 8px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: rgba(201,162,75,.12); }
/* Phones: the header becomes two rows.
   One row could not hold the brand, five links and the language pill: measured
   at 390px the wrap was 340px wide and the pill sat at x=510, entirely off the
   screen, so a Hindi reader on a phone had no way to switch language at all.
   Hiding the pill or the nav would each cost something a visitor needs, so the
   header wraps instead: brand and language on the first row, navigation on the
   second, scrollable sideways if the five labels still do not fit (Hindi labels
   are wider than the English ones). */
@media (max-width: 780px) {
  .site-head .wrap { flex-wrap: wrap; padding-block: .5rem; row-gap: .2rem; }
  .site-head .brand { order: 1; }
  .langpill { order: 2; margin-left: auto; }
  .site-nav {
    order: 3; width: 100%;
    overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding: .55rem .7rem; font-size: 15px; letter-spacing: .05em; }
}
@media (max-width: 420px) {
  .site-head .brand span { display: none; }
}

/* Secondary chrome sits at a 48px minimum rather than the kiosk's 64px.
   64px is right for a wall-mounted panel a visitor jabs at while standing; a
   phone is held, and a 64px nav row would eat a third of the header on every
   page. Primary actions (.btn) keep the full 64. This is the one place the web
   build deliberately departs from the kiosk touch floor. */
.site-nav a { min-height: 48px; display: inline-flex; align-items: center; }
.langpill button { min-height: 48px; }

/* ---------- language toggle, the kiosk's own pattern ---------- */
.langpill {
  display: inline-flex; border: 1px solid rgba(201,162,75,.45); border-radius: 999px;
  overflow: hidden; background: rgba(42,37,29,.6); flex: none;
}
.langpill button {
  font-family: var(--sans); font-size: max(14px, .78rem); font-weight: 600; letter-spacing: .05em;
  padding: .5rem .95rem; min-height: 40px; border: 0; background: none; color: var(--ink-dim); cursor: pointer;
}
.langpill button.on { background: var(--gold); color: var(--bg); }

/* Bilingual: both languages live in the DOM, one is hidden. No round trip,
   no flash of the wrong language, and the page still reads if JS fails. */
html[lang="en"] [data-hi], html[lang="hi"] [data-en] { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--touch); padding: .85rem 2rem;
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--gold); color: var(--bg);
  box-shadow: 0 0 34px rgba(201,162,75,.28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { color: var(--bg); transform: translateY(-2px); box-shadow: 0 4px 40px rgba(201,162,75,.42); }
.btn.ghost {
  background: none; color: var(--ink); border: 1px solid rgba(201,162,75,.5); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- cards ---------- */
.card {
  background: var(--bg-card); border: 1px solid rgba(201,162,75,.16);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s ease, transform .2s ease;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: rgba(201,162,75,.55); transform: translateY(-3px); }
.card .card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .45rem; }
.card .card-meta {
  font-family: var(--sans); font-size: max(14px, .74rem); letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
}
.card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg-raised); }

/* The technique tag, lifted from the weave infographic on the kiosk saver. */
.tag {
  display: inline-block; align-self: flex-start;
  font-family: var(--sans); font-weight: 700; font-size: max(12px, .62rem);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--bg); background: var(--gold);
  padding: .3em .8em; border-radius: 3px;
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid rgba(201,162,75,.16);
  padding-block: 2.5rem; color: var(--ink-faint);
  font-size: max(15px, .8rem);
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.site-foot .marks { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-foot .marks img { height: 2.4rem; width: auto; opacity: .75; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--bg);
  padding: .8rem 1.2rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
