/*
  Modern Flat UI Redesign - Green & Sky Blue Theme
  A fresh, vibrant redesign featuring a green and sky blue color palette, new layouts, and component styles.
  Font: Segoe UI, Poppins
*/
:root {
  /* Brand palette - Green & Sky Blue Theme */
  --bg: #eafaf1;
  --bg-2: #e3f6fd;
  --panel: #f6fff8;
  --glass: rgba(230,255,245,0.7);
  --glass-strong: rgba(230,255,245,0.92);
  --text: #1a3c2b;
  --muted: #5ba88a;
  --primary: #2ec4b6; /* sky blue */
  --primary-2: #43aa8b; /* green */
  --accent: #ffd166; /* yellow */
  --accent-2: #f4a261; /* orange */
  --accent-3: #3a86ff; /* blue accent */
  --danger: #e63946;
  --shadow: 0 8px 24px rgba(46,196,182,0.10);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 32px;
  --container: 1280px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }

/* Global */
body {
  margin: 0;
  font-family: 'Segoe UI', 'Poppins', Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(120deg, var(--bg) 60%, var(--bg-2) 100%);
  transition: background 0.5s, color 0.3s;
}
img { max-width: 100%; display: block; border-radius: var(--radius-sm); }
.container { width: min(100%, var(--container)); margin-inline: auto; padding: 0 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Topbar */
.topbar { background: var(--primary-2); color: #fff; padding: 0; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.topbar a { color: #fff; text-decoration: underline; }
.topbar .dot { color: var(--accent); margin-inline: 10px; }
.btn-sm { padding: 5px 12px; font-size: 14px; border-radius: 10px; }

/* Header / Nav */
.header { background: var(--panel); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 900; font-size: 1.2em; text-decoration: none; }
.logo img { height: 54px; border-radius: 10px; }
.nav-links { display: flex; gap: 16px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 8px; transition: background 0.2s, color 0.2s; }
.nav-links a:hover { color: var(--primary); background: var(--accent-2); }
.nav-cta { display: flex; gap: 10px; }
.hamburger { display: none; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--primary); background: var(--accent-2); position: relative; }
.hamburger span { position: absolute; left: 8px; right: 8px; height: 2px; background: var(--primary); border-radius: 2px; transition: all 0.3s; }
.hamburger span:nth-child(1){ top: 10px; }
.hamburger span:nth-child(2){ top: 18px; }
.hamburger span:nth-child(3){ top: 26px; }

/* Mobile menu */
.mobile-menu { display: none; flex-direction: column; gap: 12px; padding: 14px 18px; background: var(--glass-strong); border-bottom: 2px solid var(--primary); }
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--primary); text-decoration: none; padding: 8px 4px; border-radius: 8px; }
.mobile-menu a:hover { background: var(--accent-2); }
.mobile-cta { display: flex; gap: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: none; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); cursor: pointer; transition: background 0.2s, color 0.2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-accent { background: var(--accent); color: var(--text); }
.btn:hover { filter: brightness(0.95); }

/* Hero */
.hero { padding: 38px 0 24px; background: var(--panel); }
.hero-grid { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.hero-text { flex: 1.2; background: var(--glass); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.1; margin: 0 0 10px; color: var(--primary); }
.hero p { color: var(--muted); margin: 0 0 18px; }
.hero-actions { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 10px; }
.hero-stats div { background: var(--accent-2); padding: 10px 12px; border-radius: var(--radius-sm); color: var(--primary); font-weight: 700; }
.hero-stats strong { font-size: 16px; display: block; }
.hero-stats span { color: var(--muted); font-size: 12px; }
.hero-media { display: flex; gap: 10px; }
.hero-img { border-radius: var(--radius-lg); overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) contrast(1.1); transition: transform 0.4s; }
.hero-img:hover img { transform: scale(1.04); }

/* Motion Words */
.motion-words { display: inline-block; min-width: 10ch; margin-inline: 8px; color: var(--primary-2); font-weight: 700; }
.motion-words .word { display: none; }
.motion-words .word:nth-child(1) { display: inline; }

/* Sections */
.section { padding: 60px 0; background: var(--bg-2); }
.section.alt { background: var(--accent-2); }
.section-header { text-align: center; margin-bottom: 28px; }
.section-header h2 { font-size: clamp(20px, 3vw, 32px); margin: 0 0 6px; color: var(--primary-2); }
.section-header p { color: var(--muted); margin: 0; }

