/* ============================================
   SVIFT STUDIOS - Design System
   Based on Convert App's iOS 26 Liquid Glass
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-primary);
  background: var(--bg-primary);
}

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

button, input, select, textarea {
  font: inherit;
}

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

/* ---------- Design Tokens (CSS Variables) ---------- */
:root {
  /* Vibrant Pastels */
  --mint: rgb(191, 242, 224);
  --blush: rgb(255, 209, 209);
  --lavender: rgb(224, 209, 255);
  --peach: rgb(255, 209, 184);
  --cream: rgb(255, 242, 217);
  --sky-blue: rgb(199, 230, 255);
  --coral: rgb(255, 199, 191);
  --seafoam: rgb(184, 242, 224);

  /* Soft Pastels (for backgrounds) */
  --soft-orange: rgb(255, 224, 191);
  --soft-blue: rgb(204, 230, 255);
  --soft-green: rgb(204, 242, 217);
  --soft-red: rgb(255, 217, 217);
  --soft-purple: rgb(230, 217, 255);
  --soft-pink: rgb(255, 217, 235);
  --soft-teal: rgb(199, 242, 242);
  --soft-yellow: rgb(255, 242, 199);
  --soft-gold: rgb(255, 235, 179);

  /* Category Colors (vibrant) */
  --currency: rgb(217, 166, 31);
  --mass: rgb(255, 148, 56);
  --volume: rgb(51, 140, 255);
  --length: rgb(51, 199, 115);
  --temperature: rgb(255, 97, 97);
  --duration: rgb(153, 107, 242);
  --cooking: rgb(255, 115, 158);
  --area: rgb(64, 191, 199);
  --speed: rgb(255, 199, 46);
  --pressure: rgb(107, 107, 242);
  --energy: rgb(77, 217, 173);
  --power: rgb(255, 184, 38);
  --data-storage: rgb(64, 199, 242);
  --angle: rgb(184, 115, 250);
  --frequency: rgb(242, 115, 199);
  --fuel-economy: rgb(140, 217, 89);

  /* Accent Colors */
  --periwinkle: rgb(140, 153, 217);
  --vibrant-blue: rgb(115, 140, 242);
  --secondary-glow: rgb(153, 128, 242);
  --amber: rgb(242, 179, 102);
  --success: rgb(102, 204, 128);

  /* Spacing (8pt grid) */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;

  /* Corner Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-subtle: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-prominent: 0 8px 16px rgba(0, 0, 0, 0.18);
  --shadow-glow: 0 0 20px rgba(115, 140, 242, 0.35);

  /* Animations */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;

  /* Light Mode Colors */
  --bg-primary: #F2F7FA;
  --bg-secondary: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.8);
  --text-primary: #1a1a1a;
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-tertiary: rgba(0, 0, 0, 0.4);
  --border-color: rgba(0, 0, 0, 0.08);

  /* Orb opacity */
  --orb-opacity: 0.4;
}

/* ---------- Dark Mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: rgba(30, 30, 30, 0.8);
    --text-primary: #f5f5f5;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --orb-opacity: 0.3;
  }
}

/* ---------- Typography ---------- */
.text-hero {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.text-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.text-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
}

.text-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.text-caption {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

.text-small {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ---------- Animated Orb Background ---------- */
.orb-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  background: var(--bg-primary);
}

.orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: var(--orb-opacity);
  will-change: transform;
}

.orb-1 {
  background: radial-gradient(circle, var(--lavender) 0%, transparent 70%);
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  animation: float-1 25s ease-in-out infinite;
}

.orb-2 {
  background: radial-gradient(circle, var(--mint) 0%, transparent 70%);
  top: 30%;
  left: 15%;
  animation: float-2 28s ease-in-out infinite;
}

.orb-3 {
  background: radial-gradient(circle, var(--peach) 0%, transparent 70%);
  top: 50%;
  right: 10%;
  animation: float-3 22s ease-in-out infinite;
}

.orb-4 {
  background: radial-gradient(circle, var(--sky-blue) 0%, transparent 70%);
  bottom: 20%;
  left: 40%;
  animation: float-4 30s ease-in-out infinite;
}

