/* =========================================================
   HAMAMLES — Design Tokens
========================================================= */
:root {
  --navy: #0a192f;
  --navy-soft: #112240;
  --offwhite: #f8f9fa;
  --burgundy: #7d1227;
  --gold: #cea521;
  --gold-soft: rgba(206, 165, 33, 0.14);
  --ink-60: rgba(10, 25, 47, 0.62);
  --ink-40: rgba(10, 25, 47, 0.4);
  --line: rgba(10, 25, 47, 0.1);
  --line-light: rgba(248, 249, 250, 0.14);

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --header-h: 84px;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--navy);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Scroll progress bar
========================================================= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--burgundy));
  z-index: 1100;
  transition: width 0.1s linear;
}

/* =========================================================
   Header
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  background: var(--offwhite);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease), height .3s var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 8px 30px rgba(10, 25, 47, 0.08);
  height: 68px;
}
.header-inner {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.logo {
  justify-self: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--navy);
  white-space: nowrap;
}
.logo-dot { color: var(--gold); }
.footer-logo { justify-self: start; }

.nav-toggle {
  justify-self: start;
  width: 40px; height: 40px;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--navy);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


@media (max-width: 640px) {
  .header-cta { font-size: 0.75rem; padding: 8px 14px; }
  .logo { font-size: 1.2rem; }
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--navy);
  transform: translateY(-120%);
  transition: transform .35s var(--ease);
  z-index: 850;
  padding: 10px 0 20px;
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav-link {
  display: block;
  color: var(--offwhite);
  font-family: var(--font-display);
  font-size: 1.2rem;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-light);
}

/* =========================================================
   Reveal animation
========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Shared section styles
========================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0 0 14px;
}
.eyebrow-light { color: var(--gold); }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { margin: 0 0 14px; }
.section-sub { color: var(--ink-60); font-size: 1.05rem; margin: 0; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  border: 1px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(206,165,33,0.4); }
.btn-ghost { color: var(--navy); border-color: var(--ink-40); }
.btn-ghost:hover { border-color: var(--navy); background: rgba(10,25,47,0.04); }
.btn-outline { border-color: var(--navy); color: var(--navy); padding: 12px 26px; font-size: 0.88rem; }
.btn-outline:hover { background: var(--navy); color: var(--offwhite); }
.btn-block { width: 100%; }

/* =========================================================
   Hero
========================================================= */
.hero {
  position: relative;
  padding: 96px 28px 80px;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(206,165,33,0.10), transparent 60%),
    var(--offwhite);
}
.hero-graph {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 60%;
  opacity: 0.6;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 600;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
.hero-title-accent { color: var(--burgundy); }
.hero-sub {
  max-width: 620px;
  margin: 0 auto 38px;
  font-size: 1.15rem;
  color: var(--ink-60);
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto;
}
.stat { display: flex; flex-direction: column; align-items: center; min-width: 140px; }
.stat-num, .stat-suffix {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
}
.stat-label { font-size: 0.82rem; color: var(--ink-60); margin-top: 6px; }
.stat-divider { width: 1px; height: 46px; background: var(--line); }
@media (max-width: 640px) { .stat-divider { display: none; } }

/* =========================================================
   Services
========================================================= */
.services { padding: 110px 28px; max-width: var(--container); margin: 0 auto; }
.service-block {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.service-block.reverse { direction: rtl; }
.service-block.reverse > * { direction: ltr; }

.service-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-60);
  letter-spacing: 0.08em;
}
.service-copy h3 { margin: 10px 0 16px; }
.service-copy p { color: var(--ink-60); margin: 0 0 20px; font-size: 1.02rem; }
.service-list { margin: 0 0 26px; }
.service-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.96rem;
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 2px;
  transform: rotate(45deg);
}

.guarantee-box {
  background: var(--navy);
  color: var(--offwhite);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 26px;
  border-left: 4px solid var(--gold);
}
.guarantee-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}
.guarantee-text { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.guarantee-text strong { color: var(--gold); }

/* Visuals */
.visual-frame { position: relative; }
.visual-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, rgba(125,18,39,0.14), transparent 65%);
  z-index: 0;
  filter: blur(10px);
}
.visual-glow.gold { background: radial-gradient(circle, rgba(206,165,33,0.18), transparent 65%); }

