/* ==========================================================================
   Anitha Digital Hub - AI Marketing Assistant
   Single stylesheet, no external libraries.
   ========================================================================== */

:root {
  /* Brand colours */
  --navy-900: #0a1a30;
  --navy-800: #0f2547;
  --navy-700: #17375f;
  --purple-600: #5b46d8;
  --purple-500: #6d5ae6;
  --purple-100: #ece9fd;

  --ink: #132238;
  --muted: #5a6b83;
  --line: #dbe2ef;
  --bg: #f5f7fb;
  --bg-alt: #eef2fa;
  --card: #ffffff;

  --ok: #146b45;
  --ok-bg: #e6f6ee;
  --err: #b3261e;
  --err-bg: #fdeceb;
  --warn: #8a5a00;
  --warn-bg: #fff6e5;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 37, 71, 0.06), 0 2px 8px rgba(15, 37, 71, 0.06);
  --shadow: 0 10px 30px rgba(15, 37, 71, 0.09);
  --shadow-lg: 0 24px 60px rgba(15, 37, 71, 0.16);
  --max: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Keep anchored sections clear of the sticky header when jumping to them */
section[id], main[id], [id="contact"] { scroll-margin-top: 92px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; color: var(--navy-900); }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--purple-600); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-800); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--purple-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; line-height: 1.2;
  padding: 11px 18px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-800); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-700); }
.btn-outline { background: transparent; color: var(--navy-800); border-color: var(--navy-800); }
.btn-outline:hover { background: var(--navy-800); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy-800); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy-800); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-small { padding: 8px 14px; font-size: 0.86rem; background: #fff; color: var(--navy-800); border-color: var(--line); }
.btn-small:hover { border-color: var(--navy-800); }
.btn-again { background: var(--purple-100); border-color: transparent; color: var(--purple-600); }
.btn-again:hover { background: var(--purple-500); color: #fff; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.btn-header { margin-left: 6px; }

/* ============================ Header ============================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--navy-800), var(--purple-500));
  color: #fff; font-weight: 800; font-size: 0.92rem; letter-spacing: .04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; color: var(--navy-900); }
.brand-text small { font-size: 0.76rem; color: var(--muted); }

.primary-nav { display: flex; align-items: center; gap: 8px; }
.primary-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: block; padding: 10px 14px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.94rem;
}
.nav-link:hover { background: var(--bg-alt); color: var(--navy-800); }
.nav-link.is-active { color: var(--purple-600); background: var(--purple-100); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
}
.nav-toggle-bar { display: block; width: 20px; height: 2px; background: var(--navy-800); border-radius: 2px; }

/* ============================ Hero ============================ */
.hero {
  background:
    radial-gradient(1100px 420px at 82% -8%, rgba(109, 90, 230, 0.20), transparent 62%),
    radial-gradient(900px 420px at 8% 0%, rgba(23, 55, 95, 0.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  padding: 60px 0 54px;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; }
.eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 6px 14px;
  background: var(--purple-100); color: var(--purple-600);
  border-radius: 999px; font-size: 0.82rem; font-weight: 700; letter-spacing: .01em;
}
.hero-copy .lead { font-size: 1.09rem; color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 26px; }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hero-points li { position: relative; padding-left: 30px; color: var(--navy-800); font-weight: 600; font-size: 0.95rem; }
.hero-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--purple-100); color: var(--purple-600);
  font-size: 0.75rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}

/* CSS dashboard illustration */
.hero-visual { display: flex; justify-content: center; }
.dash-card {
  width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.dash-top {
  display: flex; align-items: center; gap: 7px; padding: 13px 16px;
  background: var(--navy-800); color: #dce6f7;
}
.dash-top .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff6b6b; } .dot-amber { background: #ffcf5c; } .dot-green { background: #57d38c; }
.dash-title { margin-left: 8px; font-size: 0.84rem; font-weight: 700; letter-spacing: .03em; }
.dash-body { padding: 20px; display: grid; gap: 18px; }
.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-stat { background: var(--bg-alt); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.dash-stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.dash-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--purple-600); line-height: 1; }
.dash-chart { display: flex; align-items: flex-end; gap: 10px; height: 128px; padding: 0 2px; }
.dash-chart .bar {
  flex: 1; height: var(--h); border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--purple-500), #9b8cf2);
}
.dash-chart .bar:nth-child(odd) { background: linear-gradient(180deg, var(--navy-700), #4a6ea3); }
.dash-lines { display: grid; gap: 10px; }
.dash-line { display: block; height: 10px; border-radius: 999px; background: var(--bg-alt); width: var(--w); }
.dash-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 0.78rem; font-weight: 700; color: var(--purple-600);
  background: var(--purple-100); padding: 5px 12px; border-radius: 999px;
}

/* ============================ Sections ============================ */
.section { padding: 66px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 780px; margin: 0 auto 34px; text-align: center; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.mode-note {
  margin-top: 14px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: center;
  font-size: 0.9rem;
}

.badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--navy-800); color: #fff; font-size: 0.74rem; font-weight: 700; letter-spacing: .02em;
}
.badge-mode { background: var(--purple-600); }

