/* ============================================================
   Dragon.fi — Styles
   Premium dark B2B landing page
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --color-bg-dark: #0a0f1c;
  --color-bg-dark-alt: #111827;
  --color-bg-light: #f4f5f7;
  --color-surface: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.08);
  --color-glass: rgba(255, 255, 255, 0.07);
  --color-glass-border: rgba(255, 255, 255, 0.12);
  --color-text: #ffffff;
  --color-text-muted: #9ca3b4;
  --color-text-dark: #1a1a2e;
  --color-text-dark-muted: #555e6e;
  --color-accent: #d4a843;
  --color-accent-hover: #e6bd5a;
  --color-error: #ef4444;
  --color-success: #22c55e;
  --font-display: 'TASA Explorer', sans-serif;
  --font-body: 'Zalando Sans', sans-serif;
  --font-button: 'TASA Orbiter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

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

/* ---------- Shared Section ---------- */
.section {
  padding: 60px 0 120px 0;
  position: relative;
}

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

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section__title--dark { color: var(--color-text-dark); }

.section__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section__subtitle--dark { color: var(--color-text-dark-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-button);
  font-weight: 600;
  font-size: 1.2rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: #000;
  padding: 14px 32px;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212, 168, 67, 0.3);
}

.btn--large {
  font-size: 1.1rem;
  padding: 16px 40px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 80vh;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  /*overflow: hidden;*/
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: var(--color-bg-dark-alt);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 15, 28, 0.20) 0%,
    rgba(10, 15, 28, 0.60) 50%,
    rgba(10, 15, 28, 1.00) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 70%;
  padding: 0 24px 96px;  
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  -webkit-text-stroke: 1px #000;
  paint-order: stroke fill;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text);
  margin: 0 auto 32px;
  line-height: 1.7;
  max-width: 60%;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.45);
  paint-order: stroke fill;
}

.hero__cta { margin-top: 8px; }

/* Scroll indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--color-text-muted);
  animation: heroArrowBounce 2s ease-in-out infinite;
}

@keyframes heroArrowBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%      { transform: translateX(-50%) translateY(10px); opacity: 1; }
}

.section-scroll-arrow {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--color-text-muted);
  text-decoration: none;
  animation: heroArrowBounce 2s ease-in-out infinite;
}

.section-scroll-arrow svg {
  width: 64px;
  height: 64px;
}

.section--light .section-scroll-arrow,
.cta-section .section-scroll-arrow {
  color: var(--color-text-dark-muted);
}

/* ============================================================
   HOW THIS WORKS — CAROUSEL
   ============================================================ */
.carousel {
  position: relative;
  overflow: hidden;
  padding: 0 0 20px;
}

@media (hover: hover) and (pointer: fine) {
  .carousel {
    cursor: pointer;
  }
}

.carousel__track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 50%;
  padding: 0 12px;
  transition: flex var(--transition), opacity var(--transition);
  display: flex;
  flex-direction: column;
}

.carousel__slide--center {
  flex: 0 0 20%;
}

.carousel__slide--left {
  flex: 0 0 40%;
  opacity: 0.6;
}

.carousel__slide--right {
  flex: 0 0 40%;
  opacity: 0.6;
}

.carousel__image-wrap {
  position: relative;
  width: 100%;
  height: 28vw;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-dark-alt);
}

.carousel__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Separated overlay layer so carousel image shading is easy to tweak. */
.carousel__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(210, 215, 228, 0.20) 0%,
    rgba( 40,  15,  28, 0.50) 20%,
    rgba( 40,  15,  28, 0.60) 60%,
    rgba( 40,  15,  28, 0.50) 80%,
    rgba(210, 215, 228, 0.20) 100%
  );
  z-index: 1;
}

.carousel__slide--left .carousel__image-wrap img {
  object-position: right center;
}

.carousel__slide--right .carousel__image-wrap img {
  object-position: left center;
}

.carousel__caption {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  z-index: 2;
}

.carousel__caption h3 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #fff;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.45),
     1px -1px 0 rgba(0, 0, 0, 0.45),
    -1px  1px 0 rgba(0, 0, 0, 0.45),
     1px  1px 0 rgba(0, 0, 0, 0.45);
}

