/* support.css — restyled support pages, matches Erudity landing */
@import url("assets/colors_and_type.css");

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100vh; }

body {
  font-family: var(--font-sans);
  background: var(--page-bg);
  color: var(--page-fg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color .35s ease, color .35s ease;
}
body[data-theme="light"] {
  --page-bg: var(--surface-paper);
  --page-fg: var(--ink-900);
  --card-bg: var(--surface-card);
  --card-fg: var(--ink-900);
  --hairline: rgba(98, 23, 174, 0.12);
  --accent: var(--purple-800);
  --accent-soft: var(--purple-100);
  --muted: var(--ink-500);
  --input-bg: rgba(98, 23, 174, 0.04);
  --input-border: rgba(98, 23, 174, 0.18);
  --input-focus: var(--purple-800);
  --shadow-card: 0 8px 28px -10px rgba(98,23,174,0.15), 0 2px 6px rgba(20,12,40,0.06);
  --success-bg: #E8F4E9;
  --success-fg: #1B5E20;
  --error-bg: #FBE9E9;
  --error-fg: #8B1A1A;
}
body[data-theme="dark"] {
  /* Match the Flutter app's neutral dark palette (lib/core/theme/app_colors.dart) */
  --page-bg: var(--surface-night);          /* #121212 */
  --page-fg: var(--ink-100);                /* #E0E0E0 */
  --card-bg: var(--surface-dusk);           /* #1E1E1E */
  --card-fg: var(--ink-100);
  --hairline: rgb(62, 62, 62);              /* #3E3E3E */
  --accent: var(--purple-400);              /* #B070E0 */
  --accent-soft: rgba(176, 112, 224, 0.14);
  --muted: var(--ink-400);                  /* #9E9E9E */
  --input-bg: rgb(44, 44, 44);              /* #2C2C2C */
  --input-border: rgb(62, 62, 62);          /* #3E3E3E */
  --input-focus: var(--purple-400);
  --shadow-card: 0 12px 30px -12px rgba(0,0,0,0.55), 0 2px 4px rgba(0,0,0,0.35);
  --success-bg: rgba(102, 187, 106, 0.15);
  --success-fg: #B8E6BB;
  --error-bg: rgba(239, 83, 80, 0.15);
  --error-fg: #EF9A9A;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--page-bg) 78%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: var(--page-fg);
}
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: white;
}
.brand-word {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.18em;
}
.theme-toggle {
  appearance: none;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--page-fg);
  width: 38px; height: 38px;
  border-radius: 999px;
  display: grid; place-items: center;
  cursor: pointer;
}
.theme-toggle:hover { background: var(--accent-soft); }
.theme-toggle svg { width: 18px; height: 18px; }

/* MAIN */
.support-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.support-main.wide { max-width: 980px; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1.page-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.page-sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 580px;
  margin-bottom: 40px;
}

/* CARD */
.card {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 20px; }
.card h2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.card .card-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* FORM */
form { display: flex; flex-direction: column; gap: 18px; }
label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
label .optional {
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--input-border);
  border-radius: 14px;
  font-size: 15px;
  font-family: var(--font-sans);
  font-weight: 600;
  background: var(--input-bg);
  color: var(--card-fg);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); font-weight: 400; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--hairline);
}
.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px; height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.checkbox-row label {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

button[type="submit"] {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
  box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--accent) 50%, transparent);
}
button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
button[type="submit"]:active { transform: translateY(0) scale(0.98); }

.hp { position: absolute; left: -9999px; }

/* MESSAGES */
.banner {
  padding: 16px 20px;
  border-radius: 14px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
}
.banner.success { background: var(--success-bg); color: var(--success-fg); border-color: color-mix(in srgb, var(--success-fg) 25%, transparent); }
.banner.error { background: var(--error-bg); color: var(--error-fg); border-color: color-mix(in srgb, var(--error-fg) 25%, transparent); }

/* CONTACT */
.contact-info {
  font-size: 16px;
  line-height: 1.8;
}
.contact-info a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.contact-info a:hover { text-decoration: underline; }
.contact-address {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* TERMLY embed area — stays light for legibility regardless of theme */
.embed-frame {
  background: white;
  color: #212121;
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--hairline);
}
.embed-frame [name="termly-embed"] { min-height: 400px; }
/* Light placeholder content */
.embed-placeholder { font-family: var(--font-sans); }
.embed-placeholder h3 { font-size: 18px; margin: 22px 0 8px; color: #212121; font-weight: 900; }
.embed-placeholder p { font-size: 14px; line-height: 1.65; color: #4a4a4a; margin-bottom: 12px; font-weight: 400; }
.embed-placeholder ul { padding-left: 22px; margin-bottom: 14px; }
.embed-placeholder li { font-size: 14px; line-height: 1.65; color: #4a4a4a; margin-bottom: 6px; font-weight: 400; }

/* FOOTER */
.site-footer {
  padding: 40px 32px 32px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.site-footer .footer-links a {
  color: var(--page-fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
}
.site-footer .footer-links a:hover { color: var(--accent); }
.site-footer .sep { color: var(--hairline); }

/* "Back to home" small link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
  transition: color .2s ease;
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 14px; height: 14px; }

@media (max-width: 600px) {
  .support-main { padding: 32px 18px 60px; }
  .card { padding: 24px; border-radius: 20px; }
  .site-header { padding: 14px 18px; }
}
