/* =========================================================
   NABEEL — site styles
   1. Tokens   2. Base   3. Layout   4. Header & menu
   5. Buttons & links   6. Photos   7. Home   8. Locations
   9. Customer care   10. Footer   11. Utilities
   ========================================================= */

/* 0. Fonts (self-hosted, latin only; no Google round trip) */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
}

/* 1. Tokens ------------------------------------------------ */
:root {
  --ink: #1C1D1F;
  --ink-hover: #34363A;
  --paper: #F4F4F2;
  --stone: #E4E3DF;
  --graphite: #616265;
  --rule: #D2D1CC;
  --footer-muted: #9A9B9E;
  --brand-grey: #565656;   /* Nabeel logo grey (header wordmark: assets/img/logo-grey.png) */

  /* Category accents: icons, filter states and small labels only */
  --c-m: #2D5F8A;   /* Phone Accessories — blue  */
  --c-c: #A2502F;   /* Women's Clothing  — clay  */
  --c-t: #3B7A4A;   /* Tudung            — green */
  --pending: #9A5B44;

  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --fs-display: clamp(2rem, 1.25rem + 3vw, 3.5rem);
  --fs-h2: clamp(1.625rem, 1.25rem + 1.4vw, 2.25rem);
  --fs-h3: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;

  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(48px, 7vw, 96px);
  --header-h: 72px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* 2. Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; letter-spacing: -0.02em; line-height: 1.1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-m); outline-offset: 3px; }
[hidden] { display: none !important; }

.label {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--graphite);
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip-link:focus { top: 12px; }

/* 3. Layout ------------------------------------------------ */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}
.section { padding-block: var(--section); }
/* For a section that follows a list ending in its own divider line (locations) */
.section--tight-top { padding-top: clamp(32px, 4vw, 48px); }
.rule-top { border-top: 1px solid var(--rule); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; border-bottom: 1.5px solid var(--ink);
}

/* 4. Header & menu ----------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h);
}
.brand { display: block; flex: none; }
.brand img { width: 136px; height: auto; } /* logo-grey.png = BruIPO-filed wordmark in --brand-grey */
.hero { padding-top: clamp(12px, 2vw, 24px); }

.nav-list { display: flex; gap: 36px; }
.nav-link {
  display: inline-block; padding-block: 6px; font-size: var(--fs-small);
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s var(--ease);
}
.nav-link:hover { border-color: var(--rule); }
.nav-link[aria-current="page"] { border-color: var(--ink); }

.header-actions { display: none; align-items: center; gap: 4px; }
.menu-toggle {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px;
  font-size: var(--fs-small); font-weight: 500;
}
.menu-toggle { background: none; border: 0; cursor: pointer; gap: 8px; }
.menu-toggle__bars { width: 18px; height: 10px; position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.menu-toggle__bars::before { top: 1px; }
.menu-toggle__bars::after { top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { top: 4.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { top: 4.5px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
  background: var(--paper);
  padding: 24px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto;
}
.mobile-menu__list a {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 18px; border-bottom: 1px solid var(--rule);
  font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em;
}
.mobile-menu__list a[aria-current="page"]::after { content: ""; width: 8px; height: 8px; background: var(--ink); }
.mobile-menu__foot { display: grid; gap: 12px; padding-top: 32px; }
body.menu-open { overflow: hidden; }

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .site-nav { display: none; }
  .header-actions { display: flex; }
  .brand img { width: 106px; }
}
@media (min-width: 761px) { .mobile-menu { display: none !important; } }

/* 5. Buttons & links --------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: var(--radius);
  font-size: var(--fs-small); font-weight: 500; line-height: 1.2; text-align: center;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.button:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.button--outline { background: transparent; color: var(--ink); }
.button--outline:hover { background: var(--stone); border-color: var(--ink); }
.button--small { min-height: 40px; padding: 0 14px; font-size: 0.875rem; }
.button svg { width: 18px; height: 18px; flex: none; }
/* Store buttons: icon + number (the icon replaces the words Call / WhatsApp) */
.button--num { gap: 8px; font-variant-numeric: tabular-nums; }
.button--num svg { width: 17px; height: 17px; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-small); font-weight: 500;
  padding-block: 4px; border-bottom: 1px solid currentColor;
}
.text-link .arrow { transition: transform .2s var(--ease); }
.text-link:hover .arrow { transform: translateX(3px); }

/* 6. Photos ------------------------------------------------ */
.photo { position: relative; overflow: hidden; background: var(--stone); }
.photo > img { width: 100%; height: 100%; object-fit: cover; }

/* 7. Home -------------------------------------------------- */
.hero .photo { aspect-ratio: 21 / 9; }
.intro {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: end;
  padding-block: clamp(40px, 6vw, 80px);
}
.intro h1 { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.03em; }
.intro__text { display: grid; gap: 24px; justify-items: start; }
.intro__text p { color: var(--graphite); max-width: 44ch; }

.category {
  --accent: var(--ink);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-block: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--rule);
}
.category:last-child { border-bottom: 0; }
.category:nth-child(even) .category__media { order: 2; }
.category__media .photo { aspect-ratio: 4 / 3; }
.category__body { display: grid; gap: 18px; justify-items: start; max-width: 460px; }
.category__tag {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent);
}
.category__tag svg { width: 36px; height: 36px; padding: 5px; }
.category__tag .count { color: var(--graphite); }
.category h2 { font-size: var(--fs-h2); }
.category__body > p { color: var(--graphite); }
/* Dot separators that never dangle: each dot sits BEFORE its item, and the
   list is shifted left by one separator width and clipped there, so the dot
   in front of whichever item starts a line is hidden. */
