/* Main Styles */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

/* Design tokens */
:root {
  --color-bg: #ffffff;
  --color-surface: #f7f8fa;
  --color-elevated: #ffffff;
  --color-text: #171a1f; /* charcoal */
  --color-muted: #5a616b;
  --color-border: #e6e8eb;
  --color-accent: #f6c1d1; /* pastel pink */
  --color-accent-strong: #f2a7bd;
  --color-charcoal: #3d424c;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.08);
  --shadow-md: 0 12px 28px rgba(0,0,0,.12);
}

/* Dark theme for download page */
.theme-dark {
  --color-bg: #3d424c;
  --color-surface: rgba(255,255,255,.06);
  --color-elevated: rgba(255,255,255,.08);
  --color-text: #ffffff;
  --color-muted: rgba(255,255,255,.85);
  --color-border: rgba(255,255,255,.14);
  --color-accent: #ffc9d9;
  --color-accent-strong: #ff9fbc;
}

body {
  margin: 0;
  font-family: "Gotham Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
}

/* Utility to center the whole viewport (used by download page) */
.centered {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.container {
  width: 100%;
  max-width: 1100px;
  padding: 40px 24px;
}

.container.center {
  text-align: center;
}

.logo-container {
  margin-bottom: 20px;
}

.logo-img {
  max-width: 120px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 16px;
  border-radius: 12px;
}

.logo-title {
  font-family: "Gotham Bold", sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: .2px;
  text-shadow: 0 6px 24px rgba(0,0,0,.15);
  margin: 0;
}

.subtitle {
  margin: 10px auto 28px;
  max-width: 720px;
  opacity: .95;
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.5;
}

.badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0 auto 28px;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 8px;
  background: rgba(0,0,0,.04);
  backdrop-filter: blur(8px);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.theme-dark .badge-link { background: rgba(255,255,255,.08); }
.theme-dark .badge-link:hover { background: rgba(255,255,255,.16); }

.badge-link:hover {
  transform: translateY(-2px);
  background: rgba(0,0,0,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

.badge-img {
  height: 48px;
  display: block;
} /* ≥40px onscreen per Apple guidelines */

.features {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 28px;
}

.feature {
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow-xs);
}
.theme-dark .feature {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}

.feature h3 {
  margin: 0 0 6px;
  font-family: "Gotham Bold", sans-serif;
  font-weight: 700;
  font-size: 16px;
}

.feature p {
  margin: 0;
  opacity: .9;
  font-size: 14px;
  line-height: 1.45;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.84);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--color-border);
}
.theme-dark .nav { background: rgba(30,32,36,.7); border-bottom-color: rgba(255,255,255,.12); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 16px) 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: clamp(16px, 2.5vw, 18px);
  color: var(--color-text);
  text-decoration: none;
}
.brand:hover {
  color: var(--color-text);
  text-decoration: none;
}
.brand img { 
  height: clamp(24px, 4vw, 32px); 
  border-radius: 8px; 
}
.nav-links { 
  display: none; 
  gap: clamp(12px, 2vw, 20px); 
}
@media (min-width: 880px) { 
  .nav-links { display: flex; } 
}
.nav-links a { 
  color: var(--color-text); 
  text-decoration: none; 
  opacity: .8; 
  font-size: clamp(14px, 2vw, 16px);
  transition: opacity .2s ease;
}
.nav-links a:hover { opacity: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: clamp(10px, 2vw, 14px) clamp(16px, 3vw, 20px);
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  font-size: clamp(14px, 2vw, 16px);
  white-space: nowrap;
}
.btn-primary { 
  background: var(--color-text); 
  color: #fff; 
  box-shadow: var(--shadow-sm); 
}
.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: var(--shadow-md); 
}
.btn-secondary { 
  background: var(--color-accent); 
  color: #171a1f; 
  box-shadow: var(--shadow-sm); 
}
.btn-secondary:hover { 
  transform: translateY(-2px); 
  box-shadow: var(--shadow-md); 
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 3vw, 24px) 24px clamp(40px, 8vw, 60px);
  text-align: center;
}
.hero .container { 
  max-width: 1200px; 
  margin: 0 auto;
}
.hero-logo {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(24px, 4vw, 40px);
}
.hero-logo-img {
  width: clamp(80px, 12vw, 120px);
  height: auto;
  border-radius: clamp(16px, 2.5vw, 24px);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  transition: transform .3s ease, box-shadow .3s ease;
}
.hero-logo-img:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.hero-grid { 
  display: grid; 
  gap: clamp(32px, 6vw, 48px); 
  grid-template-columns: 1fr; 
  align-items: center; 
}
@media (min-width: 960px) { 
  .hero-grid { 
    grid-template-columns: 1.1fr .9fr; 
    gap: clamp(40px, 8vw, 60px); 
    text-align: left;
  } 
}
.eyebrow { 
  color: var(--color-accent-strong); 
  font-weight: 700; 
  letter-spacing: .3px; 
  text-transform: uppercase; 
  font-size: clamp(11px, 2vw, 13px); 
  margin-bottom: 8px;
}
.hero h1 { 
  font-family: "Gotham Bold", sans-serif; 
  font-size: clamp(32px, 6vw, 64px); 
  margin: 8px 0 16px; 
  line-height: 1.06; 
}
.hero .subhead { 
  color: var(--color-muted); 
  font-size: clamp(16px, 2.8vw, 20px); 
  max-width: 640px; 
  margin: 0 auto 24px;
  line-height: 1.5;
}
@media (min-width: 960px) {
  .hero .subhead {
    margin: 0 0 24px;
  }
}
.hero-ctas { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
  margin-top: 18px; 
  justify-content: center;
}
@media (min-width: 960px) {
  .hero-ctas {
    justify-content: flex-start;
  }
}
.phone-frame { 
  position: relative; 
  aspect-ratio: 9/19.5; 
  border-radius: clamp(24px, 4vw, 36px); 
  border: clamp(6px, 1.5vw, 10px) solid #111; 
  background: #000; 
  box-shadow: 0 20px 60px rgba(0,0,0,.25); 
  overflow: hidden; 
  max-width: 300px;
  margin: 0 auto;
}
.phone-screen { 
  position: absolute; 
  inset: 0; 
  background-size: cover; 
  background-position: center; 
}
.hero-bg { position: absolute; inset: -10%; z-index: -1; background:
  radial-gradient(600px 300px at 20% 10%, rgba(246,193,209,.35), transparent 60%),
  radial-gradient(600px 300px at 80% 30%, rgba(246,193,209,.25), transparent 60%),
  linear-gradient(180deg, var(--color-surface), transparent 40%);
}

