/* CSS Variables */
:root {
  --color-background: white;
  --color-font: #fff;
  --color-paragraph: #ddd;
  --font-heading: 'Manrope', sans-serif;
  --font-paragraph: 'Inter', sans-serif;
  --hero-spacing: clamp(32px, 25px + 2.14vw, 56px);
  --download-cta-height: clamp(48px, 39px + 2.86vw, 80px);
  --qr-cta-size: clamp(110px, 94px + 3vw, 138px);
  --qr-label-gap: clamp(8px, 6px + 0.25vw, 10px);
  --qr-label-height: clamp(12px, 11px + 0.18vw, 14px);
  --qr-flow-offset: calc(
    (
        var(--qr-cta-size) + var(--qr-label-gap) + var(--qr-label-height) -
          var(--download-cta-height)
      ) /
      2
  );
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--page-bg, #0d1117);
  font-family: var(--font-heading);
  color: var(--color-font);
  font-size: 16px;
  line-height: 1.2;
}

img {
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
}

a {
  font-family: var(--font-paragraph);
  color: var(--color-font);
  text-decoration: none;
}

h1 {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 112px;
  font-weight: 800;
  line-height: 1.2;
}

p {
  font-family: var(--font-paragraph);
  color: var(--color-paragraph);
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

/* Container */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 2em;
}

/* Hero Section */
.hero-section {
  margin-top: -72px;
  position: relative;
}

/* Notification Bubbles */
.notification-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.notif-bubble {
  position: absolute;
  width: clamp(180px, 14vw + 112px, 260px);
  border-radius: clamp(12px, 1vw + 8px, 16px);
  padding: clamp(8px, 0.5vw + 6.4px, 12px) clamp(12px, 0.5vw + 10.4px, 16px);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 3px 6px rgba(255, 255, 255, 0.35);
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  will-change: transform, opacity;
}

.notif-bubble-inner {
  display: flex;
  gap: clamp(8px, 0.5vw + 6.4px, 12px);
  align-items: flex-start;
}

.notif-bubble-icon {
  width: clamp(28px, 1.5vw + 20px, 40px);
  height: clamp(28px, 1.5vw + 20px, 40px);
  border-radius: clamp(8px, 0.5vw + 6.4px, 12px);
  flex-shrink: 0;
  object-fit: cover;
}

.notif-bubble-content {
  flex: 1;
  min-width: 0;
}

.notif-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.notif-bubble-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(12px, 0.18vw + 11.4px, 14px);
  color: #fff;
}

.notif-bubble-time {
  font-family: var(--font-paragraph);
  font-size: clamp(8px, 0.18vw + 7.4px, 10px);
  color: rgba(255, 255, 255, 0.7);
}

.notif-bubble-message {
  font-family: var(--font-paragraph);
  font-size: clamp(10px, 0.18vw + 9.4px, 12px);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
  margin: 0;
}

.home-hero-holder {
  padding-top: 100px;
  overflow: hidden;
}

.hero-container {
  padding-bottom: 0;
}

.hero-center-text-holder {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: var(--hero-cta-gap, var(--hero-spacing));
  text-align: center;
}

/* Hero Logo + Rotating Text Row */
.hero-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 4px + 1vw, 16px);
  width: 100%;
  overflow: hidden;
}

.hero-logo {
  width: clamp(24px, 5px + 8.33vw, 100px);
  height: clamp(24px, 5px + 8.33vw, 100px);
  border-radius: clamp(6px, 4px + 1.2vw, 20px);
  object-fit: cover;
  flex-shrink: 0;
}

.rotating-text-container {
  overflow: hidden;
  position: relative;
  font-size: clamp(12px, 3px + 5vw, 60px);
  transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  margin-top: -4px;
  padding-bottom: 0.1em;
  /* width & height set by JS */
}

.rotating-text-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.rotating-text-phrase {
  display: block;
  font-family: var(--font-heading);
  font-size: inherit;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
  position: absolute;
  left: 0;
  top: 0;
}

/* First phrase is relative until JS takes over */
.rotating-text-phrase:only-child {
  position: relative;
}

