/* Barber Portals — company website
   Cream paper, ink navy, barber-pole red + blue, brass. */

/* Dark mode: the moon button in the top bar (remembered), or the phone/computer setting */
:root {
  --cream: #f7f5f2;
  --paper: #ffffff;
  --ink: #14244f;
  --muted: #5f6679;
  --line: #e3e1dc;
  --red: #c8102e;
  --blue: #1d3a8a;
  --brass: #8b5a2b;
  --night: #14244f;        /* dark blocks (ribbon, "how it works", barber card, phone) */
  --on-night: #f7f5f2;
  --text-2: #3a4055;
  --tint-red: #fdecef;
  --tint-blue: #e8edf8;
  --tint-brown: #f4ebe1;
  --pole: repeating-linear-gradient(-45deg, var(--red) 0 12px, #fff 12px 22px, var(--blue) 22px 34px, #fff 34px 44px);
}
:root[data-theme="dark"] {
  --cream: #0b1530; --paper: #13204a; --ink: #eef1f8; --muted: #a3abc2; --line: #263a6b; --brass: #d39a5e;
  --night: #060b1c; --on-night: #eef1f8; --text-2: #c9d0e2;
  --tint-red: rgba(200,16,46,.2); --tint-blue: rgba(110,140,230,.2); --tint-brown: rgba(211,154,94,.18);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --cream: #0b1530; --paper: #13204a; --ink: #eef1f8; --muted: #a3abc2; --line: #263a6b; --brass: #d39a5e;
    --night: #060b1c; --on-night: #eef1f8; --text-2: #c9d0e2;
    --tint-red: rgba(200,16,46,.2); --tint-blue: rgba(110,140,230,.2); --tint-brown: rgba(211,154,94,.18);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); transition: background .3s, color .3s; font: 16px/1.6 "Manrope", "Cairo", system-ui, sans-serif; overflow-x: hidden; }
html[lang="ar"] body { font-family: "Cairo", "Manrope", sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1, h2 { font-family: "DM Serif Display", "Cairo", serif; font-weight: 400; }
html[lang="ar"] h1, html[lang="ar"] h2 { font-family: "Cairo", serif; font-weight: 800; }
a { color: inherit; }
.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 14px 24px; border-radius: 999px;
  font-weight: 800; text-decoration: none; border: 2px solid var(--ink); transition: transform .12s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(200,16,46,.28); }
.btn.ghost { background: transparent; }
.btn.cream { background: #f7f5f2; border-color: #f7f5f2; color: #14244f; }
.btn.sm { padding: 8px 16px; font-size: .9rem; }
.theme-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ink);
  background: none; color: var(--ink); font-size: 1.05rem; cursor: pointer; transition: transform .2s;
}
.theme-btn:hover { transform: rotate(-15deg); }
.lang { color: var(--ink); border: 1px solid var(--ink); background: none; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--cream) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; letter-spacing: .2px; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 26px; font-weight: 700; font-size: .92rem; }
.nav-links a { text-decoration: none; opacity: .75; }
.nav-links a:hover { opacity: 1; }
.nav-end { display: flex; gap: 10px; align-items: center; }

