@import url("./tokens.css");

:root {
  --fs-h1: clamp(2rem, 1.5rem + 2.5vw, 4.5rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.5vw, 3rem);
  --fs-h3: clamp(1.1rem, 1rem + 0.8vw, 1.8rem);
  --fs-body: clamp(0.9rem, 0.85rem + 0.3vw, 1.1rem);
  --fs-small: clamp(0.75rem, 0.7rem + 0.2vw, 0.9rem);
}

/* Fonts */
@font-face {
  font-family: "Geom";
  src: url("../assets/Fonts/GEOM.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("../assets/Fonts/Oswald-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PixelCaps";
  src: url("../assets/Fonts/PIXEL-CAPS.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "W3S-TitleV2";
  src: url("../assets/Fonts/title-v2.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "W3S-BodyV2";
  src: url("../assets/Fonts/body-v2-roboto.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rubik 80s Fade";
  src: url("../assets/Fonts/Rubik80sFade-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Rubik Glitch";
  src: url("../assets/Fonts/RubikGlitch-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Rubik Broken Fax";
  src: url("../assets/Fonts/RubikBrokenFax-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
}

body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #050816 0, #020617 55%, #020617);
  color: var(--w3s-text);
  font-family: "W3S-BodyV2", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

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

button {
  font: inherit;
}

.font-geom {
  font-family: "Geom", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.font-pixel-caps {
  font-family: "PixelCaps", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.ui-dev-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.ui-dev-header {
  margin-bottom: 24px;
}

.ui-dev-title {
  font-family: "W3S-TitleV2", "Geom", system-ui, sans-serif;
  font-size: var(--fs-h2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--w3s-green);
}

/* Global section title: H2 with W3S-TitleV2 and hero-like green gradient */
.w3s-title-main {
  font-family: "W3S-TitleV2", system-ui, sans-serif;
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  text-align: center;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 30%,
    #d6f7eb 36%,
    #39d091 50%,
    #d6f7eb 64%,
    #ffffff 70%,
    #ffffff 100%
  );
  background-size: 300% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: w3s-hero-title-gradient 6s linear infinite;
}

/* Teaser modal (copied from v1) */
.teaser-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.teaser-modal.active {
  display: flex;
}

.teaser-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* Use % not vw for width so layout viewport (excl. scrollbar) is respected across browsers */
.teaser-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(60%, 1200px);
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.teaser-modal__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.teaser-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  display: block;
}

.teaser-modal__close {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #111;
  color: #39d091;
  border: 1px solid #39d091;
  border-radius: 9999px;
  width: 32px;
  height: 32px;
  line-height: 28px;
  text-align: center;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
  filter: drop-shadow(0 0 6px rgba(57, 208, 145, 0.6));
}

@media (max-width: 768px) {
  .teaser-modal__dialog {
    width: 96%;
    max-width: 100%;
    max-height: 92vh;
  }

  .teaser-modal__player {
    aspect-ratio: 9 / 16;
  }
}

/* Contact modal (Reach out) */
.w3s-contact-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.w3s-contact-modal.active {
  display: flex;
}

.w3s-contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.w3s-contact-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(90%, 420px);
  max-width: 100%;
  background: #0d0d0d;
  border: 1px solid rgba(57, 208, 145, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 0 24px rgba(57, 208, 145, 0.15);
}

.w3s-contact-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  color: #39d091;
  border: 1px solid rgba(57, 208, 145, 0.5);
  border-radius: 9999px;
  width: 32px;
  height: 32px;
  line-height: 28px;
  text-align: center;
  font-size: 20px;
  cursor: pointer;
}

.w3s-contact-modal__title {
  margin: 0 0 1rem;
  font-family: var(--w3s-font-heading);
  font-size: var(--fs-h3);
  color: #fff;
}

.w3s-contact-modal__form label {
  display: block;
  font-size: var(--fs-small);
  color: rgba(57, 208, 145, 0.9);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.w3s-contact-modal__input,
.w3s-contact-modal__textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: #111;
  border: 1px solid rgba(57, 208, 145, 0.3);
  border-radius: 6px;
  color: #e5e5e5;
  font-size: var(--fs-body);
  font-family: inherit;
}

.w3s-contact-modal__textarea {
  min-height: 100px;
  resize: vertical;
}

.w3s-contact-modal__input:focus,
.w3s-contact-modal__textarea:focus {
  outline: none;
  border-color: #39d091;
  box-shadow: 0 0 0 2px rgba(57, 208, 145, 0.2);
}

.w3s-contact-modal__submit {
  width: 100%;
  padding: 0.6rem 1rem;
  background: #39d091;
  color: #0d0d0d;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: var(--fs-body);
  cursor: pointer;
}

.w3s-contact-modal__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.w3s-contact-modal__error {
  font-size: var(--fs-small);
  color: #ff6767;
  margin-top: 0.5rem;
}

.w3s-contact-modal__success {
  display: none;
  text-align: center;
}

.w3s-contact-modal__success.w3s-contact-modal__success--visible {
  display: block;
}

.w3s-contact-modal__success-title {
  margin: 0 0 1rem;
  font-size: var(--fs-body);
  color: #39d091;
}

.ui-dev-subtitle {
  font-family: "PixelCaps", system-ui, sans-serif;
  font-size: var(--fs-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--w3s-text-soft);
}

.ui-dev-panel {
  border-radius: var(--w3s-radius-lg);
  border: 1px solid rgba(57, 208, 145, 0.4);
  background: radial-gradient(
      circle at top left,
      rgba(57, 208, 145, 0.08),
      transparent 60%
    ),
    rgba(5, 5, 7, 0.96);
  box-shadow:
    var(--w3s-shadow-soft),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  padding: 20px 20px 24px;
}

.ui-dev-label {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.85);
  margin-bottom: 10px;
}

#hero,
#footer {
  width: 100%;
}

/* Ultra-wide: prevent content strip on 1600px+ screens */
@media (min-width: 1600px) {
  .w3s-section__inner {
    max-width: 1500px;
  }
}

/* Hybrid / foldable gap: 600px–900px */
@media (max-width: 900px) {
  .w3s-section__inner {
    padding-inline: 24px;
  }

  /* Guardrail: no horizontal scroll (vw/100vw can exceed visible viewport when scrollbar present) */
  html,
  body {
    overflow-x: clip;
  }

  /* Hero: clip any horizontal bleed (blur band, etc.) so no scroll */
  .w3s-hero {
    overflow-x: clip;
  }

  .w3s-hero__panel {
    overflow-x: clip;
  }

  /* Prevent blocks-container from growing with content (row’s min-width sum) and causing overflow */
  .w3s-section--market .w3s-blocks-container,
  .w3s-section--ecosystem .w3s-blocks-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Tablet: Section 2 (Problem) – row + wrap 2+1 or 3 (w3s-blocks stays column until 768px, so force row here) */
  .w3s-section--market .w3s-blocks__row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    min-width: 0;
  }

  .w3s-section--market .w3s-blocks__card-unit {
    flex: 0 1 280px;
    min-width: unset;
    max-width: 360px;
  }

  /* Contain Problem section only; leave ecosystem overflow visible so zoom/blur on cards isn’t clipped */
  .w3s-section--market {
    overflow-x: clip;
  }
}

/* Mobile: ≤600px – Section 2 & 3 stack in a column (900px tablet layout stops here) */
@media (max-width: 600px) {
  .w3s-section--market .w3s-blocks__card-unit {
    width: 100%;
    max-width: 480px;
    flex: 0 1 100%;
  }
}

/* Handheld sweet spot: padding + full-width CTAs */
@media (max-width: 450px) {
  .w3s-section__inner {
    padding-inline: 16px;
  }

  /* Key CTAs go full-width on small handhelds */
  .w3s-hero__cta .w3s-button,
  .w3s-section--ecosystem .w3s-blocks__cta-link .w3s-button,
  .w3s-form__submit,
  .w3s-contact-modal__submit,
  .roadmap-back-to-top,
  .roadmap-hero-scroll-btn {
    width: 100%;
  }
}

/* Micro-mobile safety net */
@media (max-width: 360px) {
  .w3s-section__inner {
    padding-inline: 12px;
  }

  body {
    overflow-x: hidden;
  }
}


