/* Landing page component styles for clickguide.co.za
   Brand tokens are defined in tina4press.config.mjs as CSS variables on :root.
   This file is loaded via <link> so changes hot-reload without a server restart. */

/* ── Cookie consent banner ──────────────────────────────────────────── */
#cg-cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #2D1520;
  color: #FFF5F9;
  padding: 1rem 80px 1rem 1.5rem; /* right padding clears the Click Guide launcher */
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
  font-size: .875rem;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(0.4,0,0.2,1);
}
#cg-cookie-banner.cg-banner-visible {
  transform: translateY(0);
}
#cg-cookie-banner p {
  flex: 1;
  margin: 0;
  color: #D9C4CE;
  line-height: 1.5;
  min-width: 200px;
}
#cg-cookie-banner a {
  color: #FFB5D8;
  text-decoration: underline;
}
#cg-cookie-banner a:hover { color: #fff; }
.cg-cookie-actions {
  display: flex;
  gap: .625rem;
  flex-shrink: 0;
}
#cg-cookie-decline {
  padding: .5rem 1.125rem;
  border: 1.5px solid rgba(255,245,249,.25);
  border-radius: 8px;
  background: transparent;
  color: #FFF5F9;
  font-size: .875rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
#cg-cookie-decline:hover {
  border-color: rgba(255,245,249,.6);
  background: rgba(255,245,249,.06);
}
#cg-cookie-accept {
  padding: .5rem 1.125rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #F20982 0%, #ED810E 100%);
  color: #fff;
  font-size: .875rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
#cg-cookie-accept:hover { opacity: .9; transform: translateY(-1px); }

/* ── tina4press UI icon overrides (search, menu, theme toggle) ──────── */
/* Suppress the framework's CSS emoji pseudo-elements */
.tp-theme-toggle::before { content: '' !important; display: none !important; }
:root[data-theme="dark"] .tp-theme-toggle::before { content: '' !important; display: none !important; }

/* Sun/moon pair — CSS shows the correct icon for the active theme */
.tp-icon-sun { display: none; }
:root[data-theme="dark"] .tp-icon-moon { display: none; }
:root[data-theme="dark"] .tp-icon-sun { display: block; }

/* Size the injected icons to match the button's existing padding */
.tp-theme-toggle .lucide,
.tp-menu-toggle .lucide { width: 1.1rem; height: 1.1rem; }
.tp-search-btn .lucide { width: 1rem; height: 1rem; vertical-align: -0.1em; margin-right: .3em; }
/* Search footer kbd arrow icons */
.tp-search-foot kbd .lucide { width: .8rem; height: .8rem; vertical-align: -0.1em; stroke-width: 2.5; }

/* ── Button inline icon (replaces &rarr; / arrow entities) ──────────── */
.cg-btn-icon {
  display: inline;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  margin-left: .3em;
  stroke-width: 2.5;
}

/* ── Lucide icons ───────────────────────────────────────────────────── */

/* Feature tile icon — replaces the old gradient number */
.cg-feature-icon {
  display: block;
  width: 2rem;
  height: 2rem;
  margin-bottom: .75rem;
  color: #F20982;
  stroke-width: 1.5;
}

/* Icon list — used in "What ships in the box", "Verify it", MCP rules etc. */
.cg-icon-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.cg-icon-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .875rem;
}
.cg-icon {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .2rem;
  color: #F20982;
  stroke-width: 2;
}

