:root {
  --orange: #ff6a00;
  --orange-deep: #e85f00;
  --ink: #1a1a1a;
  --muted: #7a7a7a;
  --bg: #ffffff;
  --panel: #fff7f0;
  --shadow: 0 12px 40px rgba(255, 106, 0, 0.12);
  --radius: 22px;
  --font: "ClashDisplay", "Avenir Next", "Segoe UI", sans-serif;
}

@font-face {
  font-family: "ClashDisplay";
  src: url("/assets/fonts/ClashDisplay-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ClashDisplay";
  src: url("/assets/fonts/ClashDisplay-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ClashDisplay";
  src: url("/assets/fonts/ClashDisplay-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  border: 0;
  border-radius: 0;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Gate (private preview) ===== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 106, 0, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(255, 106, 0, 0.12), transparent 40%),
    #111;
  color: #fff;
}
.gate[hidden] { display: none; }
.gate-card {
  width: min(420px, 100%);
  background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.gate-logo {
  width: 140px;
  height: auto;
  object-fit: contain;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  border-radius: 28px;
}
.gate p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.4;
}
.gate form {
  display: grid;
  gap: 10px;
}
.gate input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
}
.gate button {
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
}
.gate button:hover { background: var(--orange-deep); }
.gate-error {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #ff8f8f;
  font-size: 0.85rem;
}

/* ===== Site root ===== */
.site[hidden] { display: none; }
.site {
  border: 0;
  border-radius: 0;
}

/* ===== Bottom centre navbar ===== */
.navbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border-radius: 28px;
  padding: 8px 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: padding 0.25s ease;
}
.navbar:hover {
  padding: 8px 14px;
}
.navbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 8px 10px;
  border-radius: 16px;
  color: var(--orange);
  text-decoration: none;
  position: relative;
  transition: gap 0.2s ease, padding 0.2s ease;
}
.navbar-item:hover {
  background: var(--panel);
  text-decoration: none;
  gap: 4px;
  padding: 6px 12px 8px;
}
.navbar-item.active {
  background: var(--panel);
}
.navbar-item svg {
  width: 24px;
  height: 24px;
  color: var(--orange);
}
.navbar-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(44%) sepia(96%) saturate(1500%) hue-rotate(360deg) brightness(101%) contrast(106%);
}
.navbar-label {
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--orange);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.navbar-item:hover .navbar-label {
  max-height: 20px;
  opacity: 1;
}

/* ===== Home layout ===== */
.home {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 2fr 1fr;
  background: var(--bg);
  border: 0;
  border-radius: 0;
}

.home-curve {
  position: absolute;
  top: 50%;
  right: -30%;
  width: max(70vw, 110vh);
  height: max(70vw, 110vh);
  transform: translateY(-50%);
  background: var(--orange);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.home-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 48px 72px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.home-left-focus {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 760px;
  margin-top: -28px;
}

.home-left-footer {
  width: 100%;
  flex: 0 0 auto;
  margin-top: 12px;
}

.welcome-title {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 700;
  color: var(--orange);
  min-height: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  transition: opacity 0.3s ease;
  flex: 0 0 auto;
}
.welcome-title.is-hidden {
  opacity: 0;
  visibility: hidden;
}

/* Shared hero stage: video, logo, and phones occupy the same focus area */
.hero-nav-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 20px;
}

.hero-nav-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--orange);
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease, transform 0.15s ease;
}
.hero-nav-btn:hover {
  background: var(--panel);
  transform: scale(1.05);
}

.hero-stage {
  position: relative;
  width: 100%;
  height: min(500px, 54vh);
  flex: 1 1 auto;
}

.hero-logo-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-globe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(440px, 62vw);
  height: auto;
  aspect-ratio: 1080 / 964;
  object-fit: contain;
  display: block;
  transform: translate(-50%, -50%) scale(1.12);
  transform-origin: center center;
  transition: opacity 0.55s ease, transform 0.75s ease, top 0.75s ease;
}

.hero-globe-video,
.hero-globe-still {
  opacity: 0;
}

.hero-logo-layer:not(.is-morphing):not(.logo-settled) .hero-globe-video,
.hero-logo-layer.is-holding-last-frame .hero-globe-video {
  opacity: 1;
}

.hero-logo-layer.is-holding-last-frame .hero-globe-video {
  transition: none;
}

.hero-logo-layer.is-morphing .hero-globe-video,
.hero-logo-layer.logo-settled .hero-globe-video {
  opacity: 0;
  top: calc(-40px - clamp(1.2rem, 2.25vw, 1.7rem));
  transform: translate(-50%, -50%) scale(0.62);
}