/* Sections */
.section { 
  padding: clamp(48px, 8vw, 80px) 24px; 
  text-align: center;
}
.section .container { 
  max-width: 1100px; 
  margin: 0 auto;
}
.section h2 { 
  font-family: "Gotham Bold", sans-serif; 
  font-size: clamp(24px, 4vw, 40px); 
  margin: 0 auto 16px; 
  max-width: 800px;
}
.section p.lead { 
  color: var(--color-muted); 
  font-size: clamp(16px, 2.5vw, 20px); 
  margin: 0 auto 32px; 
  max-width: 600px;
  line-height: 1.5;
}

/* Feature cards */
.features-grid { 
  display: grid; 
  gap: clamp(16px, 3vw, 24px); 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  margin: 0 auto;
  max-width: 1000px;
}
.feature-card { 
  background: var(--color-elevated); 
  border: 1px solid var(--color-border); 
  border-radius: var(--radius-md); 
  padding: clamp(20px, 4vw, 28px); 
  box-shadow: var(--shadow-xs);
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-card h3 { 
  margin: 8px 0 12px; 
  font-size: clamp(16px, 2.5vw, 20px); 
  font-weight: 700;
}
.feature-card p { 
  margin: 0; 
  color: var(--color-muted); 
  line-height: 1.5;
  font-size: clamp(14px, 2vw, 16px);
}
.theme-dark .feature-card { 
  background: rgba(255,255,255,.08); 
  border-color: rgba(255,255,255,.12); 
  backdrop-filter: blur(8px); 
}

/* How it works */
.steps { 
  display: grid; 
  gap: clamp(16px, 3vw, 24px); 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  counter-reset: step;
  margin: 0 auto;
  max-width: 1000px;
}
.step { 
  background: var(--color-elevated); 
  border: 1px solid var(--color-border); 
  border-radius: var(--radius-md); 
  padding: clamp(20px, 4vw, 28px); 
  position: relative;
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.step::before { 
  counter-increment: step; 
  content: counter(step); 
  position: absolute; 
  top: 16px; 
  right: 16px; 
  background: var(--color-accent); 
  color: #171a1f; 
  width: 32px; 
  height: 32px; 
  border-radius: 999px; 
  display: grid; 
  place-items: center; 
  font-weight: 700; 
  font-size: 14px;
}
.step h3 {
  margin: 0 0 12px;
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 700;
  padding-right: 48px;
}
.step p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.5;
  font-size: clamp(14px, 2vw, 16px);
}
.theme-dark .step { 
  background: rgba(255,255,255,.08); 
  border-color: rgba(255,255,255,.12); 
}

/* Testimonials */
.testimonials { 
  display: grid; 
  gap: clamp(16px, 3vw, 24px); 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  margin: 0 auto;
  max-width: 1000px;
}
.testimonial { 
  background: var(--color-elevated); 
  border: 1px solid var(--color-border); 
  border-radius: var(--radius-md); 
  padding: clamp(20px, 4vw, 28px); 
  box-shadow: var(--shadow-xs);
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease;
}
.testimonial:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.testimonial p {
  margin: 0 0 16px;
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 1.5;
  font-style: italic;
}
.testimonial .meta { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-top: 12px; 
}
.testimonial img { 
  width: 40px; 
  height: 40px; 
  border-radius: 999px; 
  object-fit: cover; 
}
.testimonial .meta span {
  font-weight: 600;
  color: var(--color-text);
}
.theme-dark .testimonial { 
  background: rgba(255,255,255,.08); 
  border-color: rgba(255,255,255,.12); 
}

/* Footer */
.footer { border-top: 1px solid var(--color-border); padding: 32px 24px; color: var(--color-muted); }
.footer .inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Fallback Error Page Styles */
.fallback-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  font-family: "Gotham Book", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  color: #fff;
}

