:root {
  --bg: #0B0C0C;
  --bg-2: #121414;
  --surface: #181B1A;
  --surface-2: #202423;
  --emerald: #059674;
  --emerald-light: #10B981;
  --emerald-deep: #046C53;
  --emerald-glow: rgba(5, 150, 116, 0.25);
  --text: #EEF2F0;
  --text-dim: #9EA8A3;
  --line: rgba(5, 150, 116, 0.2);
  --display: 'Bebas Neue', sans-serif;
  --serif: 'Cormorant Garamond', serif;
  --body: 'Inter', sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--emerald); color: #fbf8e0; }
a { color: inherit; text-decoration: none; cursor: pointer; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Overlays ---------- */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 9998; box-shadow: inset 0 0 220px rgba(0,0,0,.8); }
:focus-visible { outline: 2px solid var(--emerald-light); outline-offset: 3px; }

/* ---------- Typography & Utility ---------- */
.eyebrow {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  letter-spacing: .04em; color: var(--emerald-light); font-size: 1.05rem;
  display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 22px; height: 1px; background: var(--emerald-deep); }
.eyebrow.left::after, .eyebrow.left::before { display: none; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1; text-transform: uppercase; }
h2 { font-size: clamp(2.4rem, 5vw, 4rem); color: var(--text); }
h2 span { color: var(--emerald-light); }
p { color: var(--text-dim); line-height: 1.7; font-size: 1rem; }

/* ---------- Buttons ---------- */
.emerald-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  background: linear-gradient(180deg, var(--emerald-light), var(--emerald) 60%, var(--emerald-deep));
  color: #ffffff; font-weight: 700; font-size: .82rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .95rem 1.8rem; border-radius: 2px; border: none;
  box-shadow: 0 6px 18px var(--emerald-glow), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.emerald-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(5, 150, 116, 0.4), inset 0 1px 0 rgba(255,255,255,.4); }

.ghost-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  border: 1px solid var(--line); color: var(--text);
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  padding: .9rem 1.7rem; border-radius: 2px; background: transparent;
  transition: border-color .3s, color .3s, background .3s;
}
.ghost-btn:hover { border-color: var(--emerald); color: var(--emerald-light); background: rgba(5, 150, 116, 0.08); }

.ghost-btn.dark-variant {
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  background: rgba(0, 0, 0, 0.2);
}
.ghost-btn.dark-variant:hover {
  background: #ffffff;
  color: var(--emerald-deep);
  border-color: #ffffff;
}

/* ---------- Navigation ---------- */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem clamp(1.2rem, 5vw, 3.5rem);
  background: linear-gradient(180deg, rgba(11,12,12,.95), rgba(11,12,12,0));
  backdrop-filter: blur(6px); transition: padding .35s var(--ease), background .35s;
}
header.nav.scrolled { padding: .8rem clamp(1.2rem, 5vw, 3.5rem); background: rgba(11,12,12,.92); border-bottom: 1px solid var(--line); }

.brand { display: flex; align-items: center; gap: .8rem; cursor: pointer; }
.brand .brand-logo-small { width: 34px; height: 34px; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand .mark { font-family: var(--display); font-size: 1.7rem; letter-spacing: .08em; color: var(--text); }
.brand .mark em { font-style: normal; color: var(--emerald-light); }
.brand .sub { font-family: var(--serif); font-style: italic; font-size: .7rem; color: var(--text-dim); letter-spacing: .14em; margin-top: 2px; }

nav.links { display: flex; align-items: center; gap: 2.4rem; }
nav.links button.tab {
  background: none; border: none; color: var(--text-dim); font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  position: relative; padding: .4rem 0; transition: color .3s;
}
nav.links button.tab::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0%;
  background: var(--emerald-light); transition: width .35s var(--ease);
}
nav.links button.tab:hover { color: var(--text); }
nav.links button.tab.active { color: var(--emerald-light); }
nav.links button.tab.active::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 1.2rem; }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--text); display: block; }

/* ---------- Views ---------- */
main { position: relative; min-height: 100vh; }
.view { display: none; animation: viewIn .7s var(--ease); }
.view.active { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.section { padding: 7.5rem clamp(1.2rem, 6vw, 5rem); max-width: 1340px; margin: 0 auto; }
.section.tight { padding-top: 5rem; padding-bottom: 5rem; }

/* ---------- HERO ---------- */
.hero {
  position: relative; 
  min-height: 100vh; 
  display: grid; 
  grid-template-columns: 1fr 1fr;
  align-items: center; 
  padding: 0 clamp(1.2rem, 6vw, 5rem); 
  overflow: hidden;
  gap: 2rem;
}

.hero-bg-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('hero.png');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  opacity: 0.3;
  z-index: 0; 
}

