@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #5B21B6;
  --color-secondary: #0EA5A4;
  --color-bg: #F7F5FF;
  --color-surface: #FFFFFF;
  --color-text: #0F172A;
  --color-muted: #475569;
  --color-accent: #FB923C;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --transition: 0.25s ease;
}

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

body {
  font-family: 'Manrope', 'Noto Sans', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before,
body::after {
  content: '';
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

body::before {
  top: -120px;
  right: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(14, 165, 164, 0.18), transparent 70%);
}

body::after {
  bottom: -160px;
  left: -160px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(91, 33, 182, 0.14), transparent 70%);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

.section {
  padding: 72px 0;
}

.section-title {
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem);
  margin-bottom: 16px;
}

.section-intro {
  color: var(--color-muted);
  max-width: 680px;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 16px;
  min-height: 64px;
  padding: 8px 0;
}

.logo {
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.site-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
  width: 100%;
  grid-column: 1 / -1;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
}

.nav-list a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--transition);
}

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

.menu-toggle {
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  display: block;
  transition: transform var(--transition), opacity var(--transition);
}

body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .site-nav {
  max-height: 360px;
}

.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-top: 24px;
}

.hero h1 {
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: clamp(2.2rem, 2vw + 1.6rem, 3.6rem);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero p {
  color: var(--color-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

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

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

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.card h3 {
  font-size: 1.2rem;
  font-family: 'Fraunces', 'Georgia', serif;
}

.card p {
  color: var(--color-muted);
}

.grid {
  display: grid;
  gap: 24px;
}

.media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #E5E7EB;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.steps {
  display: grid;
  gap: 16px;
}

.step {
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.step span {
  font-weight: 700;
  color: var(--color-primary);
  display: block;
  margin-bottom: 6px;
}

.banner {
  background: linear-gradient(120deg, rgba(91, 33, 182, 0.1), rgba(14, 165, 164, 0.12));
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  gap: 16px;
  align-items: center;
}

.banner h2 {
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 2rem;
}

.footer {
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 48px 0 32px;
}

.footer-content {
  display: grid;
  gap: 24px;
}

.footer-brand p {
  color: var(--color-muted);
  margin: 12px 0;
  max-width: 360px;
}

.footer-group {
  display: grid;
  gap: 6px;
}

.footer-group h4 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-muted);
  transition: color var(--transition);
}

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

.footer-group p {
  color: var(--color-muted);
  margin-bottom: 8px;
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer small {
  color: var(--color-muted);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.search-bar {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.search-bar input {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  font-size: 1rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.chip {
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  color: var(--color-text);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.chip.active {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
}

.accordion-toggle {
  border: none;
  background: none;
  color: var(--color-secondary);
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
}

.card-extra {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.card-extra.open {
  max-height: 240px;
}

.routine {
  display: grid;
  gap: 20px;
  align-items: start;
}

.checklist {
  list-style: disc;
  padding-left: 20px;
  color: var(--color-muted);
}

.save-routine {
  align-self: flex-start;
}

.save-routine.is-saved {
  background: var(--color-accent);
  color: #fff;
  border-color: transparent;
}

.builder {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 16px;
}

.builder form {
  display: grid;
  gap: 16px;
}

.builder select,
.builder button,
.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  font-size: 1rem;
  font-family: inherit;
}

.builder-output {
  background: rgba(91, 33, 182, 0.08);
  padding: 16px;
  border-radius: 12px;
  color: var(--color-text);
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
}

.field-error {
  color: #b91c1c;
  font-size: 0.9rem;
}

.form-success {
  background: rgba(14, 165, 164, 0.12);
  border: 1px solid rgba(14, 165, 164, 0.3);
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--color-text);
  margin-top: 16px;
}

@media (min-width: 640px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .banner {
    grid-template-columns: 1fr auto;
  }

  .grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .routine {
    grid-template-columns: 1fr 1fr;
  }

  .builder form {
    grid-template-columns: repeat(3, 1fr);
  }

  .builder form button {
    grid-column: span 3;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }

  .header-inner {
    display: flex;
    height: 72px;
    padding: 0;
    gap: 16px;
  }

  .site-nav {
    max-height: none;
    width: auto;
  }

  .nav-list {
    flex-direction: row;
    padding: 0;
  }

  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-content {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    align-items: start;
  }
}

@media (min-width: 1280px) {
  .hero {
    gap: 48px;
  }

  .section {
    padding: 90px 0;
  }
}
