/* =============================================
   LOGS DIGITAL — main.css
   Reset, variables, global styles, nav, buttons
   ============================================= */

/* ---- CSS Variables ---- */
:root {
  --bg-dark:      #080808;
  --bg-dark-2:    #0f0f0f;
  --bg-cream:     #DDD8C4;
  --bg-cream-2:   #CDD0BE;
  --text-light:   #EDEDE9;
  --text-light-2: rgba(237, 237, 233, 0.6);
  --text-dark:    #111111;
  --text-dark-2:  #3d3d3d;
  --accent:       #50808E;
  --accent-hover: #3d6b78;
  --accent-glow:  rgba(80, 128, 142, 0.20);
  --border-light: rgba(255, 255, 255, 0.07);
  --border-dark:  rgba(0, 0, 0, 0.09);

  --font-heading: 'Satoshi', 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;

  --nav-height: 72px;
  --section-pad: clamp(80px, 10vw, 140px);
  --inner-max:  1200px;
  --inner-pad:  clamp(20px, 5vw, 60px);

  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --radius:     12px;
  --radius-lg:  20px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--bg-dark);
  overflow-x: hidden;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(42px, 7vw, 108px);
  font-weight: 800;
}

h2 {
  font-size: clamp(34px, 4.5vw, 64px);
  font-weight: 700;
}

h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
}

p {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.75;
}

em {
  font-style: italic;
  color: var(--accent);
}

/* ---- Eyebrow / Tag ---- */
.eyebrow,
.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ---- Layout ---- */
.section-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: var(--section-pad) var(--inner-pad);
}

.section-light {
  background: var(--bg-cream);
  color: var(--text-dark);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

.section-dark .section-tag {
  color: var(--accent);
}

.section-dark p {
  color: var(--text-light-2);
}

.section-header {
  max-width: 720px;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-sub {
  margin-top: 16px;
  color: var(--text-dark-2);
  font-size: clamp(15px, 1.2vw, 18px);
}

.section-dark .section-sub {
  color: var(--text-light-2);
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s var(--ease-out),
              transform 0.2s var(--ease-out),
              box-shadow 0.2s var(--ease-out);
  white-space: nowrap;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-lg {
  padding: 17px 36px;
  font-size: 16px;
  border-radius: 10px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  color: var(--text-light-2);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(237, 237, 233, 0.2);
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--text-light);
  border-color: var(--text-light);
}

.btn-ghost .arrow {
  transition: transform 0.2s var(--ease-out);
}

.btn-ghost:hover .arrow {
  transform: translateY(3px);
}

/* ---- Navigation ---- */
/* Nav hidden — brand lives inside the hero instead */
#nav { display: none; }

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200; /* above hero video + hero::after gradient */
  height: var(--nav-height);
  background: transparent;
  transition: background 0.4s var(--ease-out),
              backdrop-filter 0.4s,
              -webkit-backdrop-filter 0.4s,
              border-color 0.4s;
  border-bottom: 1px solid transparent;
}

/* Subtle top gradient so logo is legible against any sky */
#nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s var(--ease-out);
}

#nav.scrolled {
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-color: var(--border-light);
}

/* Hide the top-gradient once nav has its own background */
#nav.scrolled::before {
  opacity: 0;
}

.nav-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 0 var(--inner-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: -0.02em;
}

.logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.nav-cta {
  font-size: 14px;
  padding: 11px 22px;
}

/* ---- Scroll animations ---- */
[data-animate] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-delay="1"] { transition-delay: 0.12s; }
[data-delay="2"] { transition-delay: 0.24s; }
[data-delay="3"] { transition-delay: 0.36s; }

/* ---- Utility ---- */
.br-desktop { display: none; }
@media (min-width: 768px) { .br-desktop { display: block; } }

.optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light-2);
}

/* ---- Accessibility utilities ---- */

/* Skip link — lets keyboard users jump past navigation */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Screen-reader only utility — hides content visually but keeps it accessible */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- Site loader overlay ---- */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #080808;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

#site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#hyperdrive-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.loader-brand {
  position: relative;
  z-index: 1;
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  opacity: 0;
  will-change: transform, opacity, filter;
  animation:
    loader-brand-in   0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.1s  both,
    loader-brand-jump 1.1s  cubic-bezier(0.55, 0, 1, 0.45) 1.2s forwards;
}

@keyframes loader-brand-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes loader-brand-jump {
  0%   { opacity: 1;    transform: scale(1);     filter: blur(0px);  }
  25%  { opacity: 0.85; transform: scale(0.55);  filter: blur(0px);  }
  60%  { opacity: 0.35; transform: scale(0.18);  filter: blur(2px);  }
  100% { opacity: 0;    transform: scale(0.02);  filter: blur(6px);  }
}

.loader-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #84B59F, #50808E);
  transition: width 0.06s linear;
}

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

  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
