/* ==========================================================================
   Ma Styla — Landing Page Stylesheet
   Design system adapted from the Flutter app
   ========================================================================== */

/* --------------------------------------------------------------------------
   @font-face
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Design Tokens (CSS custom properties)
   -------------------------------------------------------------------------- */

:root {
  /* Colors */
  --color-bg:             #0D0B10;
  --color-surface:        #1A161F;
  --color-text-primary:   #EDE8F2;
  --color-text-secondary: #B8B0C4;
  --color-accent:         #A855F7;
  --color-lime:           #A6EB38;

  /* Typography */
  --font-heading: 'Geist', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing */
  --space-xs:  4px;
  --space-s:   8px;
  --space-m:   16px;
  --space-l:   24px;
  --space-xl:  32px;
  --space-xxl: 48px;

  /* Border radius */
  --radius-sm:   12px;
  --radius-card: 36px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */

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

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #FFF0E6;
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(255, 180, 150, 0.25), transparent),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(168, 85, 247, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(166, 235, 56, 0.06), transparent);
  color: #1a1a1a;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --------------------------------------------------------------------------
   Layout — constrained center column
   -------------------------------------------------------------------------- */

main,
footer {
  width: 100%;
  max-width: 600px;
  padding-left: var(--space-l);
  padding-right: var(--space-l);
}

/* --------------------------------------------------------------------------
   Main
   -------------------------------------------------------------------------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Phone Frame
   -------------------------------------------------------------------------- */

.phone-frame {
  position: relative;
  height: min(70vh, 700px);
  width: auto;
  aspect-ratio: 9 / 19.5;
  background: #1a1a1a;
  border-radius: 44px;
  border: 3px solid #2a2a2a;
  padding: 3px;
  margin-bottom: 64px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 0 80px 30px rgba(168, 85, 247, 0.15),
    0 0 160px 60px rgba(168, 85, 247, 0.10),
    0 0 260px 100px rgba(166, 235, 56, 0.06),
    0 0 320px 140px rgba(255, 50, 120, 0.05);
}

.phone-dynamic-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  background: #000;
  border-radius: 20px;
  z-index: 3;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 41px;
  overflow: hidden;
  background: #050505;
  container-type: inline-size;
}

.phone-screen video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.screen-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 16px 28px;
}

/* --------------------------------------------------------------------------
   Welcome Title (inside phone)
   -------------------------------------------------------------------------- */

.welcome-title {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  margin-bottom: 8px;
}

.title-its {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(20px, 14cqi, 45px);
  color: #fff;
}

.title-ma {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(30px, 20cqi, 67px);
  color: #FF9FF3;
}

.title-styla {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(34px, 22cqi, 76px);
  color: #A0F4F6;
}

.welcome-tagline {
  font-family: var(--font-body);
  font-size: clamp(10px, 4.5cqi, 13px);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
}

.welcome-btn {
  width: 100%;
  padding: clamp(10px, 4.5cqi, 14px);
  background: var(--color-lime);
  color: #050505;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(12px, 5.5cqi, 15px);
  letter-spacing: 0.5px;
  text-align: center;
  border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   Download Badges
   -------------------------------------------------------------------------- */

.download-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-m);
  margin-bottom: var(--space-s);
}

.download-badges a {
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.download-badges a:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.download-badges a:active {
  transform: scale(0.97);
}

.download-badges img {
  height: 44px;
  width: auto;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

footer {
  padding-top: var(--space-xs);
  padding-bottom: var(--space-m);
  text-align: center;
}

footer p {
  font-size: 14px;
  color: #7a7284;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 379px) {
  .phone-frame {
    height: min(60vh, 500px);
  }

  .download-badges {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 767px) {
  .phone-frame {
    margin-bottom: var(--space-l);
  }

  .download-badges {
    margin-bottom: var(--space-m);
  }
}

@media (min-width: 768px) {
  .download-badges img {
    height: 48px;
  }
}

@media (min-height: 900px) {
  .phone-frame {
    height: min(72vh, 800px);
  }
}
