/* ============================================================
   KLIKRZ — Lead by Design
   Static clone styles (design system + layout + animation)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Dark theme — dark background, cream text */
  --bg: #15141a;
  --bg-soft: #221f2a;
  --fg: #fbeeed;
  --muted: rgba(251, 238, 237, 0.6);
  --muted-2: rgba(251, 238, 237, 0.38);
  --line: rgba(251, 238, 237, 0.14);
  --accent: #c54025;
  --accent-deep: #a7361f;
  --accent-grad: linear-gradient(135deg, #c54025 0%, #ff805d 100%);

  --font: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-loader: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1600px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip (not hidden) so the body doesn't become a scroll container,
     which would break the sticky/pinned hero parallax. */
  overflow-x: clip;
}

/* Lock scroll while the loader is on screen / menu open */
body.is-loading,
body.menu-open {
  overflow: hidden;
}

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

ol,
ul {
  list-style: none;
}

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

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Shared utilities ---------- */
.section {
  position: relative;
  padding: clamp(6rem, 16vh, 14rem) var(--pad-x);
  max-width: var(--maxw);
  margin-inline: auto;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.big {
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

/* Buttons */
.btn {
  --b: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.9em 1.5em;
  border: 1px solid var(--b);
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 400;
  font-family: inherit;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease),
    color 0.5s var(--ease), transform 0.5s var(--ease);
  overflow: hidden;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn__arrow {
  transition: transform 0.5s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--lg {
  font-size: 1.05rem;
  padding: 1.05em 1.9em;
}

/* Reel "Explore" button — same look as the hero's "Launch my campaign":
   white text, transparent fill, subtle light border, gently rounded, and
   fills with the brand accent on hover. */
.reel__cta {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}

.reel__cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.link-underline {
  position: relative;
  font-weight: 400;
}

.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.link-underline:hover::after {
  transform: scaleX(0);
  transform-origin: right;
}

/* ============================================================
   INTRO LOADER
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: #15141a; /* secondary — dark loading screen, white wordmark on top */
  transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}

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

.loader__word {
  display: flex;
  font-family: var(--font-loader); /* preloader uses Raleway, like the rest of the site */
  font-weight: 200;
  font-size: clamp(2.2rem, 9vw, 7rem);
  letter-spacing: 0.4em;
  /* offset so optical centering with letter-spacing looks right */
  padding-left: 0.4em;
  color: #fff; /* stays white on the terracotta loader, independent of theme */
}

.loader__letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.25em);
  filter: blur(12px);
}

.loader__letter.is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease),
    filter 0.7s var(--ease);
}

/* Per-letter weight for the "KLIKRZ" wordmark — a descending ramp
   from the boldest K down to the lightest Z. Positional, so it
   assumes the 6-letter wordmark; tweak the weights here to taste. */
.loader__letter:nth-child(1) { font-weight: 800; } /* K */
.loader__letter:nth-child(2) { font-weight: 600; } /* L */
.loader__letter:nth-child(3) { font-weight: 500; } /* I */
.loader__letter:nth-child(4) { font-weight: 400; } /* K */
.loader__letter:nth-child(5) { font-weight: 300; } /* R */
.loader__letter:nth-child(6) { font-weight: 200; } /* Z */

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 2.2vw, 1.6rem) var(--pad-x);
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand__mark {
  width: 34px;
  height: 34px;
  fill: var(--accent);
  transition: transform 0.8s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(90deg);
}