.hero-content { position: relative; z-index: 1; max-width: 600px; }
.hero h1 { font-size: clamp(3.2rem, 7vw, 5.8rem); margin: .6rem 0 1.4rem; color: var(--text); }
.hero h1 em { font-style: normal; color: var(--emerald-light); }
.hero p.lead { font-size: 1.08rem; max-width: 480px; margin-bottom: 2.4rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-logo-stage {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 380px; width: 100%; overflow: visible; padding-bottom: 2rem;
}
.glow-backdrop {
  position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, var(--emerald-glow) 0%, transparent 70%);
  filter: blur(40px); animation: pulseGlow 4s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.15); opacity: 0.9; }
}

.reconstruction-svg { 
  width: 100%; max-width: 260px; height: auto; position: relative; z-index: 2; overflow: visible !important; 
}

.reconstruction-svg .logo-part { opacity: 0; }
.reconstruction-svg.animating .accent-ring { animation: spinRing 20s linear infinite, fadeIn .8s var(--ease) forwards; }
.reconstruction-svg.animating .part-straight { animation: slideFromTop 1s var(--ease) .3s forwards; }
.reconstruction-svg.animating .part-angled { animation: slideFromRight 1s var(--ease) .6s forwards; }
.reconstruction-svg.animating .part-emerald-outer { animation: drawLoop 1.2s var(--ease) .9s forwards; }
.reconstruction-svg.animating .part-dot { animation: popDot .5s var(--ease) 1.8s forwards; }

@keyframes spinRing { 100% { transform: rotate(360deg); transform-origin: 100px 100px; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideFromTop { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideFromRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes drawLoop { from { opacity: 0; transform: scale(0.8) rotate(-15deg); transform-origin: 100px 100px; } to { opacity: 1; transform: scale(1) rotate(0deg); transform-origin: 100px 100px; } }
@keyframes popDot { 0% { opacity: 0; transform: scale(0); transform-origin: 106px 116px; } 70% { opacity: 1; transform: scale(1.4); transform-origin: 106px 116px; } 100% { opacity: 1; transform: scale(1); transform-origin: 106px 116px; } }

.hero-brand-text { margin-top: 0.5rem; text-align: center; z-index: 2; }
.title-kaleb { font-family: var(--display); font-size: 2.5rem; color: var(--emerald-light); letter-spacing: 6px; margin: 0; line-height: 1; }
.typewriter-container { display: inline-flex; align-items: center; justify-content: center; margin-top: 0.3rem; min-height: 1.5rem; }
.subtitle-salon { font-family: var(--display); font-size: 1.1rem; color: #EEE7DA; letter-spacing: 5px; opacity: 0.95; white-space: pre; }
.typing-cursor { font-family: var(--display); font-size: 1.1rem; color: var(--emerald-light); margin-left: 2px; animation: blinkCursor 0.7s infinite; }
@keyframes blinkCursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.replay-btn {
  margin-top: 1.2rem; background: transparent; border: 1px solid var(--line); color: var(--text-dim);
  font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: .5rem 1rem; border-radius: 20px;
  display: inline-flex; align-items: center; gap: .5rem; transition: all .3s; z-index: 3;
}
.replay-btn:hover { border-color: var(--emerald-light); color: var(--text); background: rgba(5,150,116,0.1); }

/* ---------- Quick Info Strip ---------- */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface);
}
.strip .item { padding: 2rem 1.6rem; border-right: 1px solid var(--line); }
.strip .item:last-child { border-right: none; }
.strip .item .k { font-family: var(--display); font-size: 1.9rem; color: var(--emerald-light); }
.strip .item .v { font-size: .78rem; color: var(--text-dim); letter-spacing: .1em; text-transform: uppercase; margin-top: .3rem; }

/* ---------- WHY KALEB SALON (GLASS CARD DECK DESIGN) ---------- */
.feat-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 1.8rem; 
  margin-top: 3rem; 
}

.feat-card { 
  position: relative;
  background: rgba(24, 27, 26, 0.7); 
  border: 1px solid rgba(255, 255, 255, 0.08); 
  border-radius: 6px;
  padding: 0; 
  backdrop-filter: blur(12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}

/* Image takes 30% of the card, content takes the remaining 70% */
.feat-card-img-wrap {
  flex: 0 0 30%;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #000;
}
.feat-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%);
  transition: filter 0.4s, transform 0.4s;
}
.feat-card:hover .feat-card-img-wrap img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.feat-card-body {
  flex: 1;
  padding: 1.8rem 1.8rem 2.2rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.feat-card-body p {
  overflow: hidden;
}

/* Light top accent bar */
.feat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--emerald-light), transparent);
  opacity: 0.3;
  transition: opacity 0.4s;
}

.feat-card:hover { 
  transform: translateY(-8px); 
  border-color: var(--emerald-light); 
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4), 0 0 20px var(--emerald-glow);
}

.feat-card:hover::before { opacity: 1; }

