/* Ipoh Heritage Barber Shop — site-specific styling on top of tokens.css
   and base.css. Vintage-Americana barbershop: muted taupe, serif display,
   hairline borders, zero corner radius, restrained motion. */

/* ---------- type & basics ---------- */
:root {
  /* AA-safe deepening of anchors.palette.muted/accent for actual body
     copy on the light background (the raw anchor tones read ~3.1-4.1:1
     on --color-bg, short of WCAG AA for text). Same taupe family, just
     dark enough to read reliably; decorative/large uses (buttons, icons,
     borders, dark-panel text) keep the true anchor tones. */
  --color-text-muted: #7c6a5a;
}

body {
  font-family: var(--font-body);
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-1);
}
.section-lead {
  color: var(--color-text-muted);
  max-width: 46ch;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-accent-2);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 2000;
}
.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-accent-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  color: #fbf7f2;
  font-family: var(--font-display);
}
.brand-line1 {
  font-size: 1.15rem;
}
.brand-line2 {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-header .nav-links a {
  text-decoration: none;
  color: #f1ece5;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}
.site-header .nav-links a:hover,
.site-header .nav-links a:focus-visible {
  opacity: 1;
}
.site-header .nav-toggle {
  background: none;
  border: none;
  color: #fbf7f2;
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
}
.site-header .nav-toggle svg { width: 100%; height: 100%; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-icon { width: 1rem; height: 1rem; flex: none; }
.btn-primary {
  background: var(--color-accent);
  color: #201d1a;
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn-outline {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: rgba(158, 138, 120, 0.12);
  transform: translateY(-2px);
}
.btn-cta {
  background: var(--color-accent);
  color: #201d1a;
  padding: 0.6rem 1.1rem;
}
.btn-cta:hover, .btn-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fbf7f2;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 16, 0.35) 0%, rgba(20, 18, 16, 0.35) 40%, rgba(20, 18, 16, 0.82) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: var(--space-5);
  max-width: 42rem;
}
.hero .eyebrow { color: #e7d8c8; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, var(--font-size-h1));
  color: #fbf7f2;
  margin-bottom: var(--space-2);
}
.hero-sub {
  font-size: 1.05rem;
  color: #efe6da;
  max-width: 38ch;
}
.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
.hero .btn-outline { border-color: #fbf7f2; color: #fbf7f2; }
.hero .btn-outline:hover { background: rgba(251, 247, 242, 0.12); }

.hero-dots {
  position: absolute;
  z-index: 2;
  bottom: var(--space-3);
  right: var(--space-3);
  display: flex;
  gap: 0.5rem;
}
.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1px solid rgba(251, 247, 242, 0.8);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.hero-dot.is-active { background: #fbf7f2; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}
.about-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 28%;
  border: var(--border);
}
.about-copy h2 { margin-bottom: var(--space-2); }
.about-copy p { color: var(--color-ink); max-width: 52ch; }

/* ---------- services: style grid ---------- */
.services { padding-bottom: 0; }
.style-grid { margin-top: var(--space-4); }
.style-card {
  background: #f3efe9;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.style-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.style-card .icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}
.style-card .icon svg { width: 100%; height: 100%; }
.style-card h3 { margin-bottom: 0.4rem; }
.style-card p { color: var(--color-text-muted); margin: 0; }

/* ---------- pricing panel ---------- */
.pricing-panel {
  background: var(--color-accent-2);
  color: #f1ece5;
  margin-top: var(--space-5);
  padding-block: var(--space-5);
}
.pricing-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-5);
  align-items: center;
}
.pricing-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid rgba(251, 247, 242, 0.18);
}
.pricing-copy .eyebrow { color: var(--color-accent); }
.pricing-copy h2 { color: #fbf7f2; margin-bottom: var(--space-3); }
.price-list {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  border-top: 1px solid rgba(251, 247, 242, 0.18);
}
.price-list li {
  padding-block: 0.85rem;
  border-bottom: 1px solid rgba(251, 247, 242, 0.18);
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-ui);
}
.price-name { font-weight: 600; letter-spacing: 0.02em; }
.price-value { color: var(--color-accent); font-weight: 600; white-space: nowrap; }
.price-desc { margin: 0.25rem 0 0; color: #c9beb1; font-size: 0.9rem; }
.pricing-note { color: #c9beb1; font-size: 0.9rem; max-width: 42ch; }

/* ---------- mission banner ---------- */
.mission {
  position: relative;
  padding-block: var(--space-5);
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.mission-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 60% center;
}
.mission-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 22, 19, 0.72), rgba(24, 22, 19, 0.72));
}
.mission .container { position: relative; z-index: 1; }
.mission-quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  color: #fbf7f2;
  max-width: 32ch;
  margin: 0 auto;
}

