/* ─── Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e1b2e;
  background-color: #faf9f7;
  -webkit-font-smoothing: antialiased;
}

/* ─── Palette ─── */
:root {
  --accent: #6c5ce7;
  --accent-dark: #5a4bd1;
  --accent-soft: #a29bfe;
  --bg-light: #ffffff;
  --bg-page: #faf9f7;
  --bg-alt: #f3f1ee;
  --bg-hero: #1e1b2e;
  --text-main: #1e1b2e;
  --text-muted: #6e6a7c;
  --text-on-dark: #e8e6f0;
  --border-soft: #e6e3dd;
  --warm: #f0c27a;
  --warm-dark: #e0a84e;
  --glow: rgba(108, 92, 231, 0.12);
}

/* ─── Typography ─── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&display=swap');

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  color: var(--text-main);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

/* ─── Layout helpers ─── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  padding: 5rem 0;
  background-color: var(--bg-alt);
}

.section-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.section-header {
  max-width: 640px;
}

.section-header h2 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.section-note {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 227, 221, 0.7);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-icon {
  height: 34px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

/* ─── Navigation ─── */
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text-main);
}

.nav-simple {
  gap: 1.25rem;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-main);
  padding: 0.25rem;
}

/* ─── Hero ─── */
.hero {
  background: var(--bg-hero);
  color: var(--text-on-dark);
  padding: 5rem 0 5.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 194, 122, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--warm);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: 2.75rem;
  line-height: 1.12;
  margin: 0 0 1.1rem;
  color: #ffffff;
}

.hero-subtitle {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: var(--text-on-dark);
  max-width: 34rem;
  line-height: 1.65;
  opacity: 0.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.08s ease, box-shadow 0.2s ease;
  font-family: "DM Sans", system-ui, sans-serif;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
  border-color: var(--warm);
  color: var(--warm);
}

/* ─── Hero card ─── */
.hero-side {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.6rem 1.8rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: 1.15rem;
  color: #ffffff;
}

.hero-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-on-dark);
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.8;
}

.hero-card li + li {
  margin-top: 0.4rem;
}

/* ─── Grid: 2 cols ─── */
.grid-2 {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-2 h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.grid-2 p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── App cards ─── */
.app-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.card {
  background-color: var(--bg-light);
  border-radius: 1.25rem;
  border: 1px solid var(--border-soft);
  padding: 1.75rem 1.8rem;
  box-shadow: 0 2px 12px rgba(30, 27, 46, 0.04);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 28px rgba(30, 27, 46, 0.08);
  transform: translateY(-2px);
}

.app-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.app-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.app-card p {
  margin: 0;
  line-height: 1.6;
  color: var(--text-muted);
}

.app-card p + p {
  margin-top: 0.75rem;
}

.app-tags {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
  margin-top: 1rem !important;
}

/* ─── Features ─── */
.feature-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-soft);
  transition: box-shadow 0.25s ease;
}

.feature:hover {
  box-shadow: 0 4px 18px rgba(30, 27, 46, 0.06);
}

.feature h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.feature p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Contact ─── */
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-grid h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.contact-grid p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.contact-grid a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact-grid a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 1.5rem 0;
  background-color: var(--bg-light);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--text-main);
}

/* ─── Legal pages ─── */
.legal-page {
  background-color: var(--bg-light);
}

.legal-page .site-header {
  background-color: rgba(255, 255, 255, 0.92);
}

.legal-main {
  padding: 3.5rem 0 5rem;
}

.legal-container {
  max-width: 740px;
}

.legal-container h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 2.2rem;
}

.legal-container h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  font-family: "Fraunces", Georgia, serif;
}

.legal-container p {
  line-height: 1.7;
  color: var(--text-main);
}

.legal-container ul {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  padding-left: 1.2rem;
  line-height: 1.7;
}

.legal-container li {
  color: var(--text-main);
}

.legal-container a {
  color: var(--accent);
  text-decoration: none;
}

.legal-container a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--text-muted);
}

.legal-disclaimer {
  margin-top: 2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-soft);
  padding-top: 1rem;
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-side {
    justify-content: flex-start;
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 56px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav:not(.nav-simple) {
    position: absolute;
    top: 56px;
    right: 0;
    left: 0;
    padding: 0.75rem 1.5rem 1rem;
    background-color: rgba(250, 249, 247, 0.98);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    gap: 0.75rem;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav:not(.nav-simple).nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hero {
    padding: 3.5rem 0 4rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-alt {
    padding: 3.5rem 0;
  }

  .app-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
