/* ============================================================
   EPTA TECHNOLOGIES — site.css
   Dual-mode (light / dark), Inter font, minimal tech aesthetic
   ============================================================ */

/* ── Light Theme (Default) ── */
:root {
  /* Surfaces */
  --color-bg:           #ffffff;
  --color-surface:      #f8fafc;
  --color-surface-2:    #f1f5f9;
  --color-border:       rgba(15, 23, 42, 0.08);
  --color-divider:      rgba(15, 23, 42, 0.06);

  /* Text */
  --color-text:         #0f172a;
  --color-text-muted:   #64748b;
  --color-text-faint:   #94a3b8;

  /* Accent (unified blue) */
  --color-accent:       #2563eb;
  --color-accent-hover: #1d4ed8;

  /* Selection & Focus */
  --color-selection:    rgba(37, 99, 235, 0.15);
  --color-focus:        rgba(37, 99, 235, 0.5);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(3.5rem,   1rem + 7.5vw, 9rem);

  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Transitions */
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);

  /* Content */
  --content-default: 960px;
  --content-wide:    1200px;

  /* Font */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --color-bg:           #09090b;
  --color-surface:      #18181b;
  --color-surface-2:    #27272a;
  --color-border:       rgba(63, 63, 70, 0.5);
  --color-divider:      rgba(63, 63, 70, 0.3);

  --color-text:         #fafafa;
  --color-text-muted:   #a1a1aa;
  --color-text-faint:   #52525b;

  --color-accent:       #60a5fa;
  --color-accent-hover: #3b82f6;

  --color-selection:    rgba(96, 165, 250, 0.25);
  --color-focus:        rgba(96, 165, 250, 0.5);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-padding-top: var(--space-16);
}

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

img, svg { display: block; max-width: 100%; }
ul[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.1; }
p { text-wrap: pretty; }
address { font-style: normal; }

button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }

::selection {
  background: var(--color-selection);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

/* ── Utilities ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); }

/* ── Container ── */
.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 5vw, var(--space-12));
}

/* ================================================================
   HEADER / NAV — Always dark for consistent brand identity
   ================================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(63, 63, 70, 0.3);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav-container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 5vw, var(--space-12));
  height: 64px;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.navbar-brand {
  color: #fafafa;
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.03em;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.navbar-brand:hover { opacity: 0.75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
  margin-left: auto;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: #a1a1aa;
  letter-spacing: 0.01em;
  padding: var(--space-1) 0;
  position: relative;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: #fafafa;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: #fafafa;
}

.nav-link.active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

/* ── Theme Toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #a1a1aa;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
  margin-left: var(--space-2);
}
.theme-toggle:hover {
  color: #fafafa;
  background: rgba(255,255,255,0.1);
}

/* Light mode: show moon (click → dark) */
.icon-sun  { display: none; }
.icon-moon { display: block; }

/* Dark mode: show sun (click → light) */
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fafafa;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── FOOTER ── */
main { flex: 1; }

.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-8);
}

.footer-container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 5vw, var(--space-12));
  text-align: center;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ================================================================
   HERO — Always dark for dramatic impact
   ================================================================ */
.hero-section {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  overflow: hidden;
  background: #09090b;
  color: #fafafa;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 5vw, var(--space-12));
  padding-block: var(--space-24);
}

.hero-heading {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
  gap: 0.05em;
  color: #fafafa;
}

.hero-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-line:nth-child(1) { animation-delay: 0ms; }
.hero-line:nth-child(2) { animation-delay: 80ms; }
.hero-line:nth-child(3) { animation-delay: 160ms; }
.hero-line:nth-child(4) { animation-delay: 240ms; }
.hero-line:nth-child(5) { animation-delay: 320ms; }

.hero-sub {
  font-size: var(--text-lg);
  color: #a1a1aa;
  font-weight: 400;
  margin-top: var(--space-8);
  letter-spacing: 0.01em;
  opacity: 0;
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 480ms forwards;
}

@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* Subtle grid background */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  pointer-events: none;
}

/* ── INNER PAGES ── */
.page-wrapper {
  padding-top: 64px;
}

.page-hero {
  padding-block: clamp(var(--space-16), 10vw, var(--space-24));
  border-bottom: 1px solid var(--color-border);
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.page-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  font-weight: 400;
  max-width: 55ch;
}

/* ── SECTION LABELS ── */
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.section-heading {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: clamp(var(--space-10), 6vw, var(--space-20));
}

/* ── STORY SECTION ── */
.story-section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  border-bottom: 1px solid var(--color-border);
}

.story-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}

.story-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 65ch;
}

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-card {
  background: var(--color-surface);
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  transition: background var(--transition);
}
.stat-card:hover { background: var(--color-surface-2); }

.stat-number {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--color-text);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ── SERVICES ── */
.services-section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  border-bottom: 1px solid var(--color-border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--color-surface);
  padding: clamp(var(--space-6), 3vw, var(--space-10));
  transition: background var(--transition);
}
.service-card:hover { background: var(--color-surface-2); }

.service-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  transition: color var(--transition);
}
.service-card:hover .service-icon { color: var(--color-accent); }

.service-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.service-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 38ch;
}

/* ── WHY CHOOSE EPTA ── */
.why-section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.why-item {
  display: grid;
  grid-template-columns: 1px 1fr;
  gap: var(--space-8);
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  transition: background var(--transition);
}
.why-item:first-child { border-top: 1px solid var(--color-border); }

.why-dot {
  width: 1px;
  background: var(--color-border);
  position: relative;
}
.why-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  background: var(--color-text-faint);
  border-radius: 50%;
  transition: background var(--transition);
}
.why-item:hover .why-dot::before { background: var(--color-accent); }

.why-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-8);
  align-items: start;
}

.why-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.why-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 65ch;
}

/* ── CONTACT ── */
.contact-section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.contact-card {
  background: var(--color-surface);
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: background var(--transition);
}
.contact-card:hover { background: var(--color-surface-2); }

.contact-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  transition: color var(--transition);
}
.contact-card:hover .contact-icon { color: var(--color-accent); }

.contact-card-title {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contact-link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}
.contact-link:hover { color: var(--color-accent); text-decoration: underline; }

.contact-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.6;
}

.contact-address {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.7;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  /* Mobile nav */
  .nav-hamburger { display: flex; }
  .theme-toggle { margin-left: auto; }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    height: calc(100dvh - 64px);
    z-index: 99;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-link { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; }
  .nav-link::after { display: none; }

  /* Story */
  .story-body { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Why */
  .why-body { grid-template-columns: 1fr; gap: var(--space-3); }
  .why-dot { display: none; }
  .why-item { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-heading { letter-spacing: -0.02em; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
