/* RoutineBuddies — Website Styles
   Colors from the app: blue #04A1FB, yellow #FFD60A, white text
   Design: rounded, soft, playful — same feel as the app */

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

:root {
  --blue: #04A1FB;
  --blue-dark: #0388d4;
  --yellow: #FFD60A;
  --yellow-hover: #e6c009;
  --white: #FFFFFF;
  --text-dark: #1A1A2E;
  --text-muted: rgba(255,255,255,0.7);
  --bg-light: #F0F4F8;
  --surface: #FFFFFF;
  --radius: 20px;
  --radius-sm: 12px;
  --max-width: 1080px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Typography ---- */

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { font-size: 1.1rem; line-height: 1.7; }

/* ---- Buttons ---- */

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--yellow);
  color: var(--text-dark);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
  border: none;
  cursor: pointer;
}
.cta-button:hover {
  background: var(--yellow-hover);
  transform: scale(1.03);
}

/* ---- Layout ---- */

.section {
  padding: 80px 24px;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- IPHONE FRAME (reusable) ---- */

.iphone-frame {
  position: relative;
  width: 280px;
  background: #1a1a2e;
  border-radius: 44px;
  padding: 14px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.3),
    inset 0 0 0 2px rgba(255,255,255,0.1);
}
.iphone-frame::before {
  /* Dynamic Island */
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  background: #1a1a2e;
  border-radius: 20px;
  z-index: 3;
}
.iphone-frame::after {
  /* Side button */
  content: '';
  position: absolute;
  right: -3px;
  top: 120px;
  width: 3px;
  height: 48px;
  background: #2a2a3e;
  border-radius: 0 3px 3px 0;
}
.iphone-screen {
  width: 100%;
  height: auto;
  border-radius: 32px;
  display: block;
}

/* Small variant for feature cards */
.iphone-small {
  width: 180px;
  margin: 0 auto 16px;
  border-radius: 32px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.iphone-small::before {
  width: 56px;
  height: 18px;
  top: 12px;
  border-radius: 12px;
}
.iphone-small::after {
  display: none;
}
.iphone-small .iphone-screen {
  border-radius: 22px;
}

/* ---- HERO ---- */

.hero {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: 60px 24px 0;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero h1 {
  margin-bottom: 16px;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Phone in hero — centered */
.hero-phone {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  padding-bottom: 40px;
}
.hero-phone > .iphone-frame {
  flex-shrink: 0;
}

/* Avatars peeking around hero phone */
.hero-avatar {
  position: absolute;
  z-index: 3;
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.avatar-left-1 { width: 110px; height: 110px; left: -10px; top: 15%; }
.avatar-left-2 { width: 95px; height: 95px; left: 20px; top: 55%; }
.avatar-left-3 { width: 80px; height: 80px; left: -5px; top: 80%; }
.avatar-right-1 { width: 105px; height: 105px; right: -5px; top: 20%; }
.avatar-right-2 { width: 90px; height: 90px; right: 25px; top: 60%; }
.avatar-right-3 { width: 85px; height: 85px; right: 0; top: 85%; }

/* ---- TRUST BAR ---- */

.trust-bar {
  background: var(--white);
  padding: 24px;
  text-align: center;
}
.trust-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}
.trust-icon {
  font-size: 1.3rem;
}

/* ---- PROBLEM / SOLUTION ---- */

.problem-section {
  background: var(--white);
}
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.problem-text h2 {
  margin-bottom: 16px;
}
.problem-text p {
  color: var(--text-dark);
  opacity: 0.8;
  margin-bottom: 16px;
}
.solution-highlight {
  background: var(--blue);
  color: var(--white);
  padding: 24px 28px;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.6;
}

/* ---- FEATURES ---- */

.features-section {
  background: var(--bg-light);
}
.features-section h2 {
  text-align: center;
  margin-bottom: 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.feature-card h3 {
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 1rem;
  color: var(--text-dark);
  opacity: 0.75;
}

/* ---- 10 PRINCIPLES ---- */

.principles-section {
  background: var(--white);
}
.principles-section h2 {
  text-align: center;
  margin-bottom: 12px;
}
.principles-subtitle {
  text-align: center;
  color: var(--text-dark);
  opacity: 0.6;
  margin-bottom: 40px;
  font-size: 1.1rem;
}
.principles-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.principle-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 24px;
}
.principle-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}
.principle-text h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.principle-text p {
  font-size: 0.95rem;
  color: var(--text-dark);
  opacity: 0.75;
  margin-bottom: 6px;
  line-height: 1.5;
}
.principle-source {
  font-size: 0.8rem;
  color: var(--text-dark);
  opacity: 0.4;
  font-style: italic;
}

/* ---- HOW IT WORKS ---- */

.how-section {
  background: var(--blue);
  color: var(--white);
}
.how-section h2 {
  text-align: center;
  margin-bottom: 48px;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
.how-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.step-number {
  width: 56px;
  height: 56px;
  background: var(--yellow);
  color: var(--text-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
}
.how-step h3 {
  color: var(--white);
}
.how-step p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---- SCIENCE ---- */

.science-section {
  background: var(--white);
}
.science-section h2 {
  text-align: center;
  margin-bottom: 12px;
}
.science-subtitle {
  text-align: center;
  color: var(--text-dark);
  opacity: 0.7;
  margin-bottom: 40px;
  font-size: 1.1rem;
}
.science-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.science-card {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 24px;
}
.science-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.science-card p {
  font-size: 0.95rem;
  color: var(--text-dark);
  opacity: 0.7;
}

/* ---- FINAL CTA ---- */

.final-cta {
  background: var(--blue);
  color: var(--white);
  text-align: center;
}
.final-cta h2 {
  margin-bottom: 16px;
}
.final-cta p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 32px;
}

/* ---- FOOTER ---- */

footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.6);
  padding: 40px 24px;
  text-align: center;
}
footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}
footer a:hover {
  color: var(--white);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.85rem;
}

/* ---- LEGAL PAGES ---- */

.legal-page {
  background: var(--white);
  min-height: 100vh;
}
.legal-header {
  background: var(--blue);
  color: var(--white);
  padding: 48px 24px;
  text-align: center;
}
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.legal-content h2 {
  margin-top: 40px;
  margin-bottom: 12px;
  font-size: 1.4rem;
}
.legal-content h3 {
  margin-top: 28px;
  margin-bottom: 8px;
}
.legal-content p {
  margin-bottom: 16px;
  color: var(--text-dark);
  opacity: 0.85;
}
.legal-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
}
.legal-content li {
  margin-bottom: 8px;
  color: var(--text-dark);
  opacity: 0.85;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.8;
}
.legal-back:hover { opacity: 1; }

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
  .hero { min-height: auto; padding: 48px 20px 0; }
  .hero-avatar { display: none; }
  .iphone-frame { width: 240px; border-radius: 38px; }
  .iphone-frame::before { width: 76px; height: 24px; top: 15px; }
  .iphone-screen { border-radius: 28px; }
  .iphone-small { width: 160px; border-radius: 28px; }
  .iphone-small::before { width: 50px; height: 16px; top: 10px; }
  .iphone-small .iphone-screen { border-radius: 20px; }
  .problem-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; gap: 40px; }
  .science-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 20px; }
  .trust-bar-inner { gap: 12px; flex-direction: column; }
}

@media (max-width: 480px) {
  .iphone-frame { width: 200px; border-radius: 32px; padding: 10px; }
  .iphone-frame::before { width: 64px; height: 20px; top: 12px; }
  .iphone-screen { border-radius: 24px; }
  .hero p { font-size: 1.05rem; }
}
