/* ===== Base tokens — shared across all themes ===== */
:root {
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ===== Theme 1: Catppuccin Latte (light, elegant) ===== */
:root[data-theme="latte"] {
  --color-bg: #eff1f5;
  --color-surface: #ccd0da;
  --color-surface-deep: #acb0be;
  --color-text: #4c4f69;
  --color-text-secondary: #6c6f85;
  --color-accent: #1e66f5;
  --color-border: #9ca0b0;
  --color-border-strong: #8c8fa1;
  --color-shadow: 0 1px 3px rgba(76, 79, 105, 0.06), 0 1px 2px rgba(76, 79, 105, 0.04);
  --color-shadow-strong: 0 4px 6px -1px rgba(76, 79, 105, 0.08), 0 2px 4px -2px rgba(76, 79, 105, 0.08);
  --font-heading: "Lora", Georgia, serif;
}

/* ===== Theme 2: Catppuccin Frappé (cool, muted) ===== */
:root[data-theme="frappe"] {
  --color-bg: #303446;
  --color-surface: #414559;
  --color-surface-deep: #626880;
  --color-text: #c6d0f5;
  --color-text-secondary: #a5adce;
  --color-accent: #85c1dc;
  --color-border: #737994;
  --color-border-strong: #838ba7;
  --color-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.15);
  --color-shadow-strong: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Theme 3: Catppuccin Macchiato (warm, dark) ===== */
:root[data-theme="macchiato"] {
  --color-bg: #24273a;
  --color-surface: #363a4f;
  --color-surface-deep: #5b6078;
  --color-text: #cad3f5;
  --color-text-secondary: #a5adcb;
  --color-accent: #f5a97f;
  --color-border: #6e738d;
  --color-border-strong: #8087a2;
  --color-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.18);
  --color-shadow-strong: 0 4px 6px -1px rgba(0, 0, 0, 0.32), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
  --font-heading: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Theme 4: Catppuccin Mocha (rich, dark) ===== */
:root[data-theme="mocha"] {
  --color-bg: #1e1e2e;
  --color-surface: #313244;
  --color-surface-deep: #585b70;
  --color-text: #cdd6f4;
  --color-text-secondary: #a6adc8;
  --color-accent: #b4befe;
  --color-border: #6c7086;
  --color-border-strong: #7f849c;
  --color-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.22);
  --color-shadow-strong: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --font-heading: "Playfair Display", Georgia, serif;
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Typography: headings pick up the themed heading font */
h1, h2, h3, .section-title, .hero-text h1 { font-family: var(--font-heading); }
.hero-text h1 { font-weight: 800; }
.hero-text h1 span, .hero-text h1 strong { color: var(--color-accent); }
.quote { font-family: var(--font-heading); }

/* ===== Layout utilities ===== */
.container {
  width: min(90%, 72rem);
  margin-inline: auto;
  padding-block: 3rem;
}
.section { padding-block: 3rem; }
.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.section-title {
  font-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}
.section-subtitle {
  color: var(--color-text-secondary);
  text-align: center;
  margin-inline: auto;
  max-width: 42rem;
  margin-bottom: 2.5rem;
}
.credit { font-size: 0.75rem; opacity: 0.7; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-surface, var(--color-bg));
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--color-shadow);
  transition: var(--transition);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo { font-weight: 700; font-size: 1.25rem; color: var(--color-text); }
.nav { display: flex; gap: 1.5rem; font-size: 0.9rem; font-weight: 500; }
.nav a { color: var(--color-text-secondary); }
.nav a:hover { color: var(--color-text); }

/* ===== Theme switcher ===== */
.theme-switcher {
  display: inline-flex;
  gap: 0.25rem;
  background-color: var(--color-surface-deep);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.25rem;
  transition: var(--transition);
}
.theme-pill {
  all: unset;
  cursor: pointer;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: var(--transition);
}
.theme-pill:hover { color: var(--color-text); }
.theme-pill.active,
.theme-pill:focus-visible {
  color: var(--color-text);
  background-color: var(--color-bg);
  box-shadow: var(--color-shadow-strong);
}

