*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #0c0c0e;
  --bg-surface:  #16161a;
  --bg-raised:   #1e1e26;
  --border:      #2a2a36;
  --border-dim:  #1e1e28;
  --text:        #e8e8ec;
  --text-muted:  #7878a0;
  --accent:      #818cf8;
  --accent-dim:  #4f46e5;
  --live:        #34d399;
  --sold:        #f59e0b;
  --pre:         #60a5fa;
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width:   1080px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
  color: #a5b0fc;
}

/* ── Container ─────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dim);
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: lowercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-img {
  height: 34px;
  width: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo:hover,
.logo:focus {
  color: var(--accent);
  text-decoration: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--text);
  text-decoration: none;
}

.lang-switch {
  border: 1px solid var(--border);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 5rem 0 5rem;
  border-bottom: 1px solid var(--border-dim);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("dzbackdrop1.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.23;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-visual {
  flex: 0 0 260px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ── Logo animation SVG ─────────────────────────────────── */

.logo-anim {
  width: 100%;
  height: auto;
}

/* All frames stack; opacity/clip control visibility */
.aframe { opacity: 0; }

/* Frame 0: dots — visible immediately, fades out when frame 5 dissolves in */
.f0 {
  opacity: 1;
  animation: anim-fadeout 1.4s ease forwards 10.5s;
}

/*
 * Frame 1: anti-diagonal stroke, BL→TR wipe
 * Clip polygon expands from bottom-left corner along the diagonal
 */
.f1 {
  opacity: 1;
  clip-path: polygon(0% 100%, 0% 100%, 0% 100%, 0% 100%);
  animation:
    wipe-bl-tr 2.0s ease-in-out forwards 0.6s,
    anim-fadeout 1.4s ease forwards 10.5s;
}

/*
 * Frame 2: right vertical stroke, TR→BR wipe
 * Horizontal band grows from the top downward
 */
.f2 {
  opacity: 1;
  clip-path: polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%);
  animation:
    wipe-tr-br 1.8s ease-in-out forwards 3.0s,
    anim-fadeout 1.4s ease forwards 10.5s;
}

/*
 * Frame 3: main diagonal stroke, BR→TL wipe
 * Clip polygon expands from bottom-right corner along the diagonal
 */
.f3 {
  opacity: 1;
  clip-path: polygon(100% 100%, 100% 100%, 100% 100%, 100% 100%);
  animation:
    wipe-br-tl 2.0s ease-in-out forwards 5.2s,
    anim-fadeout 1.4s ease forwards 10.5s;
}

/*
 * Frame 4: top horizontal stroke, TL→TR wipe
 * Vertical band grows from the left toward the right
 */
.f4 {
  opacity: 1;
  clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
  animation:
    wipe-tl-tr 1.8s ease-in-out forwards 7.6s,
    anim-fadeout 1.4s ease forwards 10.5s;
}

/* Frame 5: full logo — dissolves in as frames 0–4 dissolve out */
.f5 {
  animation: anim-fadein 1.4s ease forwards 10.5s;
}

/* ── Wipe keyframes ─────────────────────────────────────── */

/* BL→TR: polygon grows from bottom-left corner toward top-right */
@keyframes wipe-bl-tr {
  0%   { clip-path: polygon(0% 100%, 0% 100%, 0% 100%, 0% 100%); }
  50%  { clip-path: polygon(0% 100%, 100% 100%, 0% 0%,   0% 100%); }
  100% { clip-path: polygon(0% 0%,   100% 0%,  100% 100%, 0% 100%); }
}

/* TR→BR: horizontal band sweeps top to bottom */
@keyframes wipe-tr-br {
  from { clip-path: polygon(0% 0%, 100% 0%, 100% 0%,    0% 0%);    }
  to   { clip-path: polygon(0% 0%, 100% 0%, 100% 100%,  0% 100%);  }
}

/* BR→TL: polygon grows from bottom-right corner toward top-left */
@keyframes wipe-br-tl {
  0%   { clip-path: polygon(100% 100%, 100% 100%, 100% 100%, 100% 100%); }
  50%  { clip-path: polygon(100% 100%, 0% 100%,   100% 0%,   100% 100%); }
  100% { clip-path: polygon(0% 100%,   0% 0%,     100% 0%,   100% 100%); }
}

/* TL→TR: vertical band sweeps left to right */
@keyframes wipe-tl-tr {
  from { clip-path: polygon(0% 0%, 0% 0%,    0% 100%,   0% 100%);   }
  to   { clip-path: polygon(0% 0%, 100% 0%,  100% 100%, 0% 100%);   }
}

@keyframes anim-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes anim-fadeout {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── CTA Button ─────────────────────────────────────────── */

.cta-btn {
  display: inline-block;
  background: var(--accent-dim);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.cta-btn:hover,
.cta-btn:focus {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.cta-btn-lg {
  font-size: 1.05rem;
  padding: 0.9rem 2rem;
}

/* ── Timeline ───────────────────────────────────────────── */

.timeline-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-dim);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 2rem;
  padding: 1.75rem 0 1.75rem 2rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(5.5rem - 4px + 2rem);
  top: 2.1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 0.1rem;
  letter-spacing: 0.03em;
}

.timeline-content strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Sections ───────────────────────────────────────────── */

.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-dim);
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.65;
}

/* ── Services ───────────────────────────────────────────── */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  border-left: 3px solid var(--accent-dim);
  transition: border-left-color 0.15s;
}

.service-card:hover {
  border-left-color: var(--accent);
}

.service-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.automostly-proof {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-dim);
}

.automostly-proof [data-automostly-id] img,
.automostly-proof img {
  width: min(270px, 100%) !important;
  height: auto !important;
}

/* ── Ventures ───────────────────────────────────────────── */

.ventures-section {
  background: var(--bg-surface);
}

.venture-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.venture-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 2rem;
}

.venture-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

img.venture-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg-surface);
  padding: 4px;
  flex-shrink: 0;
}

.venture-meta h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.venture-item > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.venture-item > p a {
  color: var(--accent);
}

/* ── Status badges ──────────────────────────────────────── */

.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.status-live {
  background: rgba(52, 211, 153, 0.12);
  color: var(--live);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-sold {
  background: rgba(245, 158, 11, 0.12);
  color: var(--sold);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-pre {
  background: rgba(96, 165, 250, 0.12);
  color: var(--pre);
  border: 1px solid rgba(96, 165, 250, 0.25);
}

/* ── Track record ───────────────────────────────────────── */

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.track-item {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.track-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.track-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.track-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Contact ────────────────────────────────────────────── */

.contact-section {
  text-align: center;
}

.contact-section h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.contact-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.contact-address {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-dim);
  padding: 1.75rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: var(--text-muted);
  margin: 0 0.75rem;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── Legal pages ────────────────────────────────────────── */

.legal-content {
  padding: 3rem 0;
}

.legal-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-content ul {
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.25rem;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    gap: 2.5rem;
  }

  .hero-visual {
    flex: none;
    width: 200px;
    margin: 0 auto;
  }

  .hero-text {
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .main-nav ul {
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding-left: 0;
  }

  .timeline-item::before {
    display: none;
  }

  .timeline-year {
    font-size: 0.75rem;
  }

  .services-grid,
  .track-grid {
    grid-template-columns: 1fr;
  }

  .venture-header {
    flex-wrap: wrap;
  }

  .contact-section h2 {
    font-size: 1.75rem;
  }
}