.rotating-text-phrase.slide-out-up {
  animation: slideOutUp 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.rotating-text-phrase.slide-in-up {
  animation: slideInUp 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes slideOutUp {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes slideInUp {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Download CTA */

.qr-download-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--qr-label-gap);
}

.qr-download-label {
  display: block;
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(11px, 10px + 0.18vw, 13px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  min-height: var(--qr-label-height);
  text-align: center;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.88);
}

.qr-download-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--qr-cta-size);
  height: var(--qr-cta-size);
  padding: clamp(12px, 10px + 0.45vw, 14px);
  background: #ffffff;
  border: 2px solid rgba(13, 17, 23, 0.82);
  border-radius: clamp(16px, 14px + 0.5vw, 20px);
}

.app-store-qr {
  display: block;
  width: 100%;
  height: 100%;
}

.app-store-link {
  display: inline-block;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.app-store-link-mobile {
  display: none;
}

html[data-device-class='phone'] .qr-download-card {
  display: none;
}

html[data-device-class='large'] {
  --hero-cta-gap: clamp(
    14px,
    calc(var(--hero-spacing) - var(--qr-flow-offset)),
    var(--hero-spacing)
  );
  --hero-phone-gap: clamp(
    14px,
    calc(var(--hero-spacing) - var(--qr-flow-offset)),
    var(--hero-spacing)
  );
}

html[data-device-class='phone'] .app-store-link-mobile {
  display: inline-block;
}

.app-store-link:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.app-store-badge {
  height: var(--download-cta-height);
  width: auto;
}

/* Phone Display */
.hero-phone-holder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: visible;
  margin-top: var(--hero-phone-gap, var(--hero-spacing));
}

.hero-section-app-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: min(820px, 60vw + 150px);
  position: relative;
}

.hero-section-phone-holder-2 {
  position: relative;
  width: 100%;
}

.hero-section-phone-holder-2::after {
  content: '';
  position: absolute;
  bottom: -4%;
  left: 0;
  width: 110%;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--page-bg, #0d1117));
  z-index: 1;
  pointer-events: none;
  transform: translateX(12%);
}

.hero-section-phone-image {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1648 / 2240;
  z-index: 4;
  transform: translate(
    15%,
    2%
  ); /* shift image RIGHT so phone centers, DOWN to compensate for top whitespace */
}

/* Video in Phone */
.phone-video {
  position: absolute;
  top: 3.5%;
  left: 27%;
  width: 46%;
  height: 65.1%;
  object-fit: fill;
  border-radius: 28px;
  z-index: 3;
}

/* Mute/Unmute Toggle */
.video-mute-toggle {
  position: absolute;
  /* Position near bottom of video (video ends at ~68.6% from top) */
  /* Scales from 62% on small screens to 67% on desktop */
  top: clamp(62%, 53.1% + 1.16vw, 67%);
  /* Center over video: video starts at 27%, width 46%, so center = 27% + 23% = 50% */
  left: calc(27% + 23%);
  transform: translateX(-50%);
  z-index: 5;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  font-family: var(--font-heading);
  font-size: clamp(12px, 0.18vw + 11.4px, 14px);
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  /* Disable tap highlight and selection */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.video-mute-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
}

.video-mute-toggle:active {
  transform: translateX(-50%) scale(0.96);
}

.video-mute-toggle svg {
  grid-column: 1;
  grid-row: 1;
  width: clamp(16px, 0.18vw + 15.4px, 18px);
  height: clamp(16px, 0.18vw + 15.4px, 18px);
  transition: opacity 0.2s ease;
}

.video-mute-toggle .unmute-icon {
  opacity: 0;
}
.video-mute-toggle.is-unmuted .mute-icon {
  opacity: 0;
}
.video-mute-toggle.is-unmuted .unmute-icon {
  opacity: 1;
}

.mute-text {
  grid-column: 2;
  grid-row: 1;
  line-height: 1;
}

/* Footer */
.footer-section {
  position: relative;
  z-index: 2;
}

.footer-container {
  position: relative;
  z-index: 2;
  background-color: var(--page-bg, #0d1117);
  padding-top: 20px;
  padding-bottom: 32px;
}

.footer-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.social-media-holder {
  display: flex;
  gap: clamp(32px, 8vw, 100px);
  align-items: center;
}

.social-media-container {
  width: clamp(24px, 0.71vw + 21.7px, 32px);
}

.social-media-image {
  width: 150%;
}

.paragraph-4 {
  margin-top: 32px;
  font-size: 12px;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-paragraph);
  font-family: var(--font-paragraph);
  line-height: 1.5;
}