.carousel__caption p {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
  max-width: 80%;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.4),
     1px -1px 0 rgba(0, 0, 0, 0.4),
    -1px  1px 0 rgba(0, 0, 0, 0.4),
     1px  1px 0 rgba(0, 0, 0, 0.4);
}

/* ============================================================
   WHAT THIS ENABLES
   ============================================================ */
.enables {
  position: relative;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px;
}

.enables > .section__title {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-bottom: 40px;
  color: #fff;
}

.enables__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: var(--color-bg-dark-alt);
}

.enables__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 28, 0.75);
  z-index: 1;
}

.enables__items {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 60vw;
  width: 100%;
}

.enables__card {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.enables__card.is-visible {
  opacity: 1;
  transform: scale(1);
}

.enables__icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 12px;
}

.enables__card h3 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.enables__card p {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ============================================================
   WHY THIS WORKS
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.why-card {
  padding: 32px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition), transform var(--transition);
}

.why-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.why-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.why-card h3 {
  font-family: var(--font-display);
  font-size: 2.0rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 10px;
}

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

/* ============================================================
   USE CASES
   ============================================================ */
.usecases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 42vw;
  margin: 0 auto;
}

.usecase {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--color-bg-dark-alt);
}

.usecase__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.7) 100%);
}

.usecase__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  z-index: 1;
}

.usecase__content h3 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 6px;
}

.usecase__content p {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ============================================================
   TECHNOLOGIES CAROUSEL
   ============================================================ */

#tech .container p {
  color: #000;
  padding: 40px 0 60px 0;
}

.tech-carousel {
  overflow: hidden;
  padding: 60px 0 60px 0;
}

.tech-carousel__track {
  display: flex;
  animation: techScroll 28s linear infinite;
  width: max-content;
}

.tech-carousel__item {
  flex: 0 0 auto;
  width: 120px;
  height: 60px;
  margin: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-carousel__item img {
  max-height: 48px;
  max-width: 100px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.7);
  opacity: 0.5;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.tech-carousel__item:hover img,
.tech-carousel__item.active img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

@keyframes techScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   LIGHT PROOF / TRUST
   ============================================================ */

#trust .section__title {
  padding-bottom: 50px;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.trust-item h3 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--color-text);  
}

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

/* ============================================================
   CTA SECTION
   ============================================================ */

#cta {   
  padding-top: 150px;
}

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

.cta-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}

.cta-image {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-dark-alt);
  min-height: 300px;
}

.cta-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 300px;
}

.cta-content {
  flex: 1;
}

.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--color-text-dark);
}

.cta-content p {
  color: var(--color-text-dark-muted);
  margin-bottom: 28px;
  font-size: 1.2rem;
  line-height: 1.65;
}

.cta-button {
  text-align: center;
}

.cta-button .btn {
  width: 100%;
  padding: 24px 32px;
  font-size: 1.35rem;
  animation: ctaButtonPulse 2.8s ease-in-out infinite;
}

.cta-button .btn:hover,
.cta-button .btn:focus-visible {
  animation-play-state: paused;
}