.wrap {
  text-align: center;
  max-width: 640px;
  padding: 24px;
}

.logo-container-fallback { 
  margin-bottom: 16px; 
}

.logo-img-fallback { 
  max-width: 80px; 
  width: 100%; 
  height: auto; 
  display: block; 
  margin: 0 auto 12px; 
  border-radius: 8px; 
}

.logo-title-fallback { 
  font-family: "Gotham Bold", sans-serif; 
  font-weight: 800; 
  font-size: clamp(24px, 4vw, 32px); 
  margin: 0; 
  letter-spacing: .2px; 
}

.fallback-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.fallback-badges a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 8px;
  background: rgba(255,255,255,.08);
}

.fallback-badges img {
  height: 48px;
  display: block;
}

/* Contact Page Styles */
.contact-grid {
  display: grid;
  gap: clamp(32px, 6vw, 48px);
  grid-template-columns: 1fr;
  margin-top: 32px;
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-card {
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(20px, 4vw, 28px);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.contact-card h2 {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700;
  color: var(--color-text);
}

.contact-card p {
  margin: 0 0 12px;
  color: var(--color-muted);
  line-height: 1.5;
  font-size: clamp(14px, 2vw, 16px);
}

.contact-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--color-muted);
}

.contact-card li {
  margin-bottom: 8px;
  line-height: 1.5;
  font-size: clamp(14px, 2vw, 16px);
}

.email-link {
  display: inline-block;
  color: var(--color-accent-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(16px, 2.2vw, 18px);
  margin: 8px 0 12px;
  padding: 8px 12px;
  background: rgba(246, 193, 209, 0.1);
  border-radius: 8px;
  transition: background .2s ease, transform .2s ease;
}

.email-link:hover {
  background: rgba(246, 193, 209, 0.2);
  transform: translateY(-1px);
  text-decoration: none;
}

.response-time {
  font-size: clamp(12px, 1.8vw, 14px) !important;
  opacity: 0.8;
  font-style: italic;
}

.contact-form-container {
  display: flex;
  flex-direction: column;
}

.contact-form-card {
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(24px, 4vw, 32px);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease;
}

.contact-form-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.contact-form-card h2 {
  margin: 0 0 24px;
  font-size: clamp(20px, 2.8vw, 24px);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: var(--color-text);
  font-size: clamp(14px, 2vw, 16px);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: clamp(14px, 2vw, 16px);
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent-strong);
  box-shadow: 0 0 0 3px rgba(246, 193, 209, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.form-submit {
  margin-top: 8px;
  align-self: center;
  min-width: 160px;
}

/* Dark theme adjustments for contact page */
.theme-dark .contact-card,
.theme-dark .contact-form-card {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
}

.theme-dark .email-link {
  color: var(--color-accent);
  background: rgba(255, 201, 217, 0.1);
}

.theme-dark .email-link:hover {
  background: rgba(255, 201, 217, 0.2);
}

.theme-dark .form-group input,
.theme-dark .form-group textarea {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: var(--color-text);
}

.theme-dark .form-group input:focus,
.theme-dark .form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 201, 217, 0.1);
}

/* Form Messages */
.message {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  font-weight: 500;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-left: 4px solid;
}

.message-success {
  background: rgba(34, 197, 94, 0.1);
  border-left-color: #22c55e;
  color: #15803d;
}

.message-error {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
  color: #dc2626;
}

.theme-dark .message-success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.theme-dark .message-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