.orb-5 {
  background: radial-gradient(circle, var(--coral) 0%, transparent 70%);
  bottom: 10%;
  left: 20%;
  animation: float-5 26s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translateX(-50%) translate(0, 0); }
  25% { transform: translateX(-50%) translate(30px, 20px); }
  50% { transform: translateX(-50%) translate(-20px, 40px); }
  75% { transform: translateX(-50%) translate(25px, -15px); }
}

@keyframes float-2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(40px, -30px); }
  66% { transform: translate(-25px, 25px); }
}

@keyframes float-3 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-35px, 20px); }
  50% { transform: translate(15px, -25px); }
  75% { transform: translate(-20px, -10px); }
}

@keyframes float-4 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -35px); }
}

@keyframes float-5 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-20px, -25px); }
  66% { transform: translate(35px, 15px); }
}

/* ---------- Layout ---------- */
.page-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

@media (min-width: 768px) {
  .content-wrapper {
    padding: var(--space-xxl) var(--space-xl);
  }
}

/* ---------- Glass Card ---------- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-normal) var(--ease-spring),
              box-shadow var(--duration-normal) var(--ease-smooth);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-prominent);
}

.glass-card--interactive {
  cursor: pointer;
}

.glass-card--interactive:active {
  transform: scale(0.98);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-spring);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn--primary:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-prominent);
}

.btn--primary:active {
  transform: scale(0.98);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn--secondary:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: transparent;
}

.btn--app-store {
  background: #000;
  color: #fff;
  padding: var(--space-sm) var(--space-xl);
  font-size: 1.125rem;
}

@media (prefers-color-scheme: dark) {
  .btn--app-store {
    background: #fff;
    color: #000;
  }
}

.btn--app-store:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ---------- App Icon ---------- */
.app-icon {
  width: 120px;
  height: 120px;
  border-radius: 26.67%;
  box-shadow: var(--shadow-prominent);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.app-icon--large {
  width: 180px;
  height: 180px;
}

.app-icon:hover {
  transform: scale(1.05) rotate(-2deg);
}

/* ---------- Feature Cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
  color: rgba(0, 0, 0, 0.7);
}

.feature-card__icon svg {
  stroke: rgba(0, 0, 0, 0.6);
}

.feature-card__icon span {
  color: rgba(0, 0, 0, 0.7);
  font-weight: 700;
}

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-card__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Category Pills ---------- */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
}

.category-pill {
  padding: var(--space-xxs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xxl) var(--space-md);
  gap: var(--space-lg);
}

.hero__content {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.hero__title {
  color: var(--text-primary);
}

.hero__subtitle {
  color: var(--text-secondary);
  max-width: 480px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (min-width: 480px) {
  .hero__actions {
    flex-direction: row;
  }
}

/* ---------- App Card (for homepage) ---------- */
.app-card {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  max-width: 360px;
}

.app-card__name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.app-card__tagline {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer__link {
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--text-primary);
}

/* ---------- Entrance Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn var(--duration-slow) var(--ease-spring) forwards;
}

.fade-in--delay-1 { animation-delay: 0.1s; }
.fade-in--delay-2 { animation-delay: 0.2s; }
.fade-in--delay-3 { animation-delay: 0.3s; }
.fade-in--delay-4 { animation-delay: 0.4s; }
.fade-in--delay-5 { animation-delay: 0.5s; }

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

/* ---------- Logo / Wordmark ---------- */
.logo {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.logo--large {
  font-size: 2rem;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo,
.nav__link {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all var(--duration-fast);
}

.nav__links {
  display: flex;
  gap: var(--space-xs);
}

.nav__link {
  color: var(--text-secondary);
}

.nav__link:hover {
  color: var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* ---------- Section Spacing ---------- */
.section {
  padding: var(--space-3xl) 0;
}

.section__title {
  text-align: center;
  margin-bottom: var(--space-xxl);
  color: var(--text-primary);
}

/* ---------- Privacy Page Styles ---------- */
.privacy-content {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-md);
}

.privacy-content h1 {
  margin-bottom: var(--space-xl);
}

.privacy-content h2 {
  margin-top: var(--space-xxl);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.privacy-content p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.privacy-content ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
  color: var(--text-secondary);
}

.privacy-content li {
  margin-bottom: var(--space-xs);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--vibrant-blue), var(--secondary-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