.brand__name {
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* Logo images: full wordmark at the top of the page, compact symbol once
   the page is scrolled (body.scrolled is toggled in header-scroll.js).
   The symbol is stacked over the logo's left edge (where the K mark sits)
   so the two crossfade smoothly via opacity. */
.brand__logo,
.brand__symbol {
  display: block;
  height: 34px;
  width: auto;
  transition: opacity 0.6s var(--ease-soft);
}

.brand__symbol {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}

body.scrolled .brand__logo {
  opacity: 0;
}

body.scrolled .brand__symbol {
  opacity: 1;
}

/* Menu toggle button */
.menu-toggle {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  background: rgba(197, 64, 37, 0.5); /* --accent (#c54025) at ~50% opacity */
  cursor: pointer;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.menu-toggle:hover {
  background: var(--accent-deep);
  border-color: rgba(255, 255, 255, 0.9);
}

.menu-toggle__box {
  position: relative;
  width: 16px;
  height: 8.4px;
}

.menu-toggle__line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: #fff;
  transition: transform 0.5s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle__line:nth-child(1) {
  top: 0;
}

.menu-toggle__line:nth-child(2) {
  bottom: 0;
}

/* Toggle -> X when menu open */
body.menu-open .menu-toggle__line:nth-child(1) {
  transform: translateY(3.45px) rotate(45deg);
}

body.menu-open .menu-toggle__line:nth-child(2) {
  transform: translateY(-3.45px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem;
  padding-bottom: 6rem;
}

.hero__eyebrow {
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
  opacity: 0;
  transform: translateY(1rem);
}

.hero__title {
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-size: clamp(2.4rem, 7vw, 6.5rem);
  max-width: 18ch;
}

.rotator {
  display: grid;
}

.rotator__line {
  grid-area: 1 / 1;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.35em);
  transition: opacity 0.9s var(--ease), filter 0.9s var(--ease),
    transform 0.9s var(--ease);
  pointer-events: none;
}

.rotator__line.is-active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  pointer-events: auto;
}

.hero .btn {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  align-self: flex-start;
  opacity: 0;
  transform: translateY(1rem);
}

.scroll-cue {
  position: absolute;
  left: var(--pad-x);
  bottom: clamp(1.5rem, 4vh, 3rem);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
}

.scroll-cue__arrow {
  animation: bob 1.8s var(--ease-soft) infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Reveal hero content once loaded */
body.is-loaded .hero__eyebrow,
body.is-loaded .hero .btn,
body.is-loaded .scroll-cue {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1s var(--ease) 0.15s, transform 1s var(--ease) 0.15s;
}

body.is-loaded .hero .btn {
  transition-delay: 0.3s;
}

body.is-loaded .scroll-cue {
  transition-delay: 0.45s;
}

/* ============================================================
   STATEMENT / MISSION / ABOUT (big type blocks)
   ============================================================ */
.statement__lead {
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-size: clamp(3rem, 11vw, 11rem);
  margin-bottom: 1.5rem;
}

.statement__sub,
.mission__lead,
.about__lead {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-size: clamp(1.6rem, 4.6vw, 4rem);
  max-width: 24ch;
}

.mission {
  display: grid;
  gap: clamp(2rem, 6vw, 6rem);
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
}

.mission__lead {
  max-width: 16ch;
}

.mission__body {
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  max-width: 42ch;
}

.about {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

.about__lead {
  max-width: 30ch;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
}

.about__sub {
  font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  max-width: 26ch;
  color: var(--muted);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  border-top: 1px solid var(--line);
}

.services__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 5rem);
}

.service {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.service__num {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

.service__title {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.service__desc {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 34ch;
  margin-top: auto;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(2rem, 5vh, 3.5rem);
  padding-block: clamp(8rem, 22vh, 18rem);
}

.cta__title {
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  max-width: 18ch;
  color: var(--muted);
}

/* Lead clause stays bright; the rest reads in muted grey (two-tone). */
.cta__lead {
  color: var(--fg);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem var(--pad-x);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.footer__nav a {
  transition: color 0.4s var(--ease);
}

.footer__nav a:hover {
  color: var(--fg);
}

.footer__sep {
  margin: 0 10px;
  color: var(--muted-2);
}

/* ============================================================
   MENU OVERLAY
   ============================================================ */
.menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

body.menu-open .menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.menu__inner {
  position: relative;
  height: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(7rem, 14vh, 11rem) var(--pad-x) clamp(2rem, 5vh, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu__primary {
  display: flex;
  flex-direction: column;
  gap: clamp(0.25rem, 1vh, 1rem);
  align-items: center;
  text-align: center;
}

.menu__link {
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-size: clamp(3rem, 11vw, 9rem);
  color: var(--muted-2);
  transition: color 0.5s var(--ease);
}

.menu__link span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.7s var(--ease);
}

.menu__link:hover {
  color: var(--fg);
}

body.menu-open .menu__link span {
  transform: translateY(0);
}

body.menu-open .menu__link:nth-child(1) span { transition-delay: 0.08s; }
body.menu-open .menu__link:nth-child(2) span { transition-delay: 0.16s; }
body.menu-open .menu__link:nth-child(3) span { transition-delay: 0.24s; }
body.menu-open .menu__link:nth-child(4) span { transition-delay: 0.32s; }

.menu__secondary {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  justify-content: center;
  margin-top: clamp(2rem, 5vh, 3.5rem);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s var(--ease) 0.3s, transform 0.6s var(--ease) 0.3s;
}

body.menu-open .menu__secondary {
  opacity: 1;
  transform: translateY(0);
}

.menu__secondary a {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.4s var(--ease);
}

.menu__secondary a:hover {
  color: var(--fg);
}

/* Bottom corners of menu */
.menu__cta {
  position: absolute;
  left: var(--pad-x);
  bottom: clamp(2rem, 5vh, 4rem);
  max-width: 22ch;
  font-size: 0.95rem;
  color: var(--muted);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s var(--ease) 0.4s, transform 0.6s var(--ease) 0.4s;
}

.menu__cta p {
  margin-bottom: 0.5rem;
}

.menu__cta .link-underline {
  color: var(--fg);
}

.menu__feature {
  position: absolute;
  right: var(--pad-x);
  bottom: clamp(2rem, 5vh, 4rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 340px;
  background: rgba(0, 0, 0, 0.03);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s var(--ease) 0.5s, transform 0.6s var(--ease) 0.5s,
    background 0.4s var(--ease), border-color 0.4s var(--ease);
}

body.menu-open .menu__cta,
body.menu-open .menu__feature {
  opacity: 1;
  transform: translateY(0);
}

.menu__feature:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.25);
}

.menu__feature-img {
  flex: 0 0 84px;
  width: 84px;
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3a3a3a, #111 70%);
  position: relative;
  overflow: hidden;
}

.menu__feature-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.25), transparent 60%);
}

.menu__feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.menu__feature-title {
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.25;
}

/* ============================================================
   SCROLL REVEAL (blur -> focus, grey -> white)
   driven by --p (0..1) set from scroll-reveal.js
   ============================================================ */
[data-reveal] {
  --p: 0;
}

/* Whole-element reveal (no word splitting). Gated on .js so that
   without JavaScript the text simply shows at full opacity. */
.js [data-reveal]:not([data-reveal="words"]) {
  opacity: calc(0.12 + 0.88 * var(--p));
  filter: blur(calc((1 - var(--p)) * 7px));
  transform: translateY(calc((1 - var(--p)) * 0.18em));
  will-change: opacity, filter, transform;
}

/* Word-by-word reveal */
.rw {
  display: inline-block;
  white-space: pre;
}

.rw__i {
  display: inline-block;
  opacity: calc(0.12 + 0.88 * var(--wp, 0));
  filter: blur(calc((1 - var(--wp, 0)) * 6px));
  transform: translateY(calc((1 - var(--wp, 0)) * 0.22em));
  will-change: opacity, filter, transform;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .mission {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .services__list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .service {
    padding-block: 2rem;
  }

  .service__desc {
    margin-top: 0;
  }

  .menu__feature {
    display: none; /* keep menu uncluttered on small screens */
  }

  .menu__cta {
    right: var(--pad-x);
    max-width: none;
  }
}

@media (max-width: 560px) {
  .brand__name {
    display: none;
  }

  .menu__primary {
    align-items: flex-start;
    text-align: left;
  }

  .menu__secondary {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .cta {
    text-align: left;
    align-items: flex-start;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .loader__letter,
  [data-reveal]:not([data-reveal="words"]),
  .rw__i,
  .rotator__line {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .rotator__line:not(.is-active) {
    display: none;
  }
}
