/* ===== Cfemen — Light/Dark Theme (auto + toggle) ===== */
:root {
  --bg: #f9f9f9;
  --text: #222;
  --muted: #eee;

  --brand-1: #4b0082;
  --brand-2: #6a5acd;

  --card-bg: #fff;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.08);

  --link: #4b0082;
  --link-hover: #6a5acd;

  --btn-bg: #4b0082;
  --btn-bg-hover: #6a5acd;
  --btn-text: #fff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f12;
    --text: #e8e8ea;
    --muted: #17191d;

    --brand-1: #a78bfa;
    --brand-2: #7c3aed;

    --card-bg: #14161a;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);

    --link: #a78bfa;
    --link-hover: #c4b5fd;

    --btn-bg: #7c3aed;
    --btn-bg-hover: #a78bfa;
    --btn-text: #0b0c0f;
  }
}

/* Light override */
:root[data-theme="light"] {
  --bg: #f9f9f9;
  --text: #222;
  --muted: #eee;
  --brand-1: #4b0082;
  --brand-2: #6a5acd;
  --card-bg: #fff;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  --link: #4b0082;
  --link-hover: #6a5acd;
  --btn-bg: #4b0082;
  --btn-bg-hover: #6a5acd;
  --btn-text: #fff;
}

/* Dark override */
:root[data-theme="dark"] {
  --bg: #0e0f12;
  --text: #e8e8ea;
  --muted: #17191d;
  --brand-1: #a78bfa;
  --brand-2: #7c3aed;
  --card-bg: #14161a;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  --link: #a78bfa;
  --link-hover: #c4b5fd;
  --btn-bg: #7c3aed;
  --btn-bg-hover: #a78bfa;
  --btn-text: #0b0c0f;
}

/* General */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* Header */
header {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 1rem;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--muted);
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--brand-1);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero button {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  padding: 0.9rem 1.6rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease;
}

.hero button:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

/* Sections */
section {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: auto;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.feature {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.feature h3 {
  margin-top: 0;
  color: var(--brand-1);
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Footer */
footer {
  text-align: center;
  background: var(--brand-1);
  color: white;
  padding: 1.5rem;
  margin-top: 2rem;
}

/* Floating toggle */
#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  background: var(--brand-1);
  border: none;
  border-radius: 50%;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-size: 1.1rem;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

#theme-toggle:hover {
  background: var(--brand-2);
  transform: scale(1.1);
}