/* ---------- gallery ---------- */
.gallery-grid { margin-top: var(--space-4); }
.gallery-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: var(--border);
  transition: transform 0.35s ease;
}
.gallery-grid a {
  display: block;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-grid a:hover img,
.gallery-grid a:focus-visible img { transform: scale(1.05); }

/* ---------- visit ---------- */
.visit-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-5);
  align-items: center;
}
.visit-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: var(--border);
}
.visit-details {
  list-style: none;
  margin: var(--space-2) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.visit-details li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.visit-details svg { width: 1.15rem; height: 1.15rem; color: var(--color-accent); flex: none; }
.visit-details a { color: var(--color-ink); text-decoration: underline; text-underline-offset: 2px; }

.hours-table {
  border-collapse: collapse;
  margin: var(--space-2) 0 var(--space-3);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  width: 100%;
  max-width: 26rem;
}
.hours-table th, .hours-table td {
  text-align: left;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(137, 118, 102, 0.25);
  font-weight: 400;
}
.hours-table th {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-ink);
}
.hours-table th svg { width: 1rem; height: 1rem; color: var(--color-accent); flex: none; }
.hours-table td { color: var(--color-text-muted); }
.visit-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---------- notes / blog ---------- */
.notes-grid { margin-top: var(--space-4); }
.note-card { padding: 0; overflow: hidden; background: #f3efe9; }
.note-thumb { aspect-ratio: 4 / 3; overflow: hidden; }
.note-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-card h3, .note-card p { padding-inline: var(--space-3); }
.note-card h3 { margin-top: var(--space-2); margin-bottom: 0.4rem; font-size: 1.15rem; }
.note-card p { color: var(--color-text-muted); margin-bottom: var(--space-3); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--color-accent-2);
  color: #e7ded3;
  padding-top: var(--space-5);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fbf7f2;
  margin-bottom: 0.5rem;
}
.footer-brand p { margin: 0 0 0.35rem; color: #cfc4b7; }
.footer-brand a { color: #cfc4b7; }
.footer-social { font-family: var(--font-ui); letter-spacing: 0.04em; }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: var(--font-ui);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}
.footer-nav a { color: #e7ded3; text-decoration: none; }
.footer-nav a:hover { color: var(--color-accent); }
.footer-bottom {
  padding-block: var(--space-3);
  font-size: 0.8rem;
  color: #a99c8c;
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.hero-content .reveal { transition-delay: 0.1s; }
.hero-content .reveal:nth-child(2) { transition-delay: 0.22s; }
.hero-content .reveal:nth-child(3) { transition-delay: 0.34s; }
.hero-content .reveal:nth-child(4) { transition-delay: 0.46s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: none; }
  .btn, .style-card, .gallery-grid img { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 992px) {
  .about-grid, .pricing-grid, .visit-grid {
    grid-template-columns: 1fr;
  }
  .about-photo, .visit-photo { order: -1; max-width: 26rem; }
}

@media (max-width: 768px) {
  .hero { min-height: 100vh; align-items: flex-end; }
  .site-header .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-accent-2);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3);
    gap: var(--space-2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .site-header .nav-links.open { display: flex; }
  .footer-grid { flex-direction: column; }
}