/* hero: a night barbershop with the 3D scene */
.hero-band {
  position: relative; overflow: hidden; color: #f7f5f2;
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(200,16,46,.22), transparent 70%),
    radial-gradient(50% 60% at 95% 90%, rgba(29,58,138,.45), transparent 70%),
    radial-gradient(40% 50% at 10% 10%, rgba(139,90,43,.25), transparent 70%),
    linear-gradient(180deg, #0b1530, #070d22);
}
.hero-band::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 5px; background: var(--pole); }
.hero-band .eyebrow { color: #ff8fa1; }
.hero-band .lead { color: #cfd5e6; }
.hero-band .btn.ghost { border-color: rgba(247,245,242,.6); color: #f7f5f2; }
.hero-band .btn.ghost:hover { background: rgba(247,245,242,.08); }
.hero-band .ticks { color: #aab2c8; }
.hero-band .ticks li::before { color: #e9b98a; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: clamp(40px, 7vw, 90px) clamp(16px, 4vw, 48px);
}
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); letter-spacing: -.5px; }
.hero h1 em { display: block; color: var(--red); font-style: italic; }
html[lang="ar"] .hero h1 em { font-style: normal; }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 560px; margin: 22px 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 26px 0 0; list-style: none; font-weight: 700; font-size: .9rem; color: var(--muted); }
.ticks li::before { content: "✓ "; color: var(--brass); }

.hero-visual { position: relative; display: grid; place-items: center; height: min(640px, 72vh); min-height: 420px; }
/* the 3D scene fills the whole hero; the text sits on top of it */
#scene3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.hero-band .hero { position: relative; z-index: 1; }
.hero-band h1, .hero-band .lead, .hero-band .eyebrow, .hero-band .ticks { text-shadow: 0 2px 18px rgba(7,13,34,.85), 0 0 2px rgba(7,13,34,.6); }
body.has3d .big-pole { display: none; }
.hint3d { position: absolute; bottom: 0; margin: 0; font-size: .8rem; font-weight: 700; color: #8f98b3; letter-spacing: .04em; pointer-events: none; }
body:not(.has3d) .hint3d { display: none; }
.hero-text { position: relative; z-index: 1; }
.phone { position: relative; z-index: 1; width: 310px; height: 620px; border-radius: 44px; padding: 11px; background: var(--night); box-shadow: 0 30px 70px rgba(20,36,79,.3), inset 0 0 0 2px #2c4174; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 34px; background: var(--cream); }
.phone-note { margin: 14px 0 0; font-weight: 700; font-size: .85rem; color: var(--muted); }
.big-pole { position: relative; display: grid; justify-items: center; z-index: 0; }
.big-pole .cap { display: block; width: 74px; height: 26px; border-radius: 14px; background: linear-gradient(180deg, #a8743f, var(--brass) 60%, #5e3a1a); }
.big-pole .glass { display: block; width: 60px; height: 380px; border-radius: 30px; overflow: hidden; box-shadow: inset 0 0 0 3px rgba(20,36,79,.15), inset -12px 0 18px rgba(255,255,255,.4); position: relative; }
.big-pole .glass b { position: absolute; inset: -50px 0; background: var(--pole); animation: spin 2.2s linear infinite; }
.big-pole .glass::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.15), rgba(255,255,255,.35) 35%, rgba(0,0,0,.1)); }
@keyframes spin { to { transform: translateY(44px); } }
@media (prefers-reduced-motion: reduce) { .big-pole .glass b, .ribbon-in { animation: none; } }

/* live demo section */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.demo h2 { margin-bottom: 0; }
.demo .lead { margin: 18px 0 26px; }
.demo-phone { display: grid; justify-items: center; }
.demo-tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.demo-tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px; background: none;
  color: var(--muted); font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; transition: background .2s, color .2s;
}
.demo-tabs button .ic { width: 1.1em; height: 1.1em; }
.demo-tabs button:hover { color: var(--ink); }
.demo-tabs button.on { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(200,16,46,.3); }
.demo-hint { margin: 14px 0 0; color: var(--muted); font-weight: 600; min-height: 3em; }
.p-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: start; }