.hero-logo-layer.is-morphing .hero-globe-still,
.hero-logo-layer.logo-settled .hero-globe-still {
  opacity: 1;
  top: calc(-40px - clamp(1.2rem, 2.25vw, 1.7rem));
  width: min(240px, 34vw);
  transform: translate(-50%, -50%) scale(0.62);
}

.hero-logo-layer.logo-settled .hero-globe {
  transition: none;
}

.hero-content-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: hidden;
  pointer-events: none;
  overflow: visible;
}

.hero-content-layer.is-visible {
  visibility: visible;
  pointer-events: auto;
}

.carousel-content-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: hidden;
  pointer-events: none;
}

.carousel-content-panel.is-active {
  visibility: visible;
  pointer-events: auto;
}

/* ===== Carousel slide (phones) ===== */
.carousel-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 720px;
  padding: 16px 20px;
  box-sizing: border-box;
}
.carousel-slide--single {
  flex-direction: row;
  gap: 20px;
}
.carousel-slide--single .carousel-text {
  max-width: min(220px, 32vw);
  text-align: left;
}
.carousel-phone {
  width: min(210px, 30vw);
  flex: 0 0 auto;
  border-radius: 28px;
  border: 3px solid #222;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  background: #000;
}
.carousel-phone img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 25px;
}
.carousel-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.carousel-arrow {
  width: 80px;
  height: auto;
  flex: 0 0 auto;
}
.carousel-text {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: var(--orange);
  text-align: center;
  max-width: 200px;
  line-height: 1.3;
}

.carousel-dots {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  justify-content: center;
}
.carousel-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-dots button[aria-current="true"] {
  background: var(--orange);
}

.login-cta {
  margin: 14px 0 0;
  font-size: 1.1rem;
  color: var(--ink);
}
.login-cta a {
  color: var(--orange);
  text-decoration: none;
}
.login-cta a:hover {
  text-decoration: underline;
}

/* ===== Right panel ===== */
.home-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.home-right-content {
  text-align: center;
  color: #fff;
}

.get-app-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #fff;
}

.available-on {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-weight: 600;
  padding: 12px 24px;
  text-decoration: none;
  cursor: pointer;
  min-width: 180px;
  transition: transform 0.15s;
}
.store-btn:hover {
  transform: scale(1.03);
  text-decoration: none;
}
.store-btn.is-disabled {
  opacity: 0.7;
  cursor: default;
}
.store-btn.is-disabled:hover {
  transform: none;
}
.store-btn svg { width: 22px; height: 22px; flex: 0 0 auto; }

/* ===== Footer ===== */
.site-footer {
  position: fixed;
  bottom: 16px;
  left: 24px;
  z-index: 10;
  display: flex;
  gap: 8px;
  color: var(--orange);
  font-size: 0.88rem;
  font-weight: 500;
}
.site-footer a { color: var(--orange); }
.site-footer .dot { opacity: 0.55; }


/* ===== Legal modal ===== */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.legal-modal[hidden] { display: none; }
.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.legal-modal-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  height: min(88vh, 900px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 52px 14px 20px;
  border-bottom: 1px solid #eee;
  flex: 0 0 auto;
}
.legal-modal-header h2 {
  margin: 0;
  color: var(--orange);
  font-size: 1.15rem;
}
.legal-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.legal-modal-actions .button {
  display: inline-flex;
  align-items: center;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.legal-modal-actions .button:hover {
  text-decoration: none;
  background: var(--orange-deep);
}
.legal-modal-frame {
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  width: 100%;
  background: #f7f7f7;
}
.legal-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f3f3;
  color: #333;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.legal-modal-close:hover { background: #ebebeb; }

/* ===== Contact modal ===== */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}
.contact-modal[hidden] { display: none; }
.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.contact-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
}
.contact-modal-card h2 {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 1.45rem;
}
.contact-modal-card p {
  margin: 0 0 16px;
  color: #555;
  line-height: 1.45;
  font-size: 0.98rem;
}
.contact-modal-card .contact-email {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 1.05rem;
}
.contact-modal-card .button {
  display: inline-flex;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 600;
  text-decoration: none;
}
.contact-modal-card .button:hover { text-decoration: none; background: var(--orange-deep); }
.contact-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f3f3;
  color: #333;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.contact-modal-close:hover { background: #ebebeb; }

/* ===== Pages (about, privacy, terms) ===== */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 88px 24px 64px;
}
.page h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--orange);
}
.page p {
  margin: 0 0 14px;
  color: #444;
  line-height: 1.55;
  font-size: 1.05rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .home {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
  }
  .home-curve {
    display: none;
  }
  .home-left {
    padding: 80px 24px 48px;
    min-height: 60vh;
  }
  .home-right {
    background: var(--orange);
    border-radius: 48px 48px 0 0;
    padding: 48px 24px 100px;
  }
  .navbar {
    bottom: 16px;
  }
  .site-footer {
    display: none;
  }
}
