/* RenovAI — landing + admin + cabinet shared styles (MVP-2 dark mode). */

:root {
  --ink: #17202a;
  --ink-soft: #2d3748;
  --muted: #5f6f7d;
  --line: #d8e0e7;
  --line-soft: #ebeff3;
  --brand: #16706a;
  --brand-bright: #1f9088;
  --brand-dark: #0f4d49;
  --paper: #ffffff;
  --paper-2: #fbfcfd;
  --wash: #f4f7f8;
  --accent: #d97b29;
  --accent-bright: #f59548;
  --danger: #a83232;
  --hero-glow: radial-gradient(900px 480px at 18% -10%, rgba(31, 144, 136, 0.18), transparent 70%),
    radial-gradient(680px 380px at 92% 10%, rgba(217, 123, 41, 0.16), transparent 65%);
  --shadow-card: 0 14px 38px rgb(23 32 42 / 8%);
  --shadow-pop: 0 22px 52px rgb(23 32 42 / 14%);
  --radius: 12px;
  --radius-lg: 18px;
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #e8eef3;
  --ink-soft: #c6d0d9;
  --muted: #93a3b1;
  --line: #2a3744;
  --line-soft: #1e2934;
  --brand: #2bbab0;
  --brand-bright: #46d3c8;
  --brand-dark: #1a8a82;
  --paper: #131c25;
  --paper-2: #182230;
  --wash: #0b1219;
  --accent: #f59548;
  --accent-bright: #ffb066;
  --danger: #f56565;
  --hero-glow: radial-gradient(900px 480px at 18% -10%, rgba(70, 211, 200, 0.22), transparent 70%),
    radial-gradient(680px 380px at 92% 10%, rgba(245, 149, 72, 0.18), transparent 65%);
  --shadow-card: 0 14px 38px rgb(0 0 0 / 45%);
  --shadow-pop: 0 22px 52px rgb(0 0 0 / 55%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: "Inter", "Inter var", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01";
  line-height: 1.55;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--brand-dark);
  transition: color 0.15s ease;
}

[data-theme="dark"] a {
  color: var(--brand-bright);
}

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

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

/* === Topbar with theme toggle === */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  box-shadow: 0 6px 14px rgb(22 112 106 / 35%);
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.nav a:hover {
  color: var(--brand-bright);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.18s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) rotate(-10deg);
  border-color: var(--brand);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle .icon-moon {
  display: inline;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: inline;
}

/* === Hero === */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  padding: 56px 0 96px;
  background: var(--hero-glow);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 16px 0 0;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--ink) 0%, var(--brand-dark) 65%, var(--accent) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, var(--brand-bright) 60%, var(--accent-bright) 110%);
  -webkit-background-clip: text;
  background-clip: text;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 10px 24px rgb(22 112 106 / 28%);
}

.button:hover {
  transform: translateY(-2px);
  background: var(--brand-bright);
  box-shadow: 0 14px 30px rgb(22 112 106 / 38%);
  color: #fff;
}

.button.secondary {
  background: transparent;
  color: var(--brand-dark);
  box-shadow: none;
}

[data-theme="dark"] .button.secondary {
  color: var(--brand-bright);
}

.button.secondary:hover {
  background: rgba(31, 144, 136, 0.08);
  color: var(--brand);
}

.mock {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-pop);
}

.mock::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, rgba(31, 144, 136, 0.35), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.mock-row {
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0;
}

.mock-row:last-child {
  border-bottom: 0;
}

.tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(217, 123, 41, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-theme="dark"] .tag {
  background: rgba(245, 149, 72, 0.18);
}

/* === Sections === */

.section {
  padding: 80px 0;
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
}

.section.alt {
  background: var(--wash);
}

.section h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.5vw, 38px);
  letter-spacing: -0.02em;
}

.section .lede {
  max-width: 640px;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-card);
}

.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 144, 136, 0.14), rgba(217, 123, 41, 0.14));
  font-size: 22px;
  color: var(--brand-dark);
}

[data-theme="dark"] .card .icon {
  background: linear-gradient(135deg, rgba(70, 211, 200, 0.18), rgba(245, 149, 72, 0.18));
  color: var(--brand-bright);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.price-card.popular {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.price-card .price {
  margin: 14px 0 6px;
  font-size: 30px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.price-card .price small {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.price-card .features {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.badge-pop {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.faq {
  display: grid;
  gap: 14px;
}

.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq details[open] {
  border-color: var(--brand);
  box-shadow: var(--shadow-card);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq summary::after {
  content: "+";
  font-weight: 600;
  font-size: 22px;
  color: var(--brand);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

.faq details p {
  margin: 12px 0 0;
  color: var(--muted);
}

.footer {
  padding: 36px 0;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line-soft);
}

.footer a {
  margin-right: 12px;
}

/* === Admin shell (legacy + cabinet) === */

.admin-layout {
  padding: 32px 0 80px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--paper-2);
}

tbody tr:hover {
  background: var(--paper-2);
}

.form {
  max-width: 400px;
  margin: 80px auto;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.field,
.form label {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--muted);
}

.form input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 144, 136, 0.18);
}

.error {
  color: var(--danger);
  font-weight: 600;
}

@media (max-width: 880px) {
  .hero {
    padding: 36px 0 64px;
  }

  .hero-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 14px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .nav a:not(:last-of-type) {
    display: none;
  }
}