/* ── Inner-page section headers (icon + h2 side by side) ───────────── */
.cg-section-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2.5rem;
  margin-bottom: .1rem;
}
.cg-section-icon {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  color: #F20982;
  stroke-width: 1.75;
}
.cg-section-header h2 {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* ── Card headings — strip tina4press section-separator from first headings ── */
.cg-hero h1:first-child,
.cg-hero h2:first-child,
.cg-hero h3:first-child,
.cg-demo-section h2:first-child,
.cg-demo-section h3:first-child,
.cg-feature h2:first-child,
.cg-feature h3:first-child,
.cg-section-soft h2:first-child,
.cg-section-soft h3:first-child,
.cg-cta h2:first-child,
.cg-cta h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* ── Typography ─────────────────────────────────────────────────────── */
h1 { letter-spacing: -0.03em; font-weight: 700; }
h2 { letter-spacing: -0.02em; font-weight: 600; }
h3 { letter-spacing: -0.01em; font-weight: 600; }

/* Never underline links styled as buttons */
.cg-btn-primary:hover,
.cg-btn-primary:focus,
.cg-cta-btn:hover,
.cg-cta-btn:focus { text-decoration: none; }

/* Text selection */
::selection { background: #FFE0EF; color: #2D1520; }

/* ── Syntax highlighting ─────────────────────────────────────────────── */
:root,
:root[data-theme="dark"] {
  --tk-comment: #B7A0AC;
  --tk-string:  #86E1C0;
  --tk-keyword: #FF8AB8;
  --tk-number:  #F7B267;
  --tk-fn:      #7FB0FF;
  --tk-key:     #C9A2FF;
  --tk-tag:     #FF9EC4;
  --tk-var:     #C9A2FF;
}
.tp-code, .tp-code code, .tp-code pre { color: #FFF5F9; }

/* ── Hero section ───────────────────────────────────────────────────── */
.cg-hero {
  background: #FFF5F9; color: #2D1520; padding: 1rem 2rem 2rem;
  margin: 0 0 2.5rem; border-radius: 16px;
}
.cg-hero-inner { max-width: 680px; }

/* Top row: eyebrow + h1 left, graphic right */
.cg-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: .25rem;
}
.cg-hero-title { flex: 1; }
.cg-hero-title h1 { margin-bottom: 0; }
.cg-hero-graphic {
  flex-shrink: 0;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: .25rem;
}
.cg-hero-graphic svg { width: 160px; height: auto; padding-top: 24px; padding-right: 14px; }
#cg-hiw-svg { width: 160px; height: auto; padding-top: 13px; padding-right: 14px; }
#cg-install-svg { width: 160px; height: auto; padding-top: 13px; padding-right: 14px; }
#cg-wp-svg { width: 140px; height: auto; padding-top: 13px; padding-right: 14px; }

/* Sub text and button sit below at full width — no special rule needed,
   they're direct children of .cg-hero outside .cg-hero-top */

@media (max-width: 680px) {
  .cg-hero-graphic { display: none; }
}
.cg-hero-eyebrow {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: #F20982; margin: 0 0 1rem;
}
.cg-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1;
  margin: 0 0 1.25rem; letter-spacing: -.03em; color: #2D1520;
}
.cg-gradient-text {
  background: linear-gradient(135deg, #F20982 0%, #ED810E 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.cg-hero-sub { font-size: 1.05rem; color: #5C4048; margin: 0 0 .85rem; line-height: 1.6; }
.cg-btn-primary {
  display: inline-block; margin-top: 1.5rem; padding: .9rem 2rem;
  background: linear-gradient(135deg, #F20982 0%, #ED810E 100%); color: #fff;
  font-weight: 700; font-size: 1rem; border-radius: 10px; text-decoration: none;
  box-shadow: 0 2px 12px rgba(242,9,130,.3);
  transition: opacity .15s, transform .1s, box-shadow .15s;
}
.cg-btn-primary:hover { opacity: .92; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(242,9,130,.4); }

/* ── Global placeholder fix — tina4press dark mode ─────────────────── */
/* Browsers render ::placeholder at ~54% opacity by default, which works on
   light backgrounds but disappears on dark ones. Pin it to a readable tint. */
:root[data-theme="dark"] ::placeholder {
  color: rgba(255, 245, 249, 0.45);
  opacity: 1;
}

/* ── Demo section ───────────────────────────────────────────────────── */
.cg-demo-section {
  background: #2D1520; color: #FFF5F9;
  border-radius: 16px; padding: 2rem; margin-bottom: 2.5rem;
}
.cg-demo-section h2 { color: #fff; font-size: 1.4rem; margin: 0 0 .5rem; }
.cg-demo-section > p { color: #D9C4CE; margin: 0 0 1.5rem; }
.cg-demo-section code { background: rgba(255,255,255,.1); color: #FFF5F9; }
.cg-demo-section kbd {
  background: rgba(255,255,255,.12); color: #FFF5F9;
  border: 1px solid rgba(255,255,255,.2); border-radius: 4px; padding: .1em .4em; font-size: .85em;
}
.cg-demo-section .demo-app { color: #2D1520; }
.cg-demo-section .demo-table td { color: #2D1520; }
:root[data-theme="dark"] .cg-demo-section .demo-table th,
:root[data-theme="dark"] .cg-demo-section .demo-table td { color: #fff; }

/* Demo app stays light in dark mode — it depicts a customer's admin UI,
   not the marketing site itself. Without this, --tp-bg goes near-black and
   dark Berry text becomes invisible against it. */
:root[data-theme="dark"] #cg-demo .demo-app {
  background: #fff;
  color: #2D1520;
  border-color: #E8DDE4;
}
:root[data-theme="dark"] #cg-demo .demo-table th,
:root[data-theme="dark"] #cg-demo .demo-table td {
  color: #2D1520;
  border-color: #E8DDE4;
}
:root[data-theme="dark"] #cg-demo .demo-table th { color: #998090; }
:root[data-theme="dark"] #cg-demo .demo-row-action { background: #fff; color: #2D1520; border-color: #E8DDE4; }
:root[data-theme="dark"] #cg-demo .demo-input {
  background: #fff;
  color: #2D1520;
  border-color: #D5C4CC;
}
:root[data-theme="dark"] #cg-demo .demo-input::placeholder { color: rgba(45, 21, 32, 0.4); opacity: 1; }
#cg-demo .demo-caption { font-size: .85rem; color: #fff !important; margin-top: 1rem; }

/* ── Feature tiles ──────────────────────────────────────────────────── */
.cg-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem; margin: 1.5rem 0 2rem; align-items: start;
}
.cg-feature { background: #FFF5F9; color: #2D1520; border-radius: 12px; padding: 1.5rem; }
.cg-feature h3 { margin: 0 0 .4rem; font-size: .95rem; color: #2D1520; }
.cg-feature p { font-size: .9rem; color: #5C4048; margin: 0; }

/* ── Prose sections ─────────────────────────────────────────────────── */
.cg-section-soft { background: #FFF5F9; color: #2D1520; border-radius: 16px; padding: 2rem; margin: 0 0 2rem; }
.cg-section-soft h2, .cg-section-soft h3 { color: #2D1520; }
#what-it-will-not-do { margin-top: 0; border-top: none; }
.cg-section-soft p, .cg-section-soft li { color: #5C4048; }

/* ── CTA banner ─────────────────────────────────────────────────────── */
.cg-cta {
  background: #2D1520; color: #FFF5F9; border-radius: 16px;
  padding: 2.5rem 2rem; display: flex; gap: 2rem;
  align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 2rem 0;
}
.cg-cta h2 { color: #fff; margin: 0 0 .4rem; }
.cg-cta p  { margin: 0; color: #D9C4CE; }
.cg-cta-btn {
  display: inline-block; padding: .9rem 2rem;
  background: linear-gradient(135deg, #F20982 0%, #ED810E 100%); color: #fff;
  font-weight: 700; border-radius: 10px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(242,9,130,.35);
  transition: opacity .15s, transform .1s, box-shadow .15s;
}
.cg-cta-btn:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(242,9,130,.45); }

/* ── Header logo ────────────────────────────────────────────────────── */
.tp-brand-name { display: none; }
.tp-logo { display: none; }
.tp-brand::before {
  content: '';
  display: block;
  height: 32px;
  width: 128px;
  background: url('/brand/logos/logo-on-light.svg') left center / contain no-repeat;
}
:root[data-theme="dark"] .tp-brand::before {
  background-image: url('/brand/logos/logo-on-dark.svg');
}

/* ── Legacy hero wordmark (kept for belt-and-braces) ────────────────── */
.hero-wordmark { margin: 0 0 .75rem; text-align: center; }
.hero-wordmark img { border: 0; border-radius: 0; padding: 0; max-width: min(340px, 55vw); height: auto; display: inline-block; }
.tp-content p:has(> img[src*="logo-on-light"]) { margin: 0 0 .75rem; text-align: center; }
.tp-content p > img[src*="logo-on-light"] { border: 0; border-radius: 0; padding: 0; max-width: min(340px, 55vw); }