/* ============================ Category chips ============================ */
.chip-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 600; font-size: 0.94rem;
  background: #fff; color: var(--navy-800);
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 13px 20px; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.chip span { font-size: 1.1rem; }
.chip:hover { border-color: var(--purple-500); box-shadow: var(--shadow-sm); }
.chip.is-selected { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip.is-selected:hover { border-color: var(--navy-800); }
.other-wrap { max-width: 460px; margin: 22px auto 0; }
.hint { text-align: center; color: var(--muted); font-size: 0.92rem; margin-top: 20px; }

/* ============================ Tabs ============================ */
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px; margin: 0 auto 30px; width: fit-content; max-width: 100%;
  box-shadow: var(--shadow-sm);
}
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.94rem; color: var(--muted);
  background: transparent; border: none; border-radius: 999px;
  padding: 11px 18px; cursor: pointer; white-space: nowrap;
}
.tab:hover { background: var(--bg-alt); color: var(--navy-800); }
.tab.is-active { background: var(--navy-800); color: #fff; }

/* ============================ Tool layout ============================ */
.tool-panel { display: none; }
.tool-panel.is-active { display: block; }
.tool-grid { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 26px; align-items: start; }

.tool-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.tool-form-title { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; }
.tool-form-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--navy-800); }
.req { color: var(--err); }
.field input[type="text"],
.field select,
.field textarea {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 62px; }
.field input[type="text"]:focus,
.field select:focus,
.field textarea:focus { border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(109, 90, 230, 0.18); outline: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-hint { font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; }
.field-error { color: var(--err); font-size: 0.82rem; font-weight: 600; margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--err) !important; background: var(--err-bg); }

.error-summary {
  background: var(--err-bg); border: 1.5px solid #f4c3c0; color: var(--err);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px; font-size: 0.9rem;
}
.error-summary ul { margin: 6px 0 0; padding-left: 20px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.form-status { margin: 14px 0 0; font-size: 0.88rem; font-weight: 600; min-height: 1em; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-err { color: var(--err); }
.form-status.is-info { color: var(--muted); }

/* ============================ Output ============================ */
.tool-output { min-width: 0; }
.output-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px;
}
.output-head h3 { margin: 0; }
.output-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.result {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm); min-height: 240px; max-height: 72vh; overflow: auto;
}
.result.is-loading { display: flex; align-items: center; justify-content: center; }
.result.is-fresh { animation: fadeIn .28s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.empty-state { text-align: center; color: var(--muted); padding: 48px 18px; }
.empty-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.empty-state p { margin: 0 0 8px; }

.loader { display: grid; justify-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 4px solid var(--purple-100); border-top-color: var(--purple-500);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Result content */
.result-title { font-size: 1.15rem; margin: 0 0 4px; color: var(--navy-900); }
.result-meta { color: var(--muted); font-size: 0.86rem; margin: 0 0 18px; }
.block { margin-bottom: 22px; }
.block:last-child { margin-bottom: 0; }
.block-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.98rem; font-weight: 700; color: var(--navy-800);
  margin: 0 0 10px; padding-bottom: 7px; border-bottom: 1.5px solid var(--line);
}
.block p { margin: 0 0 10px; }
.block p:last-child { margin-bottom: 0; }
.block ul, .block ol { margin: 0; padding-left: 22px; }
.block li { margin-bottom: 7px; }
.block li:last-child { margin-bottom: 0; }

.callout {
  background: var(--purple-100); border-left: 4px solid var(--purple-500);
  border-radius: var(--radius-sm); padding: 13px 16px; margin-bottom: 20px;
  font-weight: 600; color: var(--navy-800);
}
.callout span { color: var(--purple-600); }

.note-box {
  background: var(--warn-bg); border: 1px solid #f0d9a8; color: var(--warn);
  border-radius: var(--radius-sm); padding: 12px 15px; font-size: 0.88rem; margin-top: 8px;
}

.kv { display: grid; gap: 8px; }
.kv-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 12px; background: var(--bg); border-radius: var(--radius-sm); }
.kv-key { font-weight: 700; color: var(--navy-800); font-size: 0.9rem; }
.kv-val { min-width: 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; min-width: 720px; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy-800); color: #fff; font-size: 0.84rem; position: sticky; top: 0; z-index: 1; }
tbody tr:nth-child(even) { background: var(--bg); }
tbody tr:last-child td { border-bottom: none; }
td.day-cell { font-weight: 700; color: var(--purple-600); white-space: nowrap; }

