:root {
  color-scheme: light;

  /* Palette from shared/constants/theme.ts */
  --primary: #0EA5A5;
  --primary-hover: #0d9292;
  --primary-light: rgba(14, 165, 165, 0.1);
  --gradient-start: #06B6D4;
  --gradient-end: #10B981;

  --bg-body: #F9FAFB;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-heavy: rgba(255, 255, 255, 0.9);

  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;

  --border: rgba(14, 165, 165, 0.15);

  /* Modern UI Tokens */
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;

  /* Soft, diffused shadow */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-teal: 0 20px 40px -10px rgba(14, 165, 165, 0.2);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-body);
  /* High-end mesh gradient background */
  background-image:
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 600;
}

a:hover {
  color: var(--primary-hover);
}

/* Header & Nav */
header {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 0 24px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-md);
}

nav .brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

nav .brand-logo {
  height: 40px;
  width: auto;
  border-radius: 8px;
  /* Optional: adds subtle rounding if logo is square */
}

nav .brand-text {
  font-weight: 900;
  font-size: 24px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

nav .links {
  display: flex;
  gap: 24px;
  font-size: 15px;
  font-weight: 500;
  align-items: center;
}

/* Separator line */
nav .links a:last-of-type {
  margin-right: 12px;
  position: relative;
}

/* Separator line removed as links are moved to footer */

.lang-btn {
  background: rgba(14, 165, 165, 0.1);
  border: none;
  color: var(--primary);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 165, 0.2);
}

nav .links a {
  color: var(--text-secondary);
}

nav .links a:hover {
  color: var(--primary);
}

/* Main Layout */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 120px;
}

/* Typography Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--primary-light);
  border: 1px solid rgba(14, 165, 165, 0.18);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 120px 0 60px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  font-size: 72px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 24px;
  color: var(--text-primary);
  max-width: 900px;
}

.hero p {
  font-size: 22px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

/* Store Buttons */
.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  border: 0;
  font-weight: 500;
  font-size: 16px;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 180px;
  cursor: pointer;
  text-decoration: none;
}

.btn-store:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
  color: #fff;
}

.btn-store.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-store.is-disabled:hover {
  transform: none;
  box-shadow: none;
  color: #fff;
}

.btn-store svg {
  width: 24px;
  height: 24px;
}

.btn-store.google {
  background: #000;
  /* Keeping sleek uniform dark look */
}

/* Hero Visual Composition */
.hero-visual {
  width: 100%;
  max-width: 1000px; /* Increased width for 3 phones */
  height: auto;
  min-height: 500px;
  background: transparent; /* Removed box bg */
  border: none; /* Removed border */
  box-shadow: none; /* Removed shadow */
  margin-top: 48px;
  overflow: visible; /* Allow phones to breathe */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Add a subtle ambient glow behind the whole composition */
}

.hero-visual::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 60%;
  background: radial-gradient(circle, rgba(14, 165, 165, 0.15) 0%, transparent 70%);
  z-index: 0;
  filter: blur(40px);
}