.footer-legal-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.footer-legal-link {
  font-family: var(--font-paragraph);
  font-size: 12px;
  color: #fff;
  text-decoration: underline;
}

/* Legal Pages */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 2em 60px;
}

.legal-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(36px, 4vw + 16px, 56px);
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.15;
}

.legal-updated {
  font-family: var(--font-paragraph);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 48px;
}

.legal-section {
  margin-bottom: 36px;
}

.legal-subtitle {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(20px, 0.36vw + 18.8px, 24px);
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}

.legal-text {
  font-family: var(--font-paragraph);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin: 0 0 16px;
}

.legal-bold-line {
  font-size: 18px;
  color: #fff;
}

.legal-list {
  font-family: var(--font-paragraph);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin: 0 0 16px;
  padding-left: 24px;
}

.legal-list li {
  margin-bottom: 8px;
}

/* Consent Banner */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 16px;
  animation: consent-slide-up 0.3s ease-out;
}

.consent-banner[hidden] {
  display: none;
}

@keyframes consent-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes consent-slide-down {
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.consent-slide-down {
  animation: consent-slide-down 0.2s ease-in forwards;
}

.consent-content {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consent-text {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.consent-actions {
  display: flex;
  gap: 12px;
}

.consent-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  font-family:
    Manrope,
    -apple-system,
    sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  border: none;
}

.consent-btn:hover {
  transform: translateY(-1px);
}

.consent-btn:active {
  transform: translateY(0);
}

.consent-btn-reject {
  background: #f3f4f6;
  color: #374151;
}

.consent-btn-reject:hover {
  background: #e5e7eb;
}

.consent-btn-accept {
  background: var(--page-bg, #0d1117);
  color: #fff;
}

.consent-btn-accept:hover {
  filter: brightness(0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive - Large screens */
@media screen and (min-width: 1440px) {
  .container {
    max-width: 1340px;
  }

  .rotating-text-container {
    margin-top: -8px;
  }
}

/* Responsive - Medium screens (991px) */
@media screen and (max-width: 991px) {
  h1 {
    font-size: 72px;
  }

  .footer-wrapper {
    gap: 60px;
    flex-direction: column;
  }

  .hero-phone-holder {
    padding-bottom: 32px;
  }
}

/* Responsive - Small screens (767px) */
@media screen and (max-width: 767px) {
  h1 {
    font-size: 60px;
  }

  .qr-download-card {
    display: none;
  }

  .app-store-link-mobile {
    display: inline-block;
  }

  .notif-bubble-left {
    margin-left: -10%;
  }

  .notif-bubble-right {
    margin-left: 2%;
  }

  .notif-bubble-mid,
  .notification-overlay > :last-child {
    display: none;
  }
}

/* Responsive - Mobile (479px) */
@media screen and (max-width: 479px) {
  .container {
    padding-top: 0;
    padding-left: 0.6em;
    padding-right: 0.6em;
  }

  .hero-section {
    margin-top: 0;
  }

  .footer-container {
    padding-top: 40px;
    padding-bottom: 0;
  }

  .hero-center-text-holder {
    margin-top: 20px;
  }

  .hero-phone-holder {
    padding-bottom: 0;
  }

  .hero-section-phone-image {
    transform: translate(12%, 2%);
  }

  .hero-section-phone-holder-2::after {
    transform: translateX(12%);
  }

  .home-hero-holder {
    padding-top: 20px;
  }

  .phone-video {
    left: 24.5%;
    border-radius: 20px;
  }

  .video-mute-toggle {
    /* Center over video: video starts at 24.5%, width 46%, so center = 24.5% + 23% = 47.5% */
    left: calc(24.5% + 23%);
    padding: 6px 10px 6px 6px;
    gap: 4px;
    font-size: 11px;
  }

  .video-mute-toggle svg {
    width: 14px;
    height: 14px;
  }

  .consent-banner {
    padding: 12px;
  }

  .consent-content {
    padding: 16px 20px;
  }

  .consent-btn {
    padding: 14px 16px;
  }
}

@media screen and (min-width: 768px) {
  html:not([data-device-class]) {
    --hero-cta-gap: clamp(
      14px,
      calc(var(--hero-spacing) - var(--qr-flow-offset)),
      var(--hero-spacing)
    );
    --hero-phone-gap: clamp(
      14px,
      calc(var(--hero-spacing) - var(--qr-flow-offset)),
      var(--hero-spacing)
    );
  }
}