.category__list {
  display: flex; flex-wrap: wrap; row-gap: 6px; font-size: var(--fs-small);
  margin-left: -22px; clip-path: inset(0 0 0 22px);
}
.category__list li { position: relative; padding-left: 22px; }
.category__list li::before {
  content: "·"; position: absolute; left: 0; width: 22px; text-align: center;
  color: var(--graphite);
}

.overview {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
}
.overview__intro { display: grid; gap: 18px; align-content: start; justify-items: start; }
.overview__intro h2 { font-size: var(--fs-h2); }
.overview__intro p { color: var(--graphite); }
.overview__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; align-content: start; }
.overview__item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 8px; border-bottom: 1px solid var(--rule);
}
.overview__item a { font-weight: 500; }
.overview__item a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .hero .photo { aspect-ratio: 3 / 2; }
  .intro, .overview { grid-template-columns: 1fr; }
  .intro { gap: 24px; }
  .overview__list { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .category { grid-template-columns: 1fr; gap: 24px; }
  .category:nth-child(even) .category__media { order: 0; }
}
@media (max-width: 600px) {
  .hero .photo { aspect-ratio: 4 / 5; }
  .intro .button { width: 100%; }
}

/* Category availability slots (fixed order: phone, tudung, clothing) */
.slots { display: inline-grid; grid-template-columns: repeat(3, 32px); gap: 6px; flex: none; }
.slots > * { width: 32px; height: 32px; }
.slots svg { display: block; padding: 4px; }

/* Category icons sit in a soft circle tinted with their own colour */
.slots svg, .filter button svg, .category__tag svg, .legend svg, .locator-count svg {
  box-sizing: border-box; border-radius: 50%; flex: none;
  background: var(--stone);
  background: color-mix(in srgb, currentColor 14%, #fff);
}

/* 8. Locations --------------------------------------------- */
.page-head { padding-block: clamp(40px, 6vw, 72px) 28px; display: grid; gap: 14px; }
.page-head h1 { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.03em; }
.page-head p { color: var(--graphite); max-width: 52ch; }

.filter { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); border-radius: var(--radius); width: max-content; max-width: 100%; }
.filter button {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding: 10px 18px;
  background: transparent; border: 0; border-right: 1px solid var(--ink);
  font-size: var(--fs-small); text-align: left; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.filter button:last-child { border-right: 0; }
.filter button:hover { background: var(--stone); }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filter button svg { width: 30px; height: 30px; padding: 4px; margin-block: -4px; }

.f-short { display: none; }

/* Filter + result count stay pinned under the header while scrolling */
.locator-bar {
  position: sticky; top: var(--header-h); z-index: 20;
  background: var(--paper);
  padding-top: 14px; margin-top: -14px;
}
.locator-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap;
  margin-top: 14px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink);
  font-size: 0.875rem; color: var(--graphite); min-height: 44px;
}
.locator-meta strong { color: var(--ink); font-weight: 600; }
.locator-count { display: inline-flex; align-items: center; gap: 8px; }
.locator-count svg { width: 28px; height: 28px; padding: 4px; margin-block: -4px; }
.locator-bar.is-filtered .locator-meta { color: var(--ink); }

.show-all {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-size: 0.875rem; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid currentColor;
}
.show-all:hover { color: var(--ink-hover); }

.place, #locator { scroll-margin-top: var(--bar-h, 0px); }
.locator-hidden {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px;
  padding-block: 28px; color: var(--graphite); font-size: var(--fs-small);
}

