/* ============================================================================
   Joong Home Centre — styles.css
   Modern hardware-store visual language. Navy + crimson palette from logo.
   Mobile-first; clamp()-driven type scale; system fallback fonts; no JS deps.
   ============================================================================ */

/* ---------- Design tokens ---------- */
:root {
  --c-primary: #1B3A8F;
  --c-primary-dark: #142B6B;
  --c-tertiary: #C0392B;
  --c-tertiary-dark: #9B2D22;
  --c-charcoal: #1F2937;
  --c-steel: #6B7280;
  --c-white: #FFFFFF;
  --c-warm: #FAFAFA;
  --c-100: #F3F4F6;
  --c-300: #D1D5DB;
  --c-whatsapp: #25D366;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 9999px;

  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 40px;
  --s-2xl: 64px;
  --s-3xl: 96px;

  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 4px 8px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.10);
  --shadow-cta: 0 4px 14px rgba(192, 57, 43, 0.25);
  --shadow-sticky: 0 -2px 12px rgba(15, 23, 42, 0.08);

  --max-w: 1180px;
  --header-h: 72px;

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--c-charcoal);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, picture, video { max-width: 100%; display: block; height: auto; }
a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--c-primary); margin: 0 0 var(--s-md); line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 1.5rem; font-weight: 700; }
p { margin: 0 0 var(--s-md); }
ul { padding-left: 1.25rem; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-tertiary);
  margin-bottom: var(--s-md);
}
.eyebrow.on-navy { color: #FCA5A5; }

/* ---------- Skip link (a11y) ---------- */
.skip { position: absolute; left: -9999px; top: 0; background: var(--c-primary); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0; z-index: 1000; }
.skip:focus { left: 0; }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--s-md); }
@media (min-width: 768px) { .container { padding: 0 var(--s-lg); } }
.section { padding: clamp(48px, 9vw, 96px) 0; }
.section--warm { background: var(--c-warm); }
.section--navy { background: var(--c-primary); color: var(--c-white); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--c-white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-300);
  z-index: 50;
  min-height: var(--header-h);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  min-height: var(--header-h);
}
.site-header__logo { display: flex; align-items: center; text-decoration: none; }
.site-header__logo img { height: 48px; width: auto; }
.site-header__logo:hover { text-decoration: none; }
.site-nav { display: none; }
@media (min-width: 900px) {
  .site-nav { display: flex; align-items: center; gap: var(--s-lg); }
  .site-nav a { font-family: var(--font-display); font-weight: 600; color: var(--c-charcoal); text-decoration: none; font-size: 0.95rem; }
  .site-nav a:hover { color: var(--c-primary); }
}
.header-cta {
  display: none;
}
@media (min-width: 600px) {
  .header-cta { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--c-tertiary);
  color: var(--c-white);
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { background: var(--c-tertiary-dark); color: var(--c-white); }
.btn--secondary {
  background: var(--c-white);
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn--secondary:hover { background: var(--c-primary); color: var(--c-white); }
.btn--secondary.on-navy { color: var(--c-white); border-color: var(--c-white); background: transparent; }
.btn--secondary.on-navy:hover { background: var(--c-white); color: var(--c-primary); }
.btn--ghost { background: transparent; color: var(--c-primary); padding: 10px 16px; }
.btn--ghost:hover { color: var(--c-primary-dark); background: var(--c-100); }
.btn .wa-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-whatsapp);
  border-radius: var(--r-pill);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.btn .wa-chip svg { width: 14px; height: 14px; fill: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(96px, 14vw, 168px) 0 clamp(96px, 12vw, 144px);
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--c-primary-dark);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 43, 107, 0.55) 0%, rgba(20, 43, 107, 0.82) 100%);
  z-index: -1;
}
.hero__inner { max-width: 920px; position: relative; }
.hero h1 { color: var(--c-white); margin-bottom: var(--s-lg); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25); }
.hero__lede {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--s-xl);
  max-width: 720px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s-md); }