.icon-badge {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(5, 150, 116, 0.15);
  border: 1px solid var(--emerald-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  transition: transform 0.4s var(--ease);
}

.feat-card:hover .icon-badge {
  transform: scale(1.1) rotate(6deg);
  background: var(--emerald);
  color: #fff;
}

.feat-card h3 { 
  font-size: 1.6rem; 
  color: var(--text); 
  margin-bottom: 0.6rem; 
}

.feat-card p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Scroll Animation Trigger Classes */
.animate-on-scroll .feat-card {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), border-color 0.4s, box-shadow 0.4s;
}

.animate-on-scroll.is-visible .feat-card:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.animate-on-scroll.is-visible .feat-card:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.animate-on-scroll.is-visible .feat-card:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }

/* ---------- TOP 5 SERVICES (PRIMARY GREEN SECTION) ---------- */
.home-services-highlight {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-deep) 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.3);
}

.menu-list-light {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin-top: 2.2rem;
}
.menu-list-light .menu-row { border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.menu-list-light .menu-row-title { color: #ffffff; }
.menu-list-light .menu-row-leader { border-bottom-color: rgba(255, 255, 255, 0.35); }
.menu-list-light .menu-row-desc { color: rgba(255, 255, 255, 0.78); }
.menu-list-light .menu-row-duration { color: #ffffff; background: rgba(0, 0, 0, 0.22); }
.menu-list-light .popular-flag { background: #ffffff; color: var(--emerald-deep); }

.home-services-cta {
  margin-top: 3rem;
  text-align: center;
}

/* Style Catalog Cards */
.style-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.style-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: transform 0.3s, border-color 0.3s; display: flex; flex-direction: column; }
.style-card:hover { transform: translateY(-5px); border-color: var(--emerald); }
.style-card-img-wrap { width: 100%; height: 220px; overflow: hidden; position: relative; background: #000; }
.style-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter 0.3s, transform 0.3s; }
.style-card:hover .style-card-img-wrap img { filter: grayscale(0%); transform: scale(1.05); }
.style-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.style-card h4 { font-family: var(--display); font-size: 1.5rem; color: var(--text); margin-bottom: 0.4rem; }
.style-card .meta { font-size: 0.75rem; color: var(--emerald-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.8rem; }
.style-card p { font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 1rem; }

/* ---------- Team & After-Cut Banner ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; margin-top: 3rem; }
.barber-card { background: var(--surface); border: 1px solid var(--line); padding: 1.6rem 1.4rem 1.9rem; text-align: center; }
.avatar { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 1.2rem; background: var(--emerald-deep); border: 2px solid var(--emerald-light); display: flex; align-items: center; justify-content: center; }
.avatar .inner { font-family: var(--display); font-size: 2rem; color: var(--text); }
.barber-card h4 { font-size: 1.4rem; color: var(--text); }
.barber-card .role { font-family: var(--serif); font-style: italic; color: var(--emerald-light); font-size: .92rem; margin: .25rem 0 .8rem; }
.barber-card .exp { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: .9rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.tags span { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); padding: .3rem .6rem; color: var(--text-dim); }

.team-section-divider { grid-column: 1 / -1; font-family: var(--display); font-size: 2rem; color: var(--emerald-light); letter-spacing: 0.05em; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; margin-top: 2.5rem; }
.team-group-photo-card { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem; }
@media (min-width: 768px) { .team-group-photo-card { flex-direction: row; align-items: center; } }
.group-image-container { width: 100%; min-height: 220px; background: rgba(0,0,0,0.4); border: 1px solid var(--line); border-radius: 4px; position: relative; }
@media (min-width: 768px) { .group-image-container { width: 45%; } }
.group-info-pane { flex: 1; }

/* ---------- Testimonials & VIP Banner ---------- */
.testi-wrap { margin-top: 3rem; position: relative; }
.testi { max-width: 760px; margin: 0 auto; text-align: center; display: none; }
.testi.show { display: block; animation: fadeUp .6s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.testi p { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--text); line-height: 1.6; }
.testi .who { margin-top: 1.4rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--emerald-light); }
.testi-dots { display: flex; justify-content: center; gap: .6rem; margin-top: 2rem; }
.testi-dots button { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--emerald); background: transparent; }
.testi-dots button.active { background: var(--emerald-light); }

.vip-banner { background: linear-gradient(135deg, #092019 0%, #050606 100%); border: 1px solid var(--emerald); border-radius: 4px; padding: 2.5rem; margin: 4rem 0; display: flex; flex-direction: column; gap: 1.5rem; position: relative; overflow: hidden; }
@media(min-width: 768px) { .vip-banner { flex-direction: row; align-items: center; justify-content: space-between; } }
.vip-badge { background: var(--emerald); color: #fff; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.3rem 0.8rem; border-radius: 2px; display: inline-block; margin-bottom: 0.8rem; }

.cta-banner { margin-top: 6rem; padding: 4.5rem 2rem; text-align: center; background: radial-gradient(ellipse at center, var(--emerald-glow), transparent 70%), var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-banner h2 { margin-bottom: 1.2rem; }
.cta-banner p { max-width: 500px; margin: 0 auto 2rem; }

/* ---------- About Section ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-hero p { margin-top: 1.2rem; }
.about-hero .stat-row { display: flex; gap: 2.4rem; margin-top: 2.2rem; }
.about-hero .stat-row .s { font-family: var(--display); font-size: 2.2rem; color: var(--emerald-light); }
.about-hero .stat-row .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); }
.about-visual { aspect-ratio: 4/5; border: 1px solid var(--line); position: relative; overflow: hidden; background: linear-gradient(160deg, #182420, #0B0C0C); display: flex; align-items: center; justify-content: center; }
.about-visual-img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }

/* ---------- Menu-Style Service Listing (Home strip + Services page) ---------- */
.menu-list { display: flex; flex-direction: column; margin-top: 1rem; }
.menu-row {
  display: flex; align-items: baseline; gap: 0.6rem; padding: 1.15rem 0.2rem;
  border-bottom: 1px dashed var(--line); position: relative;
}
.menu-row:first-child { border-top: 1px dashed var(--line); }
.menu-row-head { display: flex; align-items: baseline; gap: 0.6rem; flex: 1; min-width: 0; }
.menu-row-title {
  font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.02em; color: var(--text);
  white-space: nowrap; flex-shrink: 0; display: flex; align-items: center; gap: 0.5rem;
}
.menu-row-leader { flex: 1; border-bottom: 1px dotted var(--line); margin-bottom: 0.35rem; min-width: 20px; }
.menu-row-duration {
  flex-shrink: 0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--emerald-light);
  background: rgba(5,150,116,0.1); border: 1px solid var(--line); padding: 0.3rem 0.7rem; border-radius: 20px; white-space: nowrap;
}
.menu-row-desc { flex-basis: 100%; font-size: 0.85rem; color: var(--text-dim); line-height: 1.55; margin-top: 0.4rem; }
.menu-row .popular-flag {
  flex-shrink: 0; background: var(--emerald); color: #fff; font-size: 0.6rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.5rem; border-radius: 3px;
}
.menu-row:hover .menu-row-title { color: var(--emerald-light); }

.packages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.package-card { background: var(--surface); border: 1px solid var(--line); padding: 2rem; border-radius: 4px; display: flex; flex-direction: column; justify-content: space-between; }
.package-card.featured { border-color: var(--emerald); background: rgba(5, 150, 116, 0.05); }
.package-note { font-size: 0.78rem; color: var(--emerald-light); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1rem; font-weight: 600; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.g-item { position: relative; aspect-ratio: 4/3; border: 1px solid var(--line); overflow: hidden; cursor: pointer; display: flex; align-items: flex-end; }
.g-item .fill { position: absolute; inset: 0; transition: transform .6s var(--ease); }
.g-item:hover .fill { transform: scale(1.06); }
.g-item .lbl { position: relative; z-index: 2; padding: .9rem 1rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,.7), transparent); width: 100%; }
.g-item.tall { grid-row: span 2; aspect-ratio: auto; }
.g-item.wide { grid-column: span 2; aspect-ratio: auto; }

/* ---------- Contact & Form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.hours-table { width: 100%; margin-bottom: 2rem; border-collapse: collapse; }
.hours-table td { padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--text-dim); }
.hours-table td:last-child { text-align: right; color: var(--text); }
.map-block { background: var(--surface); border: 1px solid var(--line); padding: 1.5rem; }
.map-block .pin { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--text); }
.form-wrap { background: var(--surface); border: 1px solid var(--line); padding: 2.4rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: .5rem; }
.field input, .field select { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: .85rem .9rem; border-radius: 2px; }
.field input:focus, .field select:focus { border-color: var(--emerald-light); outline: none; }
.field-hint { text-transform: none; letter-spacing: normal; color: var(--text-dim); font-size: 0.7rem; }

.service-checkbox-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.5rem; }
.checkbox-loading { grid-column: 1 / -1; color: var(--text-dim); font-size: 0.85rem; padding: 0.4rem 0; }
.service-checkbox-item {
  display: flex; align-items: center; gap: 0.55rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0.55rem 0.7rem;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.service-checkbox-item:hover { border-color: var(--emerald); }
.service-checkbox-item.checked { border-color: var(--emerald); background: rgba(5,150,116,0.08); }
.service-checkbox-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--emerald); flex-shrink: 0; margin: 0; }
.service-checkbox-item .sci-title { font-size: 0.8rem; color: var(--text); font-weight: 500; line-height: 1.25; flex: 1; min-width: 0; }
.service-checkbox-item .sci-meta { font-size: 0.65rem; color: var(--text-dim); white-space: nowrap; flex-shrink: 0; }

.price-total-box {
  display: flex; align-items: center; justify-content: space-between; margin-top: 1rem;
  background: rgba(5,150,116,0.1); border: 1px solid var(--emerald); border-radius: 4px; padding: 0.9rem 1.1rem;
}
.price-total-box span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.price-total-box strong { font-family: var(--display); font-size: 1.5rem; color: var(--emerald-light); letter-spacing: 0.03em; }

/* ---------- Booking Confirmation Popup ---------- */
.confirm-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; z-index: 3000; padding: 1.2rem;
}
.confirm-overlay.show { display: flex; }
.confirm-box {
  background: var(--surface); border: 1px solid var(--emerald); border-radius: 8px; padding: 2rem;
  max-width: 460px; width: 100%; max-height: 88vh; overflow-y: auto; position: relative;
  animation: fadeUp 0.35s var(--ease);
}
.confirm-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; }
.confirm-box h3 { font-family: var(--display); font-size: 1.8rem; letter-spacing: 0.03em; margin-bottom: 0.4rem; padding-right: 1.5rem; }
.confirm-subtitle { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.4rem; }
.confirm-summary { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.5rem; }
.confirm-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.confirm-row span:first-child { color: var(--text-dim); }
.confirm-row span:last-child { color: var(--text); font-weight: 500; text-align: right; }
.confirm-services-list { list-style: none; margin: 0; padding: 0; text-align: right; }
.confirm-services-list li { color: var(--text); font-weight: 500; font-size: 0.85rem; }
.confirm-note { font-size: 0.75rem; color: var(--text-dim); text-align: center; margin-top: 1rem; }
.confirm-actions { display: flex; gap: 0.8rem; margin-top: 1.4rem; }
.confirm-actions .ghost-btn, .confirm-actions .emerald-btn { flex: 1; justify-content: center; }

/* ---------- Admin Panel & Modal Utility ---------- */
.login-form-container { max-width: 420px; margin: 4rem auto; padding: 2.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.login-form-container h3 { font-family: var(--display); font-size: 2rem; letter-spacing: 0.05em; margin-bottom: 0.5rem; color: var(--text); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 0.5rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); padding: 0.8rem; color: var(--text); font-family: var(--body); border-radius: 2px; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--emerald-light); outline: none; }
.form-group input[type="file"] { padding: 0.6rem; font-size: 0.85rem; cursor: pointer; }

.admin-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; margin-bottom: 3rem; }
.admin-flex-row { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.admin-card { flex: 1; min-width: 300px; background: var(--surface); border: 1px solid var(--line); padding: 1.5rem; border-radius: 4px; }
.admin-card h3 { font-family: var(--display); font-size: 1.8rem; letter-spacing: 0.05em; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.5rem; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.9rem; }
.admin-table th { text-align: left; padding: 0.6rem; color: var(--text-dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 0.8rem 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: top; }
.action-btns { display: flex; gap: 0.5rem; }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.75rem; font-family: var(--body); font-weight: 600; text-transform: uppercase; cursor: pointer; border-radius: 2px; }
.btn-edit { background: transparent; border: 1px solid var(--emerald); color: var(--emerald-light); }
.btn-edit:hover { background: var(--emerald); color: var(--text); }
.btn-delete { background: transparent; border: 1px solid #ef4444; color: #f87171; }
.btn-delete:hover { background: #ef4444; color: var(--text); }
.btn-add { background: var(--emerald); border: none; color: white; display: inline-flex; align-items: center; margin-bottom: 1rem; }
.error-msg { color: #f87171; font-size: 0.85rem; margin-top: 0.5rem; display: none; }
.upload-preview-thumbnail { width: 100%; height: 120px; background-size: cover; background-position: center; border: 1px solid var(--line); margin-top: 0.5rem; display: none; border-radius: 2px; }

#crudManagementModal .box {
  background: var(--surface);
  max-width: 500px;
  width: 90%;
  padding: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

/* ---------- Lightbox & FAB ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(8px); z-index: 1000; display: none; align-items: center; justify-content: center; }
.lightbox.show { display: flex; }
.lightbox .box { width: min(560px, 90vw); aspect-ratio: 4/5; border: 1px solid var(--line); position: relative; }
.lightbox .close { position: absolute; top: -2.6rem; right: 0; background: none; border: none; color: #fff; font-size: 1.6rem; }

.fab { position: fixed; right: 1.6rem; bottom: 1.6rem; z-index: 400; width: 52px; height: 52px; border-radius: 50%; background: var(--emerald); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(5,150,116,0.4); transition: transform .3s var(--ease); }
.fab:hover { transform: scale(1.1); }

/* ---------- Footer ---------- */
footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 4rem clamp(1.2rem, 6vw, 5rem) 2rem; margin-top: 4rem; }
.foot-inner { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 3rem; }
.ftitle { font-family: var(--display); font-size: 1.2rem; letter-spacing: .08em; margin-bottom: 1rem; color: var(--text); }
footer .fcol a { display: block; font-size: .86rem; color: var(--text-dim); margin-bottom: .55rem; transition: color .3s; }
footer .fcol a:hover { color: var(--emerald-light); }
.foot-bottom { max-width: 1340px; margin: 3rem auto 0; border-top: 1px solid var(--line); padding-top: 1.5rem; font-size: .75rem; color: var(--text-dim); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* Mobile Adaptations */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 7rem; padding-bottom: 4rem; }
  .hero-logo-stage { order: -1; padding-top: 1rem; padding-bottom: 3rem; }
  .hero-content { order: 1; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  nav.links { position: fixed; top: 0; right: 0; width: 60%; height: auto; background: var(--emerald-light); display: flex; flex-direction: column; align-items: flex-start; padding: 6rem 2rem 2rem 2rem; gap: 1.5rem; transform: translateX(100%); transition: transform .4s var(--ease); z-index: 1000; border-bottom-left-radius: 20px; }
  nav.links.open { transform: translateX(0); }
  nav.links button.tab { font-family: var(--display); font-size: 1.5rem; color: #000000; }
  nav.links button.tab.active { color: #ffffff; }
  nav.links a.nav-login-mobile {
    font-family: var(--body); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: #000; text-decoration: none; border-top: 1px solid rgba(0,0,0,0.2);
    padding-top: 1.2rem; margin-top: 0.4rem; width: 100%;
  }
  .burger { display: flex; z-index: 1001; }
  .nav-cta .emerald-btn { display: none; }
}
@media (max-width: 760px) {
  .strip { grid-template-columns: repeat(2, 1fr); }
  .foot-inner { grid-template-columns: 1fr; }
  .about-hero { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .team-grid, .feat-grid, .gallery-grid { grid-template-columns: 1fr; }
  .feat-card { height: 420px; }
}

/* ================= DEDICATED MOBILE PASS ================= */
@media (max-width: 900px) {
  .nav-cta { gap: 0.6rem; }
  .nav-cta a.ghost-btn { display: none; } /* Login moves into the slide-out menu below */
  .nav-login-mobile { display: block !important; }
}
@media (max-width: 640px) {
  header.nav { padding: 1rem 1.1rem; }
  header.nav.scrolled { padding: 0.7rem 1.1rem; }
  .brand .mark { font-size: 1.35rem; }
  .brand .sub { font-size: 0.62rem; }
  .brand .brand-logo-small { width: 28px; height: 28px; }

  .section { padding-left: 1.1rem; padding-right: 1.1rem; padding-top: 4.5rem; padding-bottom: 3.5rem; }
  .section.tight { padding-top: 3.5rem; padding-bottom: 3.5rem; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .emerald-btn, .hero-actions .ghost-btn { justify-content: center; }

  /* Menu-style service listing: stack title/duration when space is tight */
  .menu-row { flex-wrap: wrap; padding: 1rem 0; }
  .menu-row-head { flex-wrap: wrap; row-gap: 0.4rem; }
  .menu-row-title { font-size: 1.15rem; white-space: normal; }
  .menu-row-leader { display: none; }
  .menu-row-duration { margin-left: auto; }

  /* Booking form */
  .form-wrap { padding: 1.4rem 1.1rem; }
  .contact-info { padding: 0 0.1rem; }
  .service-checkbox-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .booking-toggle-btn { padding: 0.7rem 0.5rem; font-size: 0.72rem; letter-spacing: 0.04em; }
  .booking-toggle-btn span { display: inline-block; }

  /* Confirmation popup */
  .confirm-box { padding: 1.5rem 1.2rem; }
  .confirm-box h3 { font-size: 1.5rem; }
  .confirm-row { flex-direction: column; gap: 0.2rem; }
  .confirm-row span:last-child { text-align: left; }
  .confirm-services-list { text-align: left; }

  /* About stats */
  .about-hero .stat-row { gap: 1.4rem; flex-wrap: wrap; }
  .about-hero .stat-row .s { font-size: 1.8rem; }

  .testi p { font-size: 1.15rem; }

  .packages-grid { grid-template-columns: 1fr; }
  .package-card { padding: 1.5rem; }
}
@media (max-width: 400px) {
  .confirm-actions { flex-direction: column; }
  .service-checkbox-list { grid-template-columns: 1fr; }
  .top5-service-item, .stat-row { gap: 1rem; }
  .booking-toggle-wrapper { flex-direction: column; }
}

/* ================= WHY KALEB SALON (EDITORIAL FLOW LAYOUT) ================= */
.why-kaleb-section {
  position: relative;
}

/* Grid layout for Desktop */
.values-flow {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3.5rem 4rem;
  position: relative;
}

/* The item container - No background boxes */
.value-flow-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  position: relative;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}

.value-flow-item:hover {
  transform: translateX(6px);
  border-bottom-color: var(--emerald-light);
}

/* Number & Icon styling */
.value-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.value-num {
  font-family: var(--display);
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  transition: color 0.4s;
}

.value-flow-item:hover .value-num {
  color: var(--emerald-light);
}

.value-icon {
  font-size: 1.2rem;
  margin-top: 0.4rem;
  filter: grayscale(40%);
  transition: transform 0.3s var(--ease), filter 0.3s;
}

.value-flow-item:hover .value-icon {
  transform: scale(1.2) rotate(-8deg);
  filter: grayscale(0%);
}

/* Content typography */
.value-content h3 {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.value-content p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Scroll Animation */
.animate-on-scroll .value-flow-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), border-color 0.4s;
}

.animate-on-scroll.is-visible .value-flow-item:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.animate-on-scroll.is-visible .value-flow-item:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.animate-on-scroll.is-visible .value-flow-item:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.animate-on-scroll.is-visible .value-flow-item:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.55s; }


/* ================= MOBILE EXPERIMENTAL TIMELINE VIEW ================= */
@media (max-width: 768px) {
  .values-flow {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(5, 150, 116, 0.25); /* Connecting timeline line */
    margin-left: 0.5rem;
  }

  .value-flow-item {
    padding-bottom: 1.2rem;
    border-bottom: none;
  }

  /* Dot on timeline */
  .value-flow-item::before {
    content: "";
    position: absolute;
    left: -1.45rem;
    top: 0.6rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--emerald-light);
    transition: background 0.3s;
  }

  .value-flow-item:hover::before {
    background: var(--emerald-light);
  }

  .value-meta {
    flex-direction: row;
    gap: 0.6rem;
    align-items: baseline;
    min-width: auto;
  }

  .value-num {
    font-size: 1.6rem;
  }

  .value-flow-item {
    flex-direction: column;
    gap: 0.4rem;
  }
}
/* Ensure the highlighted span inside the green background section renders in crisp black */
.home-services-highlight h2 span {
  color: #000000 !important;
}
/* ================= BOOKING TYPE TOGGLE SWITCH ================= */
.booking-toggle-wrapper {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 4px;
}

.booking-toggle-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.booking-toggle-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.booking-toggle-btn.active {
  background: var(--emerald);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--emerald-glow);
}

.booking-toggle-btn#btnVip.active {
  background: linear-gradient(135deg, #059674 0%, #10B981 100%);
}

.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.8rem;
  color: var(--text);
  font-family: var(--body);
  border-radius: 2px;
  resize: vertical;
}

.field textarea:focus {
  border-color: var(--emerald-light);
  outline: none;
}
/* Time Slots Grid Styling */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.slot-btn {
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: center;
  transition: all 0.2s ease;
}

.slot-btn:hover:not(.disabled) {
  border-color: var(--emerald);
  color: var(--emerald-light);
}

.slot-btn.selected {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald);
}