@keyframes ctaButtonPulse {
  0%,
  100% {
    transform: scale(0.98);
    box-shadow: 0 8px 24px rgba(212, 168, 67, 0.2);
  }
  50% {
    transform: scale(1.00);
    box-shadow: 0 12px 30px rgba(212, 168, 67, 0.3);
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 32px 0;
  background: var(--color-bg-light);
  padding: 120px 0px 50px 0px;
}

.footer__inner {
  text-align: center;
  color: var(--color-text-dark-muted);
  font-size: 0.6rem; 
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop[hidden] { display: none; }

.modal-backdrop.is-open {
  opacity: 1;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  padding: 40px 36px 36px;
  position: relative;
  color: var(--color-text-dark);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-dark-muted);
  transition: color var(--transition);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal__close:hover { color: var(--color-text-dark); background: rgba(0,0,0,0.05); }

.modal__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 28px;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-dark);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

.form-group input.has-error,
.form-group textarea.has-error {
  border-color: var(--color-error);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: 4px;
  min-height: 1em;
}

.form-actions {
  margin-top: 28px;
}

.form-actions .btn { width: 100%; }

.btn__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn__spinner[hidden] { display: none; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.45;
}

.form-status[hidden] { display: none; }

.form-status--success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-status--error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .why-grid,
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .enables__items {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .usecases-grid {
    max-width: 90%;
  }

  .cta-layout {
    flex-direction: column;
    gap: 32px;
  }

  .cta-image { width: 100%; }
  .cta-content { text-align: center; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }

  .hero {
    min-height: 380px;
    align-items: flex-start;
  }

  .hero__headline {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
  }

  .hero__sub {    
    font-size: clamp(1.2rem, 2vw, 1.4rem);
  }

  .hero__content {
    width: 100%;
    max-width: 100%;
    padding: 32px 16px;
  }

  .hero__scroll-indicator {
    bottom: 20px;
  }

  .carousel__image-wrap {
    height: 50vw;
  }

  .carousel__slide--left .carousel__caption,
  .carousel__slide--right .carousel__caption {
    display: none;
  }

  .enables__items {
    padding-left: 20px;
    padding-right: 20px;
  }

  .usecases-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .tech-carousel__item {
    width: 80px;
    margin: 0 20px;
  }

  .tech-carousel__item img {
    max-height: 36px;
    max-width: 72px;
  }

  .modal {
    padding: 24px 18px 20px;
  }

  .modal__title {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group label {
    font-size: 0.82rem;
    margin-bottom: 4px;
  }

  .form-group input,
  .form-group textarea {
    padding: 8px 10px;
    font-size: 0.88rem;
  }

  .form-group textarea {
    min-height: 64px;
  }

  .form-error {
    font-size: 0.72rem;
    margin-top: 2px;
    min-height: 0.8em;
  }

  .form-actions {
    margin-top: 16px;
  }

  .form-actions .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

@media (max-width: 1450px) {
  .carousel__caption h3 { font-size: 1.8rem; }
  .carousel__caption p { font-size: 1.1rem; }  
}

@media (max-width: 1150px) {
  .carousel__caption h3 { font-size: 1.4rem; }
  .carousel__caption p { font-size: 0.85rem; }  
}

@media (max-width: 940px) {
  .carousel__caption h3 { font-size: 1.8rem; }
  .carousel__caption p { font-size: 1rem; }  
}

@media (max-width: 480px) {
  .hero__headline { font-size: 2.65rem; }  
  .hero__sub { font-size: 1.4rem; max-width: 90%; }
  .hero__scroll-indicator { bottom: -94px; }
  #how { padding: 90px 0; }
  #how .carousel__caption { padding: 0; }
  #how .carousel__caption h3 { font-size: 1.4rem; }
  #how .carousel__caption p { font-size: 1.0rem; }
  .btn--large { padding: 14px 28px; font-size: 1rem; }
  .enables__icon { font-size: 1.8rem; }
  .enables__card h3 { font-size: 1.4rem; }
  .enables__card p { font-size: 1.0rem; }
  .why-card__icon { transform: scale(0.8); }
  .why-card h3 { font-size: 1.4rem; }
  .why-card p { font-size: 1.0rem; }
  #why .container { padding-bottom: 40px; }
  #usecases .container { padding-bottom: 40px; }
  #trust .container { padding-bottom: 40px; }
  #trust .section__title { font-size: 2.1rem; }
  .trust-item h3 { font-size: 1.2rem; }    
  .trust-item p { font-size: 0.9rem; }
  #cta { padding-top: 40px; }  
}

@media (max-width: 456px) {
  .hero__scroll-indicator { bottom: -128px; }
  #how { padding: 110px 0; }
}

@media (max-width: 376px) {
  .hero__headline { font-size: 2.05rem; }
  .hero__sub { font-size: 1.25rem; }
}

@media (max-width: 320px) {
  .hero__headline { font-size: 1.9rem; }
  .hero__sub { font-size: 1.1rem; }
}

/* Prevent body scroll when modal is open */
body.modal-open { overflow: hidden; }