/* book a meeting */
.book-lead { max-width: 640px; margin: -24px auto 36px; }
.book { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1060px; margin: 0 auto; align-items: start; }
.book .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 26px; }
.book h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0 0 14px; }
.book h3:not(:first-child) { margin-top: 26px; }
.num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; font-size: .85rem; flex: none; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind { display: grid; gap: 4px; justify-items: start; text-align: start; padding: 14px; border-radius: 16px; border: 2px solid var(--line); background: none; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s; }
.kind small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.kind .k-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tint-red); color: var(--red); font-size: 1.2rem; margin-bottom: 4px; }
.kind.on { border-color: var(--red); }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-h button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.cal-h button:disabled { opacity: .3; cursor: default; }
html[dir="rtl"] .cal-h button { transform: scaleX(-1); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dn { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 4px 0; }
.cal button { aspect-ratio: 1; border-radius: 10px; border: 0; background: var(--cream); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.cal button:disabled { background: none; opacity: .3; cursor: default; }
.cal button.today { box-shadow: inset 0 0 0 1px var(--muted); }
.cal button.on { background: var(--red); color: #fff; }
.mslots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mslots button { padding: 11px 4px; border-radius: 12px; border: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.mslots button:not(:disabled):hover { border-color: var(--red); color: var(--red); }
.mslots button.on { background: var(--red); border-color: var(--red); color: #fff; }
.mslots button:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
.book .hint { margin: 12px 0 0; color: var(--muted); font-weight: 600; font-size: .9rem; }
.tz { margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.summary span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--cream); font-weight: 700; font-size: .85rem; }
.summary .empty { color: var(--muted); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f { display: grid; gap: 6px; margin-bottom: 12px; }
.f label { font-weight: 700; font-size: .88rem; }
.f small { color: var(--muted); font-weight: 500; }
.f input, .f select, .f textarea { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--cream); color: var(--ink); font: inherit; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.15); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.err { display: none; color: var(--red); font-weight: 700; margin: 4px 0 12px; }
.err.show { display: block; }
.btn.wide { width: 100%; gap: 8px; }
.done { display: grid; gap: 12px; justify-items: center; text-align: center; }
.done[hidden] { display: none; }
.done .tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #2f7d5b; color: #fff; font-size: 1.8rem; box-shadow: 0 0 0 8px rgba(47,125,91,.15); }
.done h3 { margin: 6px 0 0; font-size: 1.4rem; }
.done p { margin: 0; color: var(--muted); }
.done .when { display: grid; gap: 2px; padding: 12px 18px; border-radius: 14px; background: var(--cream); width: 100%; }
.linkbtn { background: none; border: 0; color: var(--red); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; }

/* music button */
.music {
  position: fixed; bottom: 22px; inset-inline-start: 20px; z-index: 40; height: 46px; padding: 0 16px 0 14px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px; font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer;
  background: rgba(11,21,48,.88); color: #f7f5f2; border: 1px solid rgba(247,245,242,.25); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .15s;
}
.music:hover { transform: translateY(-2px); }
.music.on { border-color: rgba(233,185,138,.7); }
.music:not(.on) { animation: mpulse 2.4s ease-in-out infinite; }
@keyframes mpulse { 50% { box-shadow: 0 0 0 6px rgba(200,16,46,.25), 0 10px 30px rgba(0,0,0,.25); } }
.music .eq { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.music .eq i { width: 3px; height: 4px; border-radius: 2px; background: #8f98b3; }
.music.on .eq i { background: #e9b98a; animation: eq .9s ease-in-out infinite; }
.music.on .eq i:nth-child(2) { animation-delay: .2s; } .music.on .eq i:nth-child(3) { animation-delay: .45s; } .music.on .eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* ribbon */
.ribbon { background: var(--night); color: var(--on-night); overflow: hidden; padding: 16px 0; border-block: 4px solid; border-image: var(--pole) 1; }
.ribbon-in { display: flex; gap: 26px; width: max-content; animation: slide 40s linear infinite; font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.ribbon-in i { color: #e9b98a; font-style: normal; display: inline-flex; align-items: center; }
html[dir="rtl"] .ribbon-in { animation-name: slide-rtl; }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes slide-rtl { to { transform: translateX(50%); } }

/* sections */
.section { max-width: 1200px; margin: 0 auto; padding: clamp(60px, 9vw, 110px) clamp(16px, 4vw, 48px); }
.section h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 44px; }
.section.dark { max-width: none; background: var(--night); color: var(--on-night); }
.section.dark .eyebrow { color: #ff8fa1; }

.portals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.portal { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px; background: var(--paper); border-radius: 24px; border: 1px solid var(--line); overflow: hidden; }
.portal::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 6px; }
.p-cust::before { background: var(--red); }
.p-barber::before { background: var(--pole); }
.p-owner::before { background: var(--blue); }
.p-barber { background: var(--night); color: var(--on-night); border-color: var(--night); }
.ic { width: 1em; height: 1em; flex: none; }
.p-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--tint-red); color: var(--red); font-size: 1.6rem; }
.p-barber .p-icon { background: rgba(255,255,255,.1); color: #fff; }
.p-owner .p-icon { background: var(--tint-blue); color: var(--blue); }
.portal h3 { font-size: 1.35rem; font-weight: 800; }
.portal p { margin: 0; opacity: .8; }
.portal ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; font-size: .93rem; flex: 1; }
.portal li { padding-inline-start: 22px; position: relative; }
.portal li::before { content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 10px; height: 10px; border-radius: 3px; background: var(--pole); }
.p-link { margin-top: 14px; font-weight: 800; color: var(--red); text-decoration: none; }
.p-barber .p-link { color: #ff8fa1; }

.how { list-style: none; padding: 0; margin: 0 auto; max-width: 1100px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.how li { padding: 26px; border-radius: 22px; background: #1b2b58; position: relative; }
.how b { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--red); color: #fff; font-size: 1.2rem; margin-bottom: 18px; }
.how h3 { font-size: 1.15rem; margin-bottom: 8px; }
.how p { margin: 0; opacity: .75; font-size: .95rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.features > div { padding: 26px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); }
.features span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--tint-red); color: var(--red); font-size: 1.45rem; font-weight: 800; margin-bottom: 16px; }
.features > div:nth-child(even) span { background: var(--tint-blue); color: var(--blue); }
.features > div:nth-child(3n) span { background: var(--tint-brown); color: var(--brass); }
.features h3 { font-size: 1.1rem; margin-bottom: 6px; }
.features p { margin: 0; color: var(--muted); }

.cta-band { position: relative; text-align: center; padding: 80px 20px; background: var(--red); color: #fff; overflow: hidden; }
.cta-band::before, .cta-band::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; background: var(--pole); opacity: .5; }
.cta-band::before { inset-inline-start: 0; }
.cta-band::after { inset-inline-end: 0; }
.cta-band h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.cta-band p { max-width: 560px; margin: 14px auto 28px; opacity: .92; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 26px clamp(16px, 4vw, 48px); color: var(--muted); font-size: .9rem; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .hero-cta, .ticks { justify-content: center; }
  .hero-visual { order: -1; height: 380px; min-height: 0; margin: -20px -16px 0; }
  .demo { grid-template-columns: 1fr; text-align: center; }
  .demo .hero-cta { justify-content: center; }
  .portals, .features { grid-template-columns: 1fr 1fr; }
  .how { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  .portals, .features, .how { grid-template-columns: 1fr; }
  .book, .row2 { grid-template-columns: 1fr; }
  .book .panel { padding: 18px; }
  .features { gap: 10px; }
  .features > div { display: grid; grid-template-columns: 50px 1fr; column-gap: 14px; padding: 16px; border-radius: 18px; }
  .features span { grid-row: span 2; margin: 0; }
  .features h3 { align-self: end; }
  .how li { display: grid; grid-template-columns: 46px 1fr; column-gap: 14px; padding: 18px; }
  .how b { grid-row: span 2; margin: 0; }
  .section h2 { margin-bottom: 28px; }
  .nav .btn.sm { display: none; }
  .phone { width: 100%; max-width: 310px; height: 580px; }
  .hero-visual { height: 330px; }
  .music { height: 42px; padding: 0 13px; bottom: 16px; }
  .music #musicTxt { display: none; }
  .hero-cta .btn { flex: 1 1 100%; }
  .cta-band::before, .cta-band::after { width: 14px; }
}

/* dark mode details */
:root[data-theme="dark"] .p-owner .p-icon, :root[data-theme="dark"] .features > div:nth-child(even) span { color: #8fa9f0; }
:root[data-theme="dark"] .p-owner::before { background: #3f63c9; }
:root[data-theme="dark"] .portal, :root[data-theme="dark"] .features > div { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