.hero .btn--secondary {
  background: transparent;
  color: var(--c-white);
  border-color: rgba(255, 255, 255, 0.85);
}
.hero .btn--secondary:hover { background: var(--c-white); color: var(--c-primary); border-color: var(--c-white); }

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--c-primary);
  color: var(--c-white);
  padding: var(--s-xl) 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-lg);
  text-align: center;
}
@media (min-width: 700px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-stat {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--c-white);
}
.trust-label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

/* ---------- Categories grid ---------- */
.section-head { text-align: center; max-width: 700px; margin: 0 auto var(--s-2xl); }
.section-head p { font-size: 1.0625rem; color: var(--c-charcoal); }
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-lg);
}
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border: 1px solid var(--c-300);
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: var(--c-charcoal);
  height: 100%;
}
.cat-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-color: var(--c-primary); text-decoration: none; }
.cat-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--c-100);
}
.cat-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.cat-card:hover .cat-card__media img { transform: scale(1.05); }
.cat-card__body {
  padding: var(--s-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.cat-card h3 { font-size: 1.25rem; margin-bottom: 8px; color: var(--c-primary); }
.cat-card p { color: var(--c-charcoal); margin: 0 0 var(--s-md); font-size: 0.9375rem; flex-grow: 1; }
.cat-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-tertiary);
  font-weight: 700;
  font-family: var(--font-display);
  text-decoration: none;
  font-size: 0.95rem;
  padding-top: var(--s-sm);
  border-top: 1px solid var(--c-100);
}
.cat-card__cta::after { content: "→"; transition: transform 0.15s ease; }
.cat-card:hover .cat-card__cta::after { transform: translateX(4px); }

/* ---------- Why Joong (3-col value props) ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-xl);
}
@media (min-width: 800px) { .why-grid { grid-template-columns: repeat(3, 1fr); } }
.why-item__icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-white);
  color: var(--c-primary);
  border-radius: var(--r-lg);
  margin-bottom: var(--s-md);
}
.why-item__icon svg { width: 32px; height: 32px; }
.why-item h3 { font-size: 1.375rem; margin-bottom: 8px; }
.why-item p { font-size: 1rem; }
.section--navy .why-item__icon { color: var(--c-primary); }
.section--navy .why-item p { color: rgba(255, 255, 255, 0.92); }

/* ---------- Visit Us ---------- */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-xl);
  align-items: start;
}
@media (min-width: 800px) { .visit-grid { grid-template-columns: 1fr 1fr; gap: var(--s-2xl); } }
.visit-block { background: var(--c-white); padding: var(--s-xl); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.visit-block h3 { font-size: 1.125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-steel); font-weight: 700; margin-top: var(--s-lg); margin-bottom: 6px; }
.visit-block h3:first-of-type { margin-top: 0; }
.visit-address { font-size: 1.125rem; font-weight: 600; color: var(--c-charcoal); margin-bottom: var(--s-md); }
.visit-hours { list-style: none; padding: 0; margin: 0; }
.visit-hours li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--c-100); font-size: 1rem; }
.visit-hours li:last-child { border-bottom: 0; }
.visit-hours .day { font-weight: 600; color: var(--c-charcoal); }
.visit-hours .time { color: var(--c-steel); }
.visit-ctas { display: flex; flex-direction: column; gap: var(--s-sm); margin-top: var(--s-lg); }
@media (min-width: 500px) { .visit-ctas { flex-direction: row; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 880px; margin: 0 auto; }
.faq-item {
  background: var(--c-white);
  border: 1px solid var(--c-300);
  border-radius: var(--r-md);
  margin-bottom: var(--s-md);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: var(--s-lg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--c-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 var(--s-lg) var(--s-lg); color: var(--c-charcoal); }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Instagram band (Behold.so-powered, HSJ pattern) ---------- */
/* Lives directly under the trust strip. Full-bleed gapless grid so tiles  */
/* read as one continuous Instagram-style mosaic.                          */
.ig-band {
  background: var(--c-white);
  padding: clamp(40px, 6vw, 64px) 0 clamp(48px, 7vw, 80px);
}
.ig-head-wrap { margin-bottom: var(--s-xl); }
.ig-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.ig-head h2 { margin: 0; }
.ig-head p { margin: 0; color: var(--c-charcoal); }
.ig-footer { margin-top: var(--s-xl); text-align: center; display: flex; justify-content: center; }
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  width: 100%;
  margin: 0;
  min-height: 200px;
}
@media (min-width: 768px) { .instagram-grid { grid-template-columns: repeat(4, 1fr); } }
.ig-post {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0;
  border: none;
  background: var(--c-100);
  text-decoration: none;
}
.ig-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}
.ig-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 43, 107, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}
.ig-overlay svg {
  transform: scale(0.85);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ig-carousel-badge { position: absolute; top: 10px; right: 10px; z-index: 3; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45)); }
