/* ============================================
   KYLO — Base Stylesheet
   Keep Your Life Organised
   ============================================ */

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

:root {
  /* Brand colours — update these to match KYLO brand */
  --color-primary: #1389EB;
  --color-primary-hover: #0f74cc;
  --color-dark: #1a1a2e;
  --color-text: #374151;
  --color-text-light: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --color-border: #e5e7eb;

  /* Typography */
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-heading: var(--font-body);

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;

  /* Layout */
  --max-width: 1120px;
  --radius: 999px;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Screen-reader only utility */
.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;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) 0;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); text-align: center; margin-bottom: var(--space-lg); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-xs); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

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

.btn--small {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  text-decoration: none;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav__links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav__links a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-xl) 0;
  text-align: center;
  color: #fff;
  background: url('/assets/images/KIO-wl-hero.jpg') center/cover no-repeat;
  position: relative;
}

/* .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
} */

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__title {
  color: #fff;
}

.hero__title {
  margin-bottom: var(--space-sm);
}

.hero__subtitle-lg {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-sm);
}

.hero__body {
  max-width: 560px;
  margin: 0 auto var(--space-lg);
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.8);
}

.hero__form {
  max-width: 640px;
  margin: 0 auto;
}

.form-group--hero {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
}

.form-group--hero input {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  outline: none;
}

.hero__note {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Features ---------- */
.features {
  background: var(--color-bg);
}

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

.feature-card {
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: box-shadow 0.2s;
  overflow: hidden;
}

.feature-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.feature-card h3,
.feature-card p {
  padding: 0 var(--space-md);
}

.feature-card h3 {
  padding-top: var(--space-md);
}

.feature-card p {
  padding-bottom: var(--space-md);
}

.feature-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ---------- How It Works ---------- */
.how-it-works {
  background: var(--color-bg-alt);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  list-style: none;
  counter-reset: none;
}

.step {
  text-align: center;
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

/* ---------- Section labels ---------- */
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: var(--space-xs);
}

.section-intro {
  max-width: 640px;
  margin: calc(-1 * var(--space-md)) auto var(--space-lg);
  text-align: center;
  font-size: 1.0625rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.section-body {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.0625rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ---------- Why It Works ---------- */
.why-it-works {
  background: var(--color-bg);
}

/* ---------- Testimonials ---------- */
.testimonials {
  background: var(--color-bg-alt);
}

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

.testimonial-card {
  background: var(--color-bg);
  padding: var(--space-md);
  border-radius: 12px;
  border: none;
  margin: 0;
}

.testimonial-card p {
  font-style: italic;
  font-size: 1.0625rem;
  margin-bottom: var(--space-sm);
  color: var(--color-dark);
}

.testimonial-card cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

/* ---------- Early Access ---------- */
.early-access {
  background: var(--color-bg-alt);
}

/* ---------- Waitlist ---------- */
.waitlist {
  background: var(--color-bg);
  text-align: center;
}

.waitlist__note {
  margin-top: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.waitlist__form {
  max-width: 480px;
  margin: 0 auto;
}

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

.form-group input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input[type="email"]:focus {
  border-color: var(--color-primary);
}

.form-message {
  margin-top: var(--space-xs);
  font-size: 0.875rem;
  min-height: 1.4em;
}

.form-message--success { color: #059669; }
.form-message--error   { color: #dc2626; }

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.footer__links a {
  color: var(--color-text-light);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .form-group,
  .form-group--hero {
    flex-direction: column;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}
