/*
Theme Name: Beacon AI
Theme URI: https://example.com/beacon-ai-theme
Author: Beacon AI
Author URI: https://example.com
Description: A fully responsive one-page SaaS marketing theme for an AI search visibility product — hero, interactive product demo tabs, lead-capture, feature blocks, pricing with a working monthly/yearly toggle, comparison table, FAQ accordion and footer. Mobile-first, accessible (WCAG-AA contrast, visible focus states, keyboard-friendly menus), no page builder or plugin required.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: beacon-ai
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready, threaded-comments, full-width-template
*/

:root{
  --bg:#f7f5f1;
  --bg-alt:#efece5;
  --ink:#18160f;
  --ink-soft:#5c584e;
  --ink-faint:#55503f;
  --accent:#e96843;      /* exact brand/logo orange: decorative / large text / icons / fills */
  --accent-btn:#e96843;  /* same brand orange, used for button/badge fills (paired with dark ink text, 5.6:1, not white) */
  --accent-text:#97432b; /* darker orange for small colored TEXT labels — raw brand orange fails contrast as body-size text */
  --dark:#15130f;
  --dark-card:#211e18;
  --line:#e2ddd2;
  --on-dark-soft:#c9c4b8;   /* 10.6:1 on dark */
  --on-dark-faint:#b3ad9a;  /* 8.3:1 on dark */
  --focus:#2f6fed;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-6:24px; --space-8:32px;
}
*, *::before, *::after { box-sizing:border-box; }
* { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.serif { font-family: ui-serif, Georgia, Cambria, 'Times New Roman', serif; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-size:16px; line-height:1.55; margin:0; }
img { max-width:100%; height:auto; }
.accent { color: var(--accent); }
.accent-text { color: var(--accent-text); }

/* Focus visibility (accessibility: focus-states) */
a, button, input, [tabindex] { outline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link{
  position:absolute; left:-9999px; top:0; z-index:100;
  background:var(--ink); color:#fff; padding:12px 20px; border-radius:0 0 8px 0; font-weight:600;
}
.skip-link:focus{ left:0; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:48px; padding:0 24px; border-radius:999px; font-weight:600; font-size:15px;
  transition: transform .15s ease-out, box-shadow .15s ease-out, background-color .15s ease-out;
  cursor:pointer; white-space:nowrap; text-decoration:none;
}
.btn:active{ transform: scale(0.97); }
.btn-fill{ background: var(--accent-btn); color:var(--ink); }
.btn-fill:hover{ background:#8f4329; box-shadow: 0 6px 20px rgba(163,79,49,.28); color:#fff; }
.btn-dark{ background: var(--ink); color:#fff; }
.btn-dark:hover{ background:#000; color:#fff; }
.btn-outline{ border:1.5px solid var(--ink); color:var(--ink); background:transparent; }
.btn-outline:hover{ background: rgba(24,22,15,.05); color:var(--ink); }
.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

.icon{ width:1em; height:1em; display:inline-block; vertical-align:-0.125em; flex-shrink:0; }
.icon.hidden{ display:none; } /* Tailwind's .hidden must win over the .icon display rule above */
.icon-16{ width:16px; height:16px; }
.icon-20{ width:20px; height:20px; }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background:#d3cdbf; border-radius:8px; }

.fade-up{ opacity:0; transform:translateY(14px); transition:opacity .5s ease-out, transform .5s ease-out; }
.fade-up.visible{ opacity:1; transform:translateY(0); }

/* Buttons + links: subtle lift/arrow-nudge on hover for a more alive feel. */
.btn{ transition: transform .15s ease-out, box-shadow .15s ease-out, background-color .15s ease-out; }
.btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 22px rgba(24,22,15,.12); }
.btn:active{ transform: translateY(0); box-shadow:none; }
a.accent-text{ transition: color .15s ease-out; }
a.accent-text svg{ transition: transform .18s ease-out; }
a.accent-text:hover svg{ transform: translateX(3px); }

/* Decorative product-visual panels: a slow, subtle gradient drift. Frozen
   by the prefers-reduced-motion block below. */
.gradient-shimmer{ background-size:180% 180% !important; animation: beaconGradientShift 10s ease-in-out infinite; }
@keyframes beaconGradientShift{
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Chart polylines (homepage insights panel + AEO Insights page): draw the
   line in on first reveal instead of appearing instantly. */
.chart-line{ stroke-dasharray:1400; stroke-dashoffset:1400; animation: beaconDrawLine 1.3s ease-out .1s forwards; }
.chart-fill{ opacity:0; animation: beaconFadeIn .9s ease-out .5s forwards; }
@keyframes beaconDrawLine{ to{ stroke-dashoffset:0; } }
@keyframes beaconFadeIn{ to{ opacity:1; } }

.stat-counter{ font-variant-numeric: tabular-nums; }

.stagger-item{ opacity:0; transform:translateY(8px); animation: beaconStaggerIn .5s ease-out forwards; }
.stagger-item:nth-child(1){ animation-delay:.05s; }
.stagger-item:nth-child(2){ animation-delay:.15s; }
.stagger-item:nth-child(3){ animation-delay:.25s; }
.stagger-item:nth-child(4){ animation-delay:.35s; }
@keyframes beaconStaggerIn{ to{ opacity:1; transform:translateY(0); } }

.card-hover{ transition: transform .18s ease-out, box-shadow .18s ease-out; }
.card-hover:hover{ transform: translateY(-3px); box-shadow: 0 14px 32px rgba(24,22,15,.09); }

.nav-trigger{ display:flex; align-items:center; gap:4px; min-height:44px; padding:0 4px; background:none; border:0; font:inherit; cursor:pointer; color:inherit; }
.nav-dropdown{
  position:absolute; top:100%; left:0; margin-top:6px; min-width:220px;
  background:#fff; border:1px solid var(--line); border-radius:12px;
  box-shadow:0 16px 40px rgba(24,22,15,.14); padding:8px; opacity:0; visibility:hidden;
  transform: translateY(-6px); transition: opacity .16s ease-out, transform .16s ease-out, visibility .16s;
  z-index:60;
}
.nav-item.open .nav-dropdown{ opacity:1; visibility:visible; transform:translateY(0); }
.nav-dropdown a{ display:block; padding:10px 12px; border-radius:8px; font-size:14px; color:var(--ink-soft); min-height:40px; text-decoration:none; }
.nav-dropdown a:hover{ background:var(--bg-alt); color:var(--ink); }
.chevron-icon{ transition: transform .16s ease-out; }
.nav-item.open .chevron-icon{ transform: rotate(180deg); }

.tab-underline{ position:relative; min-height:44px; background:none; border:0; font:inherit; cursor:pointer; }
.tab-underline.active{ color: var(--ink); }
.tab-underline.active::after{ content:''; position:absolute; left:0; right:0; bottom:-1px; height:2px; background: var(--accent-btn); }

.accordion-btn{ min-height:56px; background:none; border:0; font:inherit; cursor:pointer; width:100%; }
.accordion-content{ max-height:0; overflow:hidden; transition:max-height .3s ease-out; }
.accordion-chevron{ transition: transform .25s ease-out; }
.accordion-btn[aria-expanded="true"] .accordion-chevron{ transform: rotate(180deg); }

.checklist{ list-style:none; padding:0; margin:0; }
.checklist li{ display:flex; align-items:flex-start; gap:10px; }
.checklist svg{ flex-shrink:0; margin-top:3px; color: var(--accent-btn); }

.toggle-group{ display:inline-flex; border-radius:999px; border:1px solid var(--line); padding:4px; gap:2px; }
.toggle-btn{ min-height:40px; padding:0 18px; border-radius:999px; font-size:14px; font-weight:600; color:var(--ink-soft); transition: background-color .15s, color .15s; background:none; border:0; cursor:pointer; }
.toggle-btn[aria-pressed="true"]{ background:var(--ink); color:#fff; }

input[type="text"], input[type="email"], input[type="url"], input[type="password"]{ min-height:48px; font-size:16px; }
.visually-hidden{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* AI agent chat (assets/js/main.js) */
.agent-messages{ max-height:280px; overflow-y:auto; padding:.25rem .25rem .5rem; scroll-behavior:smooth; }
.agent-msg{ padding:.6rem .9rem; border-radius:.75rem; margin-bottom:.5rem; font-size:.875rem; line-height:1.45; max-width:88%; word-wrap:break-word; }
.agent-msg.user{ background:var(--ink); color:#fff; margin-left:auto; }
.agent-msg.assistant{ background:var(--bg-alt); color:var(--ink); margin-right:auto; }
.agent-msg.thinking{ opacity:.65; }
#agentForm:focus-within{ outline:2px solid var(--focus); outline-offset:1px; }
#agentSend:disabled{ opacity:.7; cursor:not-allowed; }

table.compare th, table.compare td{ border-color: rgba(255,255,255,0.1); }
table.compare tbody tr:hover td{ background: rgba(255,255,255,0.03); }

.mobile-panel{ transition: transform .22s ease-out, opacity .22s ease-out; }

/* Site logo: works for both the bundled default image and a real
   Customizer-uploaded logo (the_custom_logo() output), independent of
   whether the Tailwind utility file has loaded — a hard safety net
   against oversized/unscaled logos. */
.site-logo img,
.site-logo .custom-logo{ display:block; height:32px; width:auto; max-width:220px; object-fit:contain; }
.site-logo--footer img,
.site-logo--footer .custom-logo{ height:24px; }

/* Footer widget area (register_sidebar 'footer-1'): styles any default
   WordPress widget (Categories, Archives, Meta, Recent Posts, etc.) a
   site owner drops in via Appearance > Widgets > Footer, so it reads
   legibly on the dark footer instead of appearing unstyled. */
.footer-widget{ font-size:14px; color:var(--on-dark-faint); }
.footer-widget h2, .footer-widget .widgettitle{ font-size:14px; font-weight:600; color:#fff; margin:0 0 12px; }
.footer-widget ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.footer-widget a{ color:var(--on-dark-faint); text-decoration:none; }
.footer-widget a:hover{ color:#fff; }
.footer-widget select{ background:var(--dark-card); color:#fff; border:1px solid rgba(255,255,255,.15); border-radius:6px; padding:6px 8px; max-width:100%; }

/* Beacon AI Settings admin page (Appearance → Beacon AI Settings) */
.beacon-ai-clear{ margin-left:12px; font-weight:normal; }
.beacon-ai-diagnostics{ list-style:none; margin:0; padding:0; max-width:760px; }
.beacon-ai-diagnostics li{ padding:6px 0; border-bottom:1px solid #e2e4e7; }

/* WordPress core alignment helpers, used if editor blocks are ever inserted into page.php content */
.alignleft{ float:left; margin:0 1.5em 1em 0; }
.alignright{ float:right; margin:0 0 1em 1.5em; }
.aligncenter{ display:block; margin:0 auto 1em; }
.screen-reader-text{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
  .fade-up{ opacity:1; transform:none; }
}