.ig-post:hover img { transform: scale(1.08); }
.ig-post:hover .ig-overlay { opacity: 1; text-decoration: none; }
.ig-post:hover .ig-overlay svg { transform: scale(1.15); }

.ig-fallback {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-md);
  padding: var(--s-2xl) var(--s-lg);
  background: var(--c-primary);
  border-radius: 0;
  text-decoration: none;
  color: var(--c-white);
  transition: background 0.25s ease;
  min-height: 280px;
}
.ig-fallback:hover { background: var(--c-primary-dark); color: var(--c-white); text-decoration: none; }
.ig-fallback svg { width: 44px; height: 44px; opacity: 0.95; }
.ig-fallback p { margin: 0; font-size: 1.0625rem; font-family: var(--font-display); letter-spacing: 0.01em; }
.ig-fallback strong { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-primary-dark);
  color: rgba(255, 255, 255, 0.92);
  padding: var(--s-2xl) 0 var(--s-lg);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-xl);
  margin-bottom: var(--s-xl);
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand img { height: 56px; background: var(--c-white); padding: 8px 12px; border-radius: var(--r-sm); margin-bottom: var(--s-md); }
.footer-brand p { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.78); max-width: 32ch; }
.footer-col h4 { color: var(--c-white); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: var(--s-md); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-col a:hover { color: var(--c-white); text-decoration: underline; }
.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--s-lg);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-md);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-bar a { color: rgba(255, 255, 255, 0.85); }

/* ---------- Sticky mobile WhatsApp bar ---------- */
.sticky-wa {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--c-white);
  border-top: 1px solid var(--c-300);
  padding: 10px var(--s-md);
  box-shadow: var(--shadow-sticky);
  z-index: 40;
  display: block;
}
.sticky-wa .btn { width: 100%; padding: 14px var(--s-md); }
@media (min-width: 900px) { .sticky-wa { display: none; } }
@media (max-width: 899px) {
  body { padding-bottom: 80px; }
}

/* ---------- Inner page hero (about/visit/faq/legal) ---------- */
.page-hero {
  background: var(--c-primary);
  color: var(--c-white);
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 64px);
}
.page-hero h1 { color: var(--c-white); margin-bottom: var(--s-md); }
.page-hero p { font-size: clamp(1rem, 1.8vw, 1.25rem); color: rgba(255, 255, 255, 0.92); max-width: 720px; margin: 0; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: var(--s-2xl); margin-bottom: var(--s-md); }
.prose h2:first-of-type { margin-top: 0; }
.prose ul { padding-left: 1.25rem; margin-bottom: var(--s-md); }
.prose ul li { margin-bottom: 6px; }

/* ---------- 404 ---------- */
.notfound {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--s-3xl) var(--s-md);
}
.notfound h1 { font-size: clamp(3rem, 8vw, 5rem); margin-bottom: var(--s-sm); }
.notfound p { font-size: 1.125rem; margin-bottom: var(--s-lg); color: var(--c-charcoal); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
