/* ==========================================================================
   CHRAFIX / JUKA DOJO – NYC
   Style System · v2.0
   ========================================================================== */

/* ── 1. FONTS ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/montserrat-v26-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/montserrat-v26-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/montserrat-v26-latin-700.woff2') format('woff2');
}

/* ── 2. DESIGN TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Colors */
  --c-bg:          #181818;
  --c-surface:     #1f1f1f;
  --c-surface-2:   #252525;
  --c-accent:      #f08600;
  --c-accent-dim:  rgba(240, 134, 0, 0.15);
  --c-accent-glow: rgba(240, 134, 0, 0.35);
  --c-white:       #ffffff;
  --c-muted:       rgba(255, 255, 255, 0.72);
  --c-muted-2:     rgba(255, 255, 255, 0.35);
  --c-line:        rgba(255, 255, 255, 0.08);
  --c-error:       #e05c5c;

  /* Typography */
  --f-display: 'Times New Roman', 'Georgia', serif;
  --f-body:    'Montserrat', sans-serif;

  /* Spacing scale */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  32px;
  --space-lg:  64px;
  --space-xl:  96px;
  --space-2xl: 140px;

  /* Layout */
  --max-w: 1040px;
  --radius: 4px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 3. RESET + BASE ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--c-bg);
  color: var(--c-white);
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
a { color: var(--c-accent); text-decoration: none; }

/* Focus outline - accessible */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* ── 4. LAYOUT HELPERS ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
}

/* ── 5. ANIMATION BASE ────────────────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-animate="fade-down"] {
  transform: translateY(-20px);
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-delay="100"]  { transition-delay: 0.10s; }
[data-delay="150"]  { transition-delay: 0.15s; }
[data-delay="200"]  { transition-delay: 0.20s; }
[data-delay="250"]  { transition-delay: 0.25s; }
[data-delay="300"]  { transition-delay: 0.30s; }


/* ══════════════════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* Hero Image */
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    url('../assets/images/header-popkes-nyc.jpg') center 40% / cover no-repeat;
}

/* Overlays – etwas stärker als beim Video, da das JPEG hell ist */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 10, 12, 0.52);
}
.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(18, 18, 20, 0.25)  0%,
    rgba(18, 18, 20, 0.05)  25%,
    rgba(18, 18, 20, 0.15)  55%,
    rgba(18, 18, 20, 0.90) 100%
  );
}

/* Logo */
.hero-logo {
  position: relative;
  z-index: 5;
  margin-bottom: var(--space-lg);
}
.hero-logo img {
  width: clamp(140px, 18vw, 220px);
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 5;
  padding: 0 var(--space-sm);
}

.hero-pre-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--c-accent);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.pre-line {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--c-accent);
  opacity: 0.6;
}

/* Headline */
.hero-headline {
  font-family: var(--f-display);
  font-size: clamp(3rem, 13vw, 7.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0 0 20px;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
  min-height: 1.1em;
  display: inline-flex;
  align-items: center;
}

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--c-accent);
  margin-left: 8px;
  vertical-align: middle;
  animation: blink 0.75s step-end infinite;
}
.typewriter-cursor.done {
  animation: none;
  opacity: 0;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Subline */
.hero-subline {
  color: var(--c-muted);
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

/* Hero CTA */
.hero-cta {
  display: flex;
  justify-content: center;
}


/* ── CTA DOWNLOAD BUTTON ──────────────────────────────────────────────── */
.btn-download {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  text-decoration: none;
  isolation: isolate;

  /* Glow pulse animation */
  animation: cta-pulse 3s ease-in-out 2s infinite;
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--c-accent-glow); }
  50%       { box-shadow: 0 0 0 12px rgba(240,134,0,0); }
}

/* Background layer */
.btn-download__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #f08600 0%, #d96e00 50%, #f0a030 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  transition: background-position 0.5s var(--ease);
  z-index: 0;
}

.btn-download:hover .btn-download__bg {
  background-position: 100% 50%;
}