.slot-btn.disabled {
  background: #2a2a2a;
  color: #666;
  border-color: #333;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Admin Dashboard Table Styles */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
}

.admin-table th, .admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.admin-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-vip {
  background: #059674;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: bold;
}

.badge-standard {
  background: #334155;
  color: #cbd5e1;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.badge-urgent {
  background: #ef4444;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  animation: pulse 1.5s infinite;
}
/* Footer Map - Full width bottom section */
.foot-map-section {
  max-width: 1340px;
  margin: 2.5rem auto 0;
  padding: 0 clamp(1.2rem, 6vw, 3rem);
}

.foot-map-frame {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.foot-map-frame iframe {
  display: block;
}

/* Slightly tighter top grid */
.foot-inner {
  gap: 2.5rem;
}

/* Mobile */
@media (max-width: 760px) {
  .foot-map-section {
    padding: 0 1.2rem;
  }
  .foot-map-frame {
    height: 200px;
  }
}
/* --- Unique Exhibition 3D Deck Canvas Styling --- */
.kms-exh-viewport {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  perspective: 1200px;
}

.kms-exh-stage {
  position: relative;
  width: 100%;
  height: 380px;
  transform-style: preserve-3d;
}

/* Staged Cards Base Setup */
.kms-exh-card {
  position: absolute;
  top: 0;
  left: 32%;
  width: 36%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, filter 0.6s ease;
  transform-origin: center center;
  will-change: transform, opacity;
}

/* Elite Museum Looking Frame Container */
.kms-exh-frame {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  border: 1px solid var(--emerald);
  background: #0b0c0c;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  position: relative;
}

.kms-exh-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Captions Overlay Plate */
.kms-exh-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #050606 0%, rgba(5,6,6,0.8) 70%, transparent 100%);
  padding: 2.5rem 1rem 1rem;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.kms-exh-controls {
  margin-top: 1.5rem;
  z-index: 30;
}

/* Perfect Smart Phone Responsiveness Layout Override */
@media (max-width: 768px) {
  .kms-exh-viewport {
    height: 380px;
  }
  .kms-exh-stage {
    height: 290px;
  }
  .kms-exh-card {
    left: 12%;
    width: 76%;
  }
  .kms-exh-caption {
    font-size: 1rem;
    padding: 1.5rem 0.5rem 0.8rem;
  }
}
/* --- Outer Breakout Wrapper to Prevent Mobile Overflow --- */
.kms-marquee-section-container {
  width: 100%;
  overflow: hidden; /* Hard prevents any horizontal page scrolling layout breaks */
}

/* --- Full Width End-to-End Horizontal Divider Line --- */
.kms-service-divider {
  border: 0;
  height: 2px;
  background: var(--emerald);
  margin: 4rem 0;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
}

/* --- Infinite Continuous Rightward Product Marquee --- */
.kms-product-marquee-wrapper {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  padding: 2.5rem 0; /* Adjusted vertical breathing space to balance out image sizing */
  background: var(--emerald); 
}

/* Grayscale + 25% Opacity Background Layer Engine */
.kms-marquee-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/back.png');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  opacity: 0.25; 
  pointer-events: none;
  z-index: 1;
}