.browser-mock, .dash-mock {
  position: relative;
  z-index: 1;
  background: var(--navy-soft);
  border-radius: 16px;
  padding: 0 0 20px;
  box-shadow: 0 30px 60px rgba(10,25,47,0.25);
  overflow: hidden;
}
.browser-bar {
  display: flex;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.15);
}
.browser-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(248,249,250,0.25); }
.browser-body { padding: 22px 22px 4px; }
.skeleton-line { height: 12px; border-radius: 6px; background: rgba(248,249,250,0.14); margin-bottom: 12px; }
.w-60 { width: 60%; }
.w-40 { width: 40%; height: 8px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.skeleton-card { aspect-ratio: 1; border-radius: 8px; background: rgba(206,165,33,0.16); }
.skeleton-btn { width: 46%; height: 34px; border-radius: 999px; background: var(--gold); margin-top: 6px; }

.dash-mock { padding: 22px; }
.dash-row { display: flex; gap: 12px; margin-bottom: 14px; }
.dash-card {
  flex: 1;
  background: rgba(248,249,250,0.06);
  border: 1px solid rgba(248,249,250,0.1);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-label { font-family: var(--font-mono); font-size: 0.68rem; color: rgba(248,249,250,0.55); text-transform: uppercase; letter-spacing: 0.06em;}
.dash-value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--offwhite); }
.dash-value.up { color: #7ee787; }
.dash-value.down { color: #7ee787; }
.dash-value.ok { color: var(--gold); }
.dash-chart { padding: 6px 0 4px; }

@media (max-width: 880px) {
  .service-block, .service-block.reverse { grid-template-columns: 1fr; direction: ltr; }
  .service-visual { order: -1; }
}

/* =========================================================
   Portfolio
========================================================= */
.portfolio { padding: 110px 0; background: var(--navy); color: var(--offwhite); }
.portfolio .eyebrow { color: var(--gold); }
.portfolio .section-sub { color: rgba(248,249,250,0.6); }
.portfolio h2 { color: var(--offwhite); }
.portfolio .section-head { padding: 0 28px; }

.portfolio-track-wrap { overflow: hidden; padding: 20px 0; }
.portfolio-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 6vw 30px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.portfolio-track::-webkit-scrollbar { height: 6px; }
.portfolio-track::-webkit-scrollbar-thumb { background: rgba(248,249,250,0.2); border-radius: 4px; }

.phone-card {
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: center;
  text-align: center;
}
.phone-frame {
  background: #04101f;
  border-radius: 34px;
  padding: 14px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(248,249,250,0.06);
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 70px; height: 18px;
  background: #04101f;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}
.phone-screen {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 320 / 640;
}
.phone-caption { margin-top: 16px; font-size: 0.85rem; color: rgba(248,249,250,0.7); }
.portfolio-hint { text-align: center; font-family: var(--font-mono); font-size: 0.78rem; color: rgba(248,249,250,0.4); margin-top: -6px; }

/* =========================================================
   About
========================================================= */
.about { padding: 110px 28px; }
.about-inner { max-width: var(--container); margin: 0 auto; text-align: center; }
.about-copy { max-width: 720px; margin: 0 auto 60px; color: var(--ink-60); font-size: 1.05rem; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: left; }
.about-num { font-family: var(--font-mono); color: var(--gold); font-size: 0.9rem; }
.about-item h4 { margin: 12px 0 8px; }
.about-item p { color: var(--ink-60); font-size: 0.95rem; margin: 0; }
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Contact / Lead form
========================================================= */
.contact { background: var(--navy); color: var(--offwhite); padding: 110px 28px; }
.contact-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
}
.contact h2 { color: var(--offwhite); }
.contact-sub { color: rgba(248,249,250,0.65); font-size: 1.05rem; margin-bottom: 28px; }
.contact-points li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: rgba(248,249,250,0.85);
}
.contact-points li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  color: var(--gold);
  font-weight: 700;
}

.lead-form {
  background: var(--offwhite);
  color: var(--navy);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.35);
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; }
.form-row label { font-size: 0.82rem; font-weight: 600; margin-bottom: 7px; }
.form-row input, .form-row textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--navy);
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.form-note { text-align: center; font-size: 0.78rem; color: var(--ink-60); margin: 14px 0 0; }

/* =========================================================
   Footer
========================================================= */
.site-footer { background: #071324; color: rgba(248,249,250,0.75); padding: 70px 28px 0; }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
}
.footer-brand p { margin-top: 14px; font-size: 0.9rem; max-width: 260px; color: rgba(248,249,250,0.55); }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}
.footer-col p { margin: 0 0 10px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--line-light);
  text-align: center;
  padding: 22px 0;
  font-size: 0.8rem;
  color: rgba(248,249,250,0.4);
}
@media (max-width: 780px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
}

/* =========================================================
   Modal — "Projector Effect"
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,25,47,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-window {
  background: var(--offwhite);
  color: var(--navy);
  max-width: 720px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 50px 46px;
  position: relative;
  transform: translateY(24px) scale(0.98);
  transition: transform .4s var(--ease);
  box-shadow: 0 40px 90px rgba(0,0,0,0.4);
}
.modal-overlay.active .modal-window { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: background .2s, transform .2s;
}
.modal-close:hover { background: var(--gold); transform: rotate(90deg); }

.modal-content h2 { margin-top: 0; }
.modal-content h3 { margin-top: 28px; }
.modal-content p { color: var(--ink-60); margin-bottom: 14px; }
.modal-content ul { margin: 14px 0; padding-left: 20px; list-style: disc; }
.modal-content li { margin-bottom: 8px; color: var(--ink-60); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