/* ===== Hero ===== */
.hero { border-bottom: 1px solid var(--color-border); }
.hero-inner {
  display: grid;
  align-items: center;
  gap: 3rem;
  grid-template-columns: 1fr;
  padding-block: 4rem;
}
@media (min-width: 48rem) { .hero-inner { grid-template-columns: 1.1fr 0.9fr; } }
.hero-text h1 {
  font-size: clamp(2rem, 4.5vw + 0.5rem, 2.75rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.lead { font-size: 1.1rem; color: var(--color-text-secondary); max-width: 38rem; margin-bottom: 1.75rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}
.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  padding: 0.7rem 1.4rem;
}
.btn-primary:hover { filter: brightness(0.92); }
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  padding: 0.7rem 1.4rem;
}
.btn-ghost:hover {
  color: var(--color-text);
  background-color: var(--color-surface-deep);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* ===== Cards ===== */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--color-shadow);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--color-shadow-strong);
  transform: translateY(-2px);
}
.card-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background-color: var(--color-accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}
.card h3 { margin: 0.75rem 0 0.5rem; font-size: 1.1rem; font-weight: 600; }
.card p { font-size: 0.9rem; color: var(--color-text-secondary); }

/* ===== Hero graphic (mock device) ===== */
.hero-graphic { display: flex; justify-content: center; }
.mock-frame {
  width: 22rem;
  border: 12px solid var(--color-border-strong);
  border-radius: 1.5rem;
  box-shadow: var(--color-shadow-strong);
  background-color: var(--color-surface);
}
.mock-header {
  height: 0.9rem; margin: 1.1rem 1.2rem 0; border-radius: 0.4rem;
  background-color: var(--color-text-secondary); width: 60%; opacity: 0.5;
}
.mock-body {
  height: 0.7rem; margin: 0.6rem 1.2rem; border-radius: 0.3rem;
  background-color: var(--color-text-secondary); opacity: 0.3;
}

/* ===== Swatch colors for theme cards (Catppuccin gradient) ===== */
.swatch {
  display: block; height: 1.6rem; width: 1.6rem; border-radius: 0.4rem;
  border: 1px solid var(--color-border-strong);
}
.swatch-latte { background: linear-gradient(135deg, #eff1f5 0%, #ccd0da 100%); }
.swatch-frappe { background: linear-gradient(135deg, #303446 0%, #414559 100%); }
.swatch-macchiato { background: linear-gradient(135deg, #24273a 0%, #363a4f 100%); }
.swatch-mocha { background: linear-gradient(135deg, #1e1e2e 0%, #313244 100%); }
.swatch-text {
  margin-top: 0.6rem;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
}

/* ===== Testimonials ===== */
.testimonial { border-style: dashed; }
.quote {
  font-style: italic; font-size: 1rem; position: relative; margin-bottom: 1rem;
}
.quote::before {
  content: """; font-size: 2.5rem; position: absolute; top: -1rem; left: -1rem;
  color: var(--color-text-secondary); opacity: 0.2;
}
.author { font-weight: 600; font-size: 0.9rem; color: var(--color-accent); }

/* ===== Contact ===== */
.contact-form {
  display: grid; gap: 1rem; max-width: 28rem; margin-inline: auto; margin-top: 1.5rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 0.8rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius); font-family: inherit; font-size: 0.95rem;
  background-color: var(--color-surface); color: var(--color-text);
  transition: var(--transition);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--color-text-secondary); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--color-border); margin-top: 3rem; }
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  text-align: center; font-size: 0.85rem; color: var(--color-text-secondary);
}
.social { display: flex; gap: 1rem; }
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  border: 1px solid var(--color-border-strong); color: var(--color-text-secondary);
  font-weight: 700; font-size: 0.8rem;
}
.social a:hover {
  color: var(--color-accent); border-color: var(--color-accent);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .nav { display: none; }
  .hero-inner { padding-block: 2.5rem; }
  .hero-cta { flex-direction: column; }
}