.kms-marquee-title {
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: var(--display);
  font-size: 1.4rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.kms-marquee-viewport {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: hidden;
}

.kms-marquee-track {
  display: flex;
  width: max-content;
  gap: 5rem; /* Generous space between the large items */
  align-items: center;
  animation: kmsInfiniteScrollRight 38s linear infinite;
}

.kms-marquee-track:hover {
  animation-play-state: paused;
}

/* Equalized bounding container frames to keep sizing identical */
.kms-marquee-item {
  width: 200px;  /* Locked exact width footprint */
  height: 200px; /* Locked exact vertical space alignment */
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  flex-shrink: 0; /* Prevents browser squeezing images out of proportion */
}

/* Enforce precise image constraints within the larger bar space */
.kms-marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Scales different image dimensions proportionally to fill frame cleanly */
  filter: none !important;
  -webkit-filter: none !important;
}

/* Hardware Accelerated Continuous Translation */
@keyframes kmsInfiniteScrollRight {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* --- Mobile Device Balance & Safety Overrides --- */
@media (max-width: 768px) {
  .kms-service-divider {
    margin: 2.5rem 0;
    width: 100%; /* Switch to normal box model on mobile to naturally kill scrolling errors */
    left: 0;
    transform: none;
  }
  
  .kms-product-marquee-wrapper {
    padding: 2rem 0;
    width: 100%; /* Switch to normal box model on mobile to naturally kill scrolling errors */
    left: 0;
    transform: none;
  }
  
  .kms-marquee-track {
    gap: 3rem;
    animation-duration: 25s;
  }
  
  .kms-marquee-item {
    width: 130px;  /* Equalized mobile size proportions */
    height: 130px; /* Equalized mobile height proportions */
  }
}
/* Container & Section Architecture */
.magic-experience-section {
    position: relative;
    padding: 100px 20px;
    background-color: var(--bg-2);
    overflow: hidden;
    width: 100%;
}

.magic-header {
    text-align: center;
    margin-bottom: 60px;
}

.magic-subtitle {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--emerald);
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.magic-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* 3D Viewport Box */
.magic-container {
    position: relative;
    max-width: 900px;
    height: 500px;
    margin: 0 auto;
    perspective: 1500px; /* Gives depth to the Z-axis layers */
    display: flex;
    align-items: center;
    justify-content: center;
}

.magic-3d-stage {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* The Infinite Layered Cards */
.magic-card {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 16px;
    overflow: hidden;
    /* Smooth transitions for all depth properties */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                filter 0.8s ease;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none; /* Deactivate non-focused items */
}

.magic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Glassmorphic Overlay Detail */
.magic-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
}

.magic-card-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.magic-card-overlay p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    line-height: 1.5;
}

/* Geometric Minimalist Progress Dots */
.magic-nav-indicators {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.magic-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    cursor: pointer;
}

.magic-dot.active {
    background: var(--emerald);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--emerald);
}

/* ========================================== */
/* RESPONSIVE DESIGN - PERFECT MOBILE VIEW    */
/* ========================================== */
@media (max-width: 768px) {
    .magic-experience-section {
        padding: 60px 15px;
    }
    
    .magic-title {
        font-size: 1.85rem;
    }
    
    .magic-container {
        height: 400px; /* Compact height for smaller mobile aspect ratios */
    }
    
    .magic-card-overlay {
        padding: 20px;
    }
    
    .magic-card-overlay h3 {
        font-size: 1.3rem;
    }
    
    .magic-card-overlay p {
        font-size: 0.85rem;
    }
}