.mockup-card {
  /* Existing styles preserved, but ensure z-index is managed */
  position: relative;
  width: min(280px, 80vw); /* Slightly smaller base size */
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  background: #000;
  border: 6px solid transparent;
  background-image:
    linear-gradient(#060606, #060606),
    linear-gradient(160deg, #2c2c2c 0%, #101010 40%, #3a3a3a 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 
    0 0 0 1px #333,
    0 20px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mockup-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 6px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}

.mockup-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 35%);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.mockup-card-hero {
  /* Center card */
  width: min(300px, 85vw);
  border-width: 8px;
  z-index: 10;
  transform: translateY(0);
  box-shadow: 
    0 0 0 1px #333,
    0 30px 60px -10px rgba(0, 0, 0, 0.6),
    var(--shadow-teal);
}

.mockup-card-side {
  z-index: 5;
  top: 20px; /* Visual offset downwards */
}

.is-left {
  margin-right: -80px;
  transform: rotate(-6deg) scale(0.9);
}

.is-right {
  margin-left: -80px;
  transform: rotate(6deg) scale(0.9);
}

.mockup-card-side:hover {
  z-index: 15; /* Pop to front on hover */
  transform: rotate(0) scale(1) translateY(-10px);
  margin-right: 0;
  margin-left: 0;
  /* Note: removing margins on hover pushes layout, might be jerky. 
     Better to just scale/translate. */
}
/* Refined hover: Just lift, don't break layout */
.is-left:hover {
  transform: rotate(-8deg) scale(0.95) translateY(-10px);
}
.is-right:hover {
  transform: rotate(8deg) scale(0.95) translateY(-10px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-visual {
    min-height: auto;
    flex-direction: column;
    gap: 20px;
  }
  
  .mockup-card-side {
    display: none; /* Hide side cards on mobile for simplicity */
  }
  
  /* Optional: Or stack them partially visible? 
     Hiding is safer for "vertical screenshot" issue on narrow screens.
  */
}

/* Feature Rows - Zig Zag */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.feature-row.reverse {
  direction: rtl;
  /* simple trick to swap columns visually, logic below fixes text alignment */
}

.feature-row.reverse>* {
  direction: ltr;
  /* reset text direction */
}

.feature-text h2 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.feature-text p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.feature-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

/* Visual Mockups */
.feature-visual {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
}

.mockup-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px; /* 40px (outer) - 10px (max border) = 30px to match perfectly */
  z-index: 2;
  background: #fff;
}


/* Footer */
footer {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Utilities for Legal Pages Layout (kept from previous step) */
.content-wrapper {
  background: var(--bg-card);
  padding: 64px max(24px, 10%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  max-width: 900px;
  margin: 0 auto;
}

.content-wrapper h2 {
  font-size: 28px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.content-wrapper .hero {
  padding: 40px 0;
}

.content-wrapper .hero h1 {
  font-size: 48px;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUpAnim 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

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

/* Mobile Responsive */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 56px;
  }

  .feature-row {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  header {
    top: 0;
    padding: 0;
  }

  nav {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .hero {
    padding: 72px 0 32px;
  }

  .hero h1 {
    font-size: 38px;
    line-height: 1.12;
  }

  .hero p {
    font-size: 18px;
    margin-bottom: 32px;
  }

  .tag {
    margin-bottom: 14px;
  }

  .store-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    gap: 12px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-store {
    width: min(100%, 280px);
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding: 12px 16px;
    font-size: 15px;
  }

  .btn-store svg {
    width: 20px;
    height: 20px;
  }

  .btn-store span {
    text-align: center;
  }

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    text-align: center;
    gap: 40px;
  }

  .feature-text h2 {
    font-size: 32px;
  }

  .feature-text p {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .feature-visual {
    min-height: 380px;
  }

  .mockup-card {
    width: min(320px, 92%);
    border-width: 6px;
  }

  .mockup-card-hero {
    width: min(340px, 94vw);
    border-width: 8px;
  }

  .mockup-image {
    width: 100%;
    max-width: 240px;
  }
}

@media (max-width: 600px) {
  body {
    background-attachment: scroll;
  }

  nav {
    padding: 10px 16px;
  }

  nav .brand-text {
    font-size: 20px;
  }

  nav .brand-logo {
    height: 34px;
  }

  .lang-btn {
    font-size: 12px;
    padding: 7px 12px;
  }

  main {
    padding: 0 18px 72px;
    gap: 80px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 17px;
  }

  .store-buttons {
    max-width: 100%;
    gap: 12px;
  }

  .feature-row,
  .feature-row.reverse {
    gap: 32px;
  }

  .feature-text h2 {
    font-size: 28px;
  }

  .feature-visual {
    min-height: 320px;
  }

  .mockup-card {
    width: min(300px, 88vw);
    border-radius: 26px;
    border-width: 4px;
    padding: 8px;
  }

  .mockup-card::before {
    inset: 4px;
  }

  .mockup-card-hero {
    width: min(320px, 90vw);
    border-radius: 28px;
    border-width: 5px;
    padding: 10px;
  }

  .mockup-image {
    max-width: 100%;
    border-radius: 14px;
  }

  .mockup-card-hero .mockup-image {
    border-radius: 13px;
  }

  footer {
    padding: 60px 20px;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  nav {
    flex-wrap: nowrap;
    gap: 12px;
  }

  nav .links {
    margin-left: auto;
    justify-content: flex-end;
  }

  .hero {
    padding: 64px 0 28px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-visual {
    margin-top: 32px;
  }

  .feature-text h2 {
    font-size: 26px;
  }

  .feature-text p {
    font-size: 15px;
  }

  .mockup-card {
    width: min(280px, 86vw);
    border-radius: 24px;
    padding: 6px;
  }

  .mockup-card::before {
    inset: 3px;
  }

  .mockup-card-hero {
    width: min(300px, 88vw);
    border-radius: 26px;
    padding: 8px;
  }

  .mockup-image {
    border-radius: 14px;
  }

  .mockup-card-hero .mockup-image {
    border-radius: 13px;
  }
}