/* Shine sweep */
.btn-download__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.18) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  transition: transform 0.55s var(--ease-out);
  z-index: 1;
  pointer-events: none;
}
.btn-download:hover .btn-download__shine {
  transform: translateX(100%);
}

/* Content */
.btn-download__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 36px;
  color: #fff;
  transition: transform 0.3s var(--ease-out);
}
.btn-download:hover .btn-download__content {
  transform: translateY(-2px);
}

.btn-download__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-download__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  line-height: 1.2;
}
.btn-download__sub {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  opacity: 0.75;
  display: block;
  line-height: 1;
  margin-top: 3px;
}


/* ── SCROLL INDICATOR ─────────────────────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fade-in 1s var(--ease-out) 2.8s forwards;
}
@keyframes fade-in {
  to { opacity: 1; }
}
.scroll-label {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--c-line);
  position: relative;
  overflow: hidden;
}
.scroll-dot {
  position: absolute;
  top: -6px;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
  animation: scroll-fall 1.8s var(--ease-in) 3s infinite;
}
@keyframes scroll-fall {
  0%   { top: -6px; opacity: 1; }
  80%  { top: 44px;  opacity: 1; }
  100% { top: 44px;  opacity: 0; }
}


/* ══════════════════════════════════════════════════════════════════════════
   CONTACT SECTION
══════════════════════════════════════════════════════════════════════════ */
.contact-section {
  padding: var(--space-2xl) 0;
  background: var(--c-bg);
  position: relative;
}

/* Top border accent line */
.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--c-line));
}

/* ── Section Header ───────────────────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-xl);
  max-width: 560px;
}
.section-label {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0 0 20px;
}
.section-desc {
  color: var(--c-muted);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  margin: 0 0 32px;
}
.section-rule {
  width: 48px;
  height: 2px;
  background: var(--c-accent);
  opacity: 0.6;
}


/* ── CONTACT FORM ─────────────────────────────────────────────────────── */
.contact-form {
  max-width: 840px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
  tab-size: 0;
}

/* Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.form-row--split {
  grid-template-columns: 1fr 1fr;
}

/* Form Group */
.form-group {
  position: relative;
}

/* Input + Textarea */
.form-input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--c-line);
  padding: 14px 0 12px;
  color: var(--c-white);
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  outline: none;
  transition: border-color 0.3s var(--ease);
  -webkit-appearance: none;
}
.form-input::placeholder { color: transparent; }
.form-input:autofill,
.form-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--c-surface) inset;
  -webkit-text-fill-color: var(--c-white);
  caret-color: var(--c-white);
}

.form-textarea {
  resize: none;
  min-height: 100px;
  line-height: 1.7;
}

/* Floating Label */
.form-label {
  position: absolute;
  top: 14px;
  left: 0;
  color: var(--c-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  transition: all 0.25s var(--ease-out);
  transform-origin: left center;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  top: -10px;
  font-size: 0.6rem;
  color: var(--c-accent);
  letter-spacing: 0.18em;
}

/* Animated bar */
.form-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--c-accent);
  transition: width 0.4s var(--ease-out);
  pointer-events: none;
}
.form-input:focus ~ .form-bar {
  width: 100%;
}

/* Validation errors */
.form-error {
  display: block;
  color: var(--c-error);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s var(--ease);
  pointer-events: none;
}
.form-group.has-error .form-error {
  opacity: 1;
  transform: translateY(0);
}
.form-group.has-error .form-input {
  border-bottom-color: var(--c-error);
}
.form-group.has-error .form-bar {
  background: var(--c-error);
}
.privacy-error {
  display: none;
  margin-top: var(--space-xs);
}
.privacy-error.visible {
  display: block;
  opacity: 1;
  transform: none;
}


/* ── Form Footer ──────────────────────────────────────────────────────── */
.form-footer {
  display: flex;
  flex-direction: column;
  gap: 32px;
}