.legend { display: flex; gap: 18px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { width: 28px; height: 28px; padding: 4px; }

.place {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  grid-template-areas: "info stores" "dir stores";
  grid-template-rows: auto 1fr;
  column-gap: clamp(24px, 5vw, 72px); row-gap: 16px;
  padding-block: 28px; border-bottom: 1px solid var(--rule);
}
.place__info { grid-area: info; display: grid; gap: 8px; align-content: start; }
.place__name { font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.015em; }
.place__address { color: var(--graphite); font-size: var(--fs-small); }
.place__count { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--graphite); }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin-top: 8px; font-size: 0.875rem; }
.hours dt { color: var(--graphite); }
.hours dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours__note { font-size: 0.875rem; color: var(--graphite); }
.place__dir { grid-area: dir; align-self: start; }
.place__stores { grid-area: stores; align-self: start; }

.store {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 24px; align-items: center;
  padding-block: 14px; border-bottom: 1px dashed var(--rule);
}
.store:first-child { padding-top: 2px; }
.store:last-child { border-bottom: 0; }
.store__unit { font-size: var(--fs-small); }
/* Store-level hours, only when stores in one place keep different hours */
.store__unit .hours--store { margin-top: 4px; font-size: 0.8125rem; gap: 0 10px; }
/* Narrow store column on phones: day above time, so "11:00am – 10:00pm" never splits */
@media (max-width: 600px) { .store__unit .hours--store { grid-template-columns: 1fr; } }
.store__unit .hours__note.hours--store { font-size: 0.8125rem; }
.store__contact { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pending { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .03em; color: var(--pending); }

.locator-empty { padding-block: 40px; color: var(--graphite); }

@media (max-width: 760px) {
  /* One compact row of four, so the pinned bar stays short on phones */
  .filter { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter button {
    flex-direction: column; justify-content: center; gap: 4px;
    min-height: 58px; padding: 6px 4px; font-size: 0.8125rem; text-align: center;
  }
  .f-long { display: none; }
  .f-short { display: inline; }
  .locator-bar { padding-top: 10px; margin-top: -10px; }
  .locator-meta { margin-top: 10px; padding-bottom: 8px; font-size: 0.8125rem; min-height: 40px; flex-wrap: nowrap; gap: 12px; }
  .show-all { font-size: 0.8125rem; flex: none; }

  .place { grid-template-columns: 1fr; grid-template-areas: "info" "stores" "dir"; grid-template-rows: auto; padding-block: 24px; }
  .place__dir { width: 100%; }
  .store { grid-template-columns: auto minmax(0, 1fr); padding-block: 14px; }
  .store__contact { grid-column: 1 / -1; justify-content: stretch; }
  .store__contact .button { flex: 1 1 0; min-height: 44px; }
}

/* 9. Customer care line (bottom of Our Locations) ----------- */
.care-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  margin-top: 28px;
}
.container > .care-line:first-child { margin-top: 0; }
.care-intro { color: var(--graphite); font-size: var(--fs-small); }
.care-intro + .care-line { margin-top: 6px; }
.care-line__number { font-weight: 500; font-variant-numeric: tabular-nums; }
.care-line__number [data-care="number"] { border-bottom: 1px solid var(--rule); transition: border-color .2s var(--ease); }
.care-line__number:hover [data-care="number"] { border-color: var(--ink); }
.care-line__number .ci { width: 17px; height: 17px; vertical-align: -3px; margin-right: 6px; }

/* Social logos (footer). Links are 44px squares so they are easy to tap. */
.social-icons { display: flex !important; flex-wrap: wrap; gap: 8px; }
.social-icons a {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--radius); transition: background-color .2s var(--ease), color .2s var(--ease);
}
.social-icons svg { width: 24px; height: 24px; display: block; }
.site-footer .social-icons { margin: -10px -10px -10px -18px; }
.site-footer .social-icons a:hover { background: #34363A; color: #FFFFFF; }

/* Page not found (404.html): short page, so the footer is pushed to the bottom of the screen */
.page-short { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page-short main { flex: 1 0 auto; }
.notfound { padding-bottom: var(--section); }
.notfound__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* 10. Footer ----------------------------------------------- */
.site-footer { background: var(--ink); color: #D9D9D6; padding-block: 56px calc(28px + env(safe-area-inset-bottom, 0px)); }
/* One row: logo on the left, links + social icons grouped on the right */
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer-grid > :first-child { margin-right: auto; }
.footer-grid img { width: 132px; height: auto; display: block; }
.footer-grid ul { display: grid; gap: 8px; font-size: var(--fs-small); }
.footer-grid nav a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.footer-base {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid #34363A;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.8125rem; color: var(--footer-muted);
}
.site-footer .pending { color: #C9917B; }

@media (max-width: 760px) {
  .footer-grid > :first-child { flex-basis: 100%; }
}

/* 11. Utilities -------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Page changes: the content cross-fades, the header stays put.
   Chrome, Edge, Samsung Internet, Safari 18.2+; others change page as normal. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease-out; }
::view-transition-old(site-header) { display: none; }
::view-transition-new(site-header) { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