.scene { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: var(--bg); }
.scene-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.scene-head h4 { margin: 0; font-size: 1rem; color: var(--navy-900); }
.scene-time { background: var(--purple-600); color: #fff; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* ============================ Steps ============================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-sm);
}
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 14px;
  background: var(--purple-100); color: var(--purple-600); font-weight: 800; font-size: 1.15rem;
}
.step-card h3 { margin-bottom: 8px; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--warn-bg); border: 1.5px solid #f0d9a8; color: var(--warn);
  border-radius: var(--radius); padding: 18px 20px; margin-top: 30px;
}
.notice span { font-size: 1.3rem; line-height: 1.2; }
.notice p { margin: 0; font-weight: 600; font-size: 0.94rem; }

/* ============================ Creator / About ============================ */
.creator-card {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900) 60%, var(--purple-600));
  color: #eaf0fb; border-radius: var(--radius-lg); padding: 38px;
  box-shadow: var(--shadow-lg);
}
.creator-avatar {
  width: 110px; height: 110px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.12); border: 2px solid rgba(255, 255, 255, 0.34);
  font-size: 2.1rem; font-weight: 800; letter-spacing: .04em; color: #fff;
}
.creator-body .eyebrow { background: rgba(255,255,255,0.14); color: #fff; margin-bottom: 10px; }
.creator-card h2 { color: #fff; margin-bottom: 6px; }
.creator-roles { color: #c7d5ef; font-weight: 600; margin-bottom: 16px; }
.creator-quote {
  margin: 0 0 22px; padding-left: 18px; border-left: 3px solid var(--purple-400, #8b7bf0);
  color: #dde7f8; font-style: italic; font-size: 1.02rem;
}
.creator-card .btn-primary { background: #fff; color: var(--navy-800); }
.creator-card .btn-primary:hover { background: var(--purple-100); }

.placeholder-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: #fff; border: 1.5px dashed var(--line);
  border-radius: var(--radius-lg); padding: 26px;
}
.placeholder-card span { font-size: 1.6rem; }
.placeholder-card h3 { margin: 0 0 6px; }
.placeholder-card p { margin: 0; color: var(--muted); }

/* ============================ Footer ============================ */
.site-footer { background: var(--navy-900); color: #c7d5ef; margin-top: 20px; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
  padding-top: 34px; padding-bottom: 22px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { display: block; color: #fff; }
.footer-brand span { font-size: 0.85rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a { color: #c7d5ef; text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 16px; padding-bottom: 26px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}
.footer-bottom p { margin: 0; font-size: 0.83rem; color: #9fb3d4; }

/* ============================ Responsive ============================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-visual { order: -1; }
  .dash-card { max-width: 520px; }
  .tool-grid { grid-template-columns: 1fr; }
  .result { max-height: none; }
  .steps { grid-template-columns: 1fr; }
  .creator-card { grid-template-columns: 1fr; text-align: left; padding: 30px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 20px 20px; box-shadow: var(--shadow);
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-link { padding: 13px 14px; border-radius: var(--radius-sm); }
  .btn-header { margin-left: 0; width: 100%; padding: 13px 18px; }
}

@media (max-width: 560px) {
  .section { padding: 48px 0; }
  .hero { padding: 40px 0 36px; }
  .field-row { grid-template-columns: 1fr; }
  .tool-form { padding: 20px; }
  .result { padding: 18px; }
  .kv-row { grid-template-columns: 1fr; gap: 4px; }
  .tabs { border-radius: var(--radius); justify-content: stretch; width: 100%; }
  .tab { flex: 1 1 auto; justify-content: center; }
  .hero-actions .btn { width: 100%; }
  .creator-avatar { width: 84px; height: 84px; font-size: 1.6rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