/* Cards */
.cards-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.card { background: var(--glass-strong); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); flex: 1 1 220px; min-width: 220px; transition: background 0.2s, box-shadow 0.2s; }
.card:hover { background: var(--accent-2); box-shadow: 0 12px 32px var(--primary-2); }
.card .icon { font-size: 24px; color: var(--primary-2); }
.card h3 { margin: 8px 0 4px; color: var(--primary); }
.card p { color: var(--muted); margin: 0; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: 14px; }
.step { background: var(--panel); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); position: relative; }
.step::before { content: ""; position: absolute; left: -18px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary-2); }
.step h3 { margin: 0 0 4px; color: var(--primary); }
.step p { color: var(--muted); margin: 0; }

/* Pricing */
.pricing-grid { display: flex; gap: 18px; flex-wrap: wrap; }
.price-card { background: var(--panel); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); flex: 1 1 220px; min-width: 220px; position: relative; }
.price-card .price { font-size: 26px; margin: 0; color: var(--primary-2); }
.price-card ul { margin: 8px 0; padding-left: 14px; color: var(--muted); }
.price-card .badge { position: absolute; top: -8px; right: 12px; background: var(--accent); color: var(--text); font-weight: 800; padding: 4px 8px; border-radius: 10px; box-shadow: var(--shadow); }
.price-card.featured { border: 2px solid var(--primary-2); background: var(--accent-2); }

/* Testimonials */
.testimonial-slider { position: relative; min-height: 140px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.slide { display: none; }
.slide.active { display: block; }
.author { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.author img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; border: 2px solid var(--accent-2); }
.slider-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); border: none; cursor: pointer; }
.dot.active { background: var(--primary-2); }

/* Gallery */
.gallery-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-grid img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); transition: transform 0.3s, filter 0.2s; }
.gallery-grid img:hover { transform: scale(1.03); filter: brightness(1.08); }

/* CTA */
.cta { padding: 50px 0; background: var(--primary-2); color: #fff; text-align: center; }
.cta h2 { margin: 0 0 4px; font-size: clamp(20px, 2.5vw, 28px); }
.cta p { margin: 0 0 12px; color: var(--accent); }
.cta-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer { padding: 40px 0; background: var(--panel); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.footer h4 { margin: 0 0 8px; color: var(--primary-2); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--primary); }
.footer .socials { display: flex; gap: 8px; margin-top: 8px; }
.footer-bottom { margin-top: 18px; border-top: 1px solid var(--accent-2); padding-top: 10px; color: var(--muted); text-align: center; }

/* Modal */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 100; }
.modal-overlay { position: absolute; inset: 0; background: var(--glass); backdrop-filter: blur(6px); }
.modal-content { position: relative; z-index: 1; background: var(--panel); border-radius: 16px; width: min(480px, 96%); padding: 18px; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--primary-2); background: var(--accent-2); color: var(--primary); cursor: pointer; }
.auth-form { display: grid; gap: 8px; }
.auth-form input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--accent-2); background: #fff; color: var(--text); }
.auth-form .form-msg { color: var(--primary-2); min-height: 14px; display: inline-block; margin-top: 4px; }
.auth-form .link { border: none; background: transparent; color: var(--primary-2); cursor: pointer; text-decoration: underline; font: inherit; padding: 0; }

/* Sign-in segmented control */
.signin-switch { display: flex; gap: 4px; padding: 4px; background: var(--accent-2); border-radius: 12px; box-shadow: var(--shadow); width: 100%; max-width: 320px; margin: 0 auto 12px; }
.switch-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: none; background: transparent; color: var(--muted); border-radius: 8px; font-weight: 700; cursor: pointer; transition: color 0.2s, background 0.2s; }
.switch-btn .icon { font-size: 16px; line-height: 1; }
.switch-btn:hover { color: var(--primary); background: var(--accent); }
.switch-btn[aria-selected="true"] { background: var(--primary-2); color: #fff; }
.auth-form input:focus { border-color: var(--primary-2); outline: none; box-shadow: 0 0 0 2px var(--accent-2); }

/* Toast */
.toast[hidden] { display: none; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--panel); color: var(--primary); border: 1px solid var(--accent-2); padding: 10px 12px; border-radius: 10px; box-shadow: var(--shadow); z-index: 120; opacity: 0.98; }

/* Back to top */
.back-to-top { position: fixed; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--primary-2); background: var(--accent-2); color: var(--primary); box-shadow: var(--shadow); cursor: pointer; opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s; }
.back-to-top.show { opacity: 1; transform: translateY(0); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px) scale(0.98); transition: opacity 0.5s, transform 0.5s, filter 0.5s; filter: saturate(0.98); }
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }

/* Responsive */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hamburger { display: inline-block; }
  .mobile-menu { display: flex; }
  .hero-grid { flex-direction: column; }
  .cards-grid { flex-direction: column; }
  .footer-grid { flex-direction: column; }
}
@media (max-width: 700px) {
  .hero-stats { flex-direction: column; }
  .gallery-grid { flex-direction: column; }
  .footer-grid { flex-direction: column; }
}