/* ── Privacy Checkbox ─────────────────────────────────────────────────── */
.privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}
.privacy-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.privacy-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid var(--c-muted-2);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
  background: transparent;
}
.privacy-box svg {
  width: 10px;
  height: 10px;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s var(--ease-out);
}
.privacy-input:checked ~ .privacy-box {
  background: var(--c-accent);
  border-color: var(--c-accent);
}
.privacy-input:checked ~ .privacy-box svg {
  opacity: 1;
  transform: scale(1);
}
.privacy-text {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--c-muted);
  line-height: 1.65;
}
.privacy-text a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(240,134,0,0.4);
  transition: text-decoration-color 0.2s;
}
.privacy-text a:hover {
  text-decoration-color: var(--c-accent);
}


/* ── Submit Button ────────────────────────────────────────────────────── */
.btn-submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--c-white);
  padding: 16px 32px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
  z-index: -1;
}
.btn-submit:hover::before {
  transform: scaleX(1);
}
.btn-submit:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(240,134,0,0.2);
}
.btn-submit:active {
  transform: translateY(0);
}
.btn-submit__arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}
.btn-submit:hover .btn-submit__arrow {
  transform: translateX(5px);
}
.btn-submit__loading {
  display: none;
}
.btn-submit.is-loading .btn-submit__text,
.btn-submit.is-loading .btn-submit__arrow {
  opacity: 0;
}
.btn-submit.is-loading .btn-submit__loading {
  display: block;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner {
  width: 20px;
  height: 20px;
  animation: spin 0.9s linear infinite;
}
.spinner circle {
  stroke-dasharray: 31.4;
  stroke-dashoffset: 10;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ══════════════════════════════════════════════════════════════════════════
   THANK YOU OVERLAY
══════════════════════════════════════════════════════════════════════════ */
.thankyou-overlay {
  display: none;
  position: absolute;
  inset: -40px -60px;
  background: var(--c-bg);
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 60px 24px;
}
.thankyou-overlay.is-visible {
  display: flex;
  animation: overlay-in 0.6s var(--ease-out) both;
}
@keyframes overlay-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.thankyou-card {
  text-align: center;
  max-width: 440px;
}
.thankyou-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 32px;
  color: var(--c-accent);
  animation: icon-draw 0.8s var(--ease-out) 0.2s both;
}
@keyframes icon-draw {
  from { opacity: 0; transform: scale(0.7) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
.thankyou-title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
  animation: slide-up 0.6s var(--ease-out) 0.35s both;
}
.thankyou-text {
  color: var(--c-muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
  margin: 0 0 40px;
  animation: slide-up 0.6s var(--ease-out) 0.45s both;
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn-reset {
  background: transparent;
  border: 1px solid var(--c-line);
  color: var(--c-muted);
  padding: 12px 28px;
  font-family: var(--f-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
  animation: slide-up 0.6s var(--ease-out) 0.55s both;
}
.btn-reset:hover {
  border-color: var(--c-muted-2);
  color: var(--c-white);
}


/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--c-line);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand img {
  filter: brightness(0) invert(1);
  opacity: 0.35;
  transition: opacity 0.3s;
}
.footer-brand img:hover { opacity: 0.6; }

.footer-contact,
.footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.footer-contact a,
.footer-legal a {
  color: var(--c-muted);
  transition: color 0.2s;
}
.footer-contact a:hover,
.footer-legal a:hover {
  color: var(--c-accent);
}
.footer-sep { color: var(--c-line); }


/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .form-row--split {
    grid-template-columns: 1fr;
  }
  .hero-headline {
    letter-spacing: 0.05em;
  }
  .section-header {
    margin-bottom: var(--space-lg);
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .thankyou-overlay {
    inset: -24px;
  }
  .btn-submit {
    align-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-subline {
    letter-spacing: 0.1em;
  }
  .btn-download__content {
    padding: 16px 24px;
  }
  .contact-section {
    padding: var(--space-xl) 0;
  }
}

/* ── Reduced motion preference ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
}
