/*
Theme Name:   The Tig AI
Theme URI:    https://thetigai.com
Author:       The Tig AI
Description:  Site-wide theme for thetigai.com. Ships the same 4 named themes as
              The Tig AI desktop app and the members' web app (Dark Steel,
              Midnight Road, Solar Flare, Clean Pro). Logged-out visitors see a
              fixed brand look (Dark Steel by default, admin-configurable);
              logged-in members can switch themes for their whole site session,
              matching whatever they picked in the app.
Version:      0.3.2
Requires PHP: 8.0
Text Domain:  thetigai-theme
*/

/* ── Theme tokens — identical values to wp-plugin/thetigai-app/assets/css/app.css
   so the marketing site, the members' app, and the desktop app never drift. ── */

body {
	--tig-bg:          #0d1420;
	--tig-sb:          #090d18;
	--tig-accent:      #4dd9ac;
	--tig-accent-dim:  #0d2a22;
	--tig-accent-hi:   #6de8bc;
	--tig-text:        #e8e8f0;
	--tig-muted:       #6a729a;
	--tig-div:         #1c2644;
	--tig-user-bg:     #131c34;
	--tig-user-text:   #b8b8d8;
	--tig-inp:         #131c34;
	--tig-inp-text:    #6a729a;
	--tig-send-bg:     #4dd9ac;
	--tig-send-text:   #051810;
	--tig-nav-act:     #131c34;
	--tig-stat:        #4dd9ac;
	--tig-badge-bg:    #0d2a22;
	--tig-badge-text:  #4dd9ac;

	--tig-r:      0px;
	--tig-r-lg:   0px;
	--tig-r-pill: 16px;
}

body[data-theme="steel"] {
	--tig-bg: #0d1420; --tig-sb: #090d18; --tig-accent: #4dd9ac; --tig-accent-dim: #0d2a22;
	--tig-accent-hi: #6de8bc; --tig-text: #e8e8f0; --tig-muted: #6a729a; --tig-div: #1c2644;
	--tig-user-bg: #131c34; --tig-user-text: #b8b8d8; --tig-inp: #131c34; --tig-inp-text: #6a729a;
	--tig-send-bg: #4dd9ac; --tig-send-text: #051810; --tig-nav-act: #131c34; --tig-stat: #4dd9ac;
	--tig-badge-bg: #0d2a22; --tig-badge-text: #4dd9ac;
}

body[data-theme="midnight"] {
	--tig-bg: #0d1117; --tig-sb: #090d13; --tig-accent: #58a6ff; --tig-accent-dim: #0d2040;
	--tig-accent-hi: #79bfff; --tig-text: #e6edf3; --tig-muted: #8b949e; --tig-div: #21262d;
	--tig-user-bg: #161b22; --tig-user-text: #c9d1d9; --tig-inp: #161b22; --tig-inp-text: #8b949e;
	--tig-send-bg: #58a6ff; --tig-send-text: #0d2040; --tig-nav-act: #161b22; --tig-stat: #58a6ff;
	--tig-badge-bg: #0d2040; --tig-badge-text: #58a6ff;
}

body[data-theme="solar"] {
	--tig-bg: #1a1206; --tig-sb: #120d04; --tig-accent: #f59e0b; --tig-accent-dim: #3d2d10;
	--tig-accent-hi: #fbbf24; --tig-text: #fef3c7; --tig-muted: #a07830; --tig-div: #3d2d10;
	--tig-user-bg: #292010; --tig-user-text: #fde68a; --tig-inp: #292010; --tig-inp-text: #a07830;
	--tig-send-bg: #f59e0b; --tig-send-text: #1a0800; --tig-nav-act: #292010; --tig-stat: #f59e0b;
	--tig-badge-bg: #3d2d10; --tig-badge-text: #f59e0b;
}

body[data-theme="clean"] {
	--tig-bg: #f4f6f9; --tig-sb: #ffffff; --tig-accent: #2563eb; --tig-accent-dim: #dbeafe;
	--tig-accent-hi: #3b82f6; --tig-text: #1e293b; --tig-muted: #64748b; --tig-div: #e2e8f0;
	--tig-user-bg: #dbeafe; --tig-user-text: #1e40af; --tig-inp: #ffffff; --tig-inp-text: #94a3b8;
	--tig-send-bg: #2563eb; --tig-send-text: #ffffff; --tig-nav-act: #eff6ff; --tig-stat: #16a34a;
	--tig-badge-bg: #dbeafe; --tig-badge-text: #1e40af;
}

body[data-corners="rounded"] { --tig-r: 7px; --tig-r-lg: 10px; }
body[data-corners="pill"]    { --tig-r: 14px; --tig-r-lg: 18px; }

/* ── Base ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body {
	margin: 0;
	background: var(--tig-bg);
	color: var(--tig-text);
	font-family: system-ui, -apple-system, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	transition: background 0.2s, color 0.2s;
}
a { color: var(--tig-accent); text-decoration: none; }
a:hover { color: var(--tig-accent-hi); }
h1, h2, h3, h4 { letter-spacing: -0.3px; font-weight: 700; margin: 0 0 0.5em; }
img { max-width: 100%; height: auto; }
.tig-wrap { max-width: 1280px; margin: 0 auto; padding: 0 40px; }

/* ── Header / nav ─────────────────────────────────────────────────────────── */
.tig-site-header {
	border-bottom: 0.5px solid var(--tig-div);
	background: var(--tig-sb);
}
.tig-nav {
	display: flex; align-items: center; justify-content: space-between;
	max-width: 1280px; margin: 0 auto;
	padding: 18px 40px;
}
.tig-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tig-text); }
.tig-brand:hover { color: var(--tig-text); opacity: 0.88; }
.tig-brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tig-text); }
.tig-brand-link:hover { color: var(--tig-text); opacity: 0.88; }
.tig-brand .tig-dot { width: 22px; height: 22px; border-radius: var(--tig-r, 5px); background: var(--tig-accent); flex: none; }

/* SVG mark inline in header */
.tig-mark-svg { display: block; flex: none; }

/* Wordmark: THE / Tig / AI */
.tig-logo-wm {
	display: flex;
	flex-direction: column;
	line-height: 1;
	gap: 1px;
}
.tig-logo-the {
	font-family: 'Syne', sans-serif;
	font-size: 8px;
	font-weight: 400;
	color: #4dd9ac;
	letter-spacing: 0.3em;
	text-transform: uppercase;
}
.tig-logo-name {
	font-family: 'Syne', sans-serif;
	font-size: 26px;
	font-weight: 800;
	color: var(--tig-text);
	letter-spacing: -0.025em;
	line-height: 0.95;
}
.tig-logo-ai {
	font-size: 11px;
	font-weight: 600;
	color: #4dd9ac;
	letter-spacing: 0.14em;
	vertical-align: baseline;
	margin-left: 2px;
}

/* When WP custom-logo is uploaded via Customizer */
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { height: 88px; width: auto; display: block; }
.tig-navlinks { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.tig-navlinks a { color: var(--tig-text); font-size: 14px; font-weight: 500; }
.tig-navlinks a:hover { color: var(--tig-accent); }
.tig-nav-right { display: flex; align-items: center; gap: 14px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.tig-btn {
	display: inline-block; cursor: pointer;
	border-radius: var(--tig-r); padding: 10px 22px; font-weight: 600;
	border: 1px solid var(--tig-accent); background: transparent; color: var(--tig-accent);
	font-family: inherit; font-size: 14px; text-decoration: none;
	transition: background 0.15s;
}
.tig-btn:hover { background: var(--tig-accent-dim); color: var(--tig-accent); }
.tig-btn-primary { background: var(--tig-send-bg); color: var(--tig-send-text); border-color: var(--tig-send-bg); }
.tig-btn-primary:hover { background: var(--tig-accent-hi); border-color: var(--tig-accent-hi); color: var(--tig-send-text); }

/* ── Theme switcher (logged-in members only) ─────────────────────────────── */
.tig-theme-switcher { position: relative; }
.tig-theme-switcher-toggle {
	display: flex; align-items: center; gap: 6px; cursor: pointer;
	background: transparent; border: 0.5px solid var(--tig-div); border-radius: var(--tig-r-pill);
	padding: 5px 12px; color: var(--tig-text); font-size: 13px; font-family: inherit;
}
.tig-theme-switcher-toggle:hover { border-color: var(--tig-accent); }
.tig-theme-switcher-toggle .tig-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tig-accent); }
.tig-theme-switcher-menu {
	display: none;
	position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
	background: var(--tig-sb); border: 0.5px solid var(--tig-div); border-radius: var(--tig-r-lg);
	padding: 12px; min-width: 160px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.tig-theme-switcher.is-open .tig-theme-switcher-menu { display: block; }
.tig-theme-switcher-menu button {
	display: flex; align-items: center; gap: 10px; width: 100%;
	background: transparent; border: none; cursor: pointer;
	padding: 8px 6px; border-radius: var(--tig-r); color: var(--tig-text); font-family: inherit; font-size: 13px;
	text-align: left;
}
.tig-theme-switcher-menu button:hover { background: var(--tig-nav-act); }
.tig-theme-switcher-menu button.is-active { color: var(--tig-accent); }
.tig-theme-switcher-menu .tig-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.1); }
body[data-theme="clean"] .tig-theme-switcher-menu .tig-dot { box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.tig-hero { padding: 90px 0 70px; text-align: center; }
.tig-hero .tig-tag {
	display: inline-block; font-size: 12px; color: var(--tig-accent);
	border: 1px solid var(--tig-div); border-radius: 20px; padding: 4px 14px; margin-bottom: 20px;
}
.tig-hero h1 { font-size: 44px; max-width: 720px; margin: 0 auto 18px; }
.tig-hero p { font-size: 18px; color: var(--tig-muted); max-width: 560px; margin: 0 auto 30px; }
.tig-hero .tig-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Feature cards ────────────────────────────────────────────────────────── */
.tig-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; padding: 40px 0; }
.tig-card {
	background: var(--tig-sb); border: 0.5px solid var(--tig-div); border-radius: var(--tig-r-lg);
	padding: 26px;
}
.tig-card h3 { font-size: 17px; margin-bottom: 8px; }
.tig-card p { color: var(--tig-muted); font-size: 14px; margin: 0; }

/* ── Content page ─────────────────────────────────────────────────────────── */
.tig-page-content { padding: 50px 0 80px; }
.tig-page-content h1 { font-size: 32px; margin-bottom: 20px; }
.tig-page-content .entry-content { font-size: 16px; }
.tig-page-content .entry-content > * + * { margin-top: 1em; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.tig-site-footer { margin-top: 40px; color: var(--tig-muted); font-size: 13px; }

/* Brand logos section */
.tig-footer-brands { border-top: 0.5px solid var(--tig-div); padding: 52px 0 44px; }
.tig-footer-brand-cols {
	display: flex; justify-content: center; align-items: flex-start;
	gap: 64px; flex-wrap: wrap;
}
.tig-footer-brand-col { display: flex; flex-direction: column; align-items: center; }
.tig-footer-brand-link {
	display: flex; flex-direction: column; align-items: center; gap: 10px;
	text-decoration: none; color: var(--tig-text); transition: opacity 0.2s;
}
.tig-footer-brand-link:hover { opacity: 0.72; color: var(--tig-text); }
.tig-footer-mark-svg { display: block; flex: none; }
.tig-footer-brand-name {
	font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px;
	color: var(--tig-text); line-height: 1;
}
.tig-footer-brand-tag {
	font-size: 12px; color: var(--tig-muted); max-width: 170px;
	line-height: 1.5; text-align: center;
}

/* Affiliate banner zone */
.tig-footer-affiliate { border-top: 0.5px solid var(--tig-div); padding: 28px 0; text-align: center; }
.tig-affiliate-banner-link { display: inline-block; }
.tig-affiliate-banner-img { max-width: 100%; height: auto; border-radius: var(--tig-r); }

/* Bottom bar */
.tig-footer-bottom { border-top: 0.5px solid var(--tig-div); padding: 22px 0; }
.tig-footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.tig-footer-links { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.tig-footer-links a { color: var(--tig-muted); font-size: 13px; }
.tig-footer-links a:hover { color: var(--tig-accent); }

/* ── Small nav button (Download link for logged-in members) ──────────────── */
.tig-btn-sm { padding: 7px 14px; font-size: 13px; }

/* ── Hamburger ────────────────────────────────────────────────────────────── */
.tig-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 2px;
	margin-left: 8px;
}
.tig-hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--tig-text);
	border-radius: 2px;
	transition: transform 0.2s, opacity 0.2s;
}
.tig-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tig-hamburger.is-open span:nth-child(2) { opacity: 0; }
.tig-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ────────────────────────────────────────────────────── */
.tig-mobile-nav {
	display: none;
	background: var(--tig-sb);
	border-top: 0.5px solid var(--tig-div);
	padding: 16px 24px 22px;
}
.tig-mobile-nav.is-open { display: block; }
.tig-mobile-navlinks {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}
.tig-mobile-navlinks li { border-bottom: 0.5px solid var(--tig-div); }
.tig-mobile-navlinks a {
	display: block;
	padding: 12px 0;
	font-size: 15px;
	color: var(--tig-text);
}
.tig-mobile-navlinks a:hover { color: var(--tig-accent); }
.tig-mobile-app-btn { display: block; text-align: center; margin-bottom: 10px; }
.tig-mobile-auth { display: flex; flex-wrap: wrap; gap: 8px; }
.tig-mobile-auth .tig-btn { flex: 1 1 auto; text-align: center; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.tig-faq { margin-top: 10px; }
.tig-faq-section { margin-bottom: 44px; }
.tig-faq-section > h2 {
	font-size: 18px;
	color: var(--tig-accent);
	border-bottom: 0.5px solid var(--tig-div);
	padding-bottom: 10px;
	margin-bottom: 0;
}
.tig-faq-item { border-bottom: 0.5px solid var(--tig-div); }
.tig-faq-q {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 16px 0;
	text-align: left;
	font-size: 15px;
	font-family: inherit;
	color: var(--tig-text);
	font-weight: 500;
	line-height: 1.4;
}
.tig-faq-q:hover { color: var(--tig-accent); }
.tig-faq-chevron { flex-shrink: 0; color: var(--tig-muted); font-size: 16px; transition: transform 0.2s; line-height: 1; }
.tig-faq-q[aria-expanded="true"] .tig-faq-chevron { transform: rotate(180deg); color: var(--tig-accent); }
.tig-faq-a { color: var(--tig-muted); font-size: 14px; line-height: 1.75; padding: 0 0 18px; }
.tig-faq-a p { margin: 0 0 0.7em; }
.tig-faq-a p:last-child { margin-bottom: 0; }
.tig-faq-a code {
	background: var(--tig-div);
	color: var(--tig-accent);
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 12px;
	font-family: monospace;
}
.tig-faq-a a { color: var(--tig-accent); }

/* ── Download page ────────────────────────────────────────────────────────── */
.tig-download-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
}
.tig-download-card {
	background: var(--tig-sb);
	border: 0.5px solid var(--tig-div);
	border-radius: var(--tig-r-lg);
	padding: 28px 22px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
}
.tig-download-card--dim { opacity: .65; }
.tig-download-icon { font-size: 36px; line-height: 1; }
.tig-download-card h3 { font-size: 18px; color: var(--tig-text); margin: 0; }
.tig-download-sub { font-size: 12px; color: var(--tig-muted); margin: 0 0 10px; }
.tig-download-btn { margin-top: auto; width: 100%; text-align: center; }
.tig-btn-disabled {
	display: inline-block;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid var(--tig-div);
	border-radius: var(--tig-r);
	color: var(--tig-muted);
	background: transparent;
	cursor: default;
}
.tig-download-mobile-note { font-size: 12px; color: var(--tig-muted); margin: 0; line-height: 1.5; }
.tig-trial-notice {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
	background: var(--tig-accent-dim);
	border: 0.5px solid var(--tig-accent);
	border-radius: var(--tig-r);
	padding: 14px 18px;
	font-size: 14px;
	color: var(--tig-text);
}

/* ── Auth forms (login / signup / lost-password) ────────────────────────── */
.tig-auth-wrap { display: flex; justify-content: center; align-items: flex-start; padding: 50px 0 80px; }
.tig-auth-card {
	background: var(--tig-sb); border: 0.5px solid var(--tig-div);
	border-radius: var(--tig-r-lg); padding: 36px; width: 100%; max-width: 420px;
}
.tig-auth-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; color: var(--tig-text); }
.tig-auth-desc { font-size: 14px; color: var(--tig-muted); margin-bottom: 18px; }
.tig-auth-error {
	background: rgba(239,68,68,.12); border: 0.5px solid #ef4444;
	color: var(--tig-text); border-radius: var(--tig-r);
	padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.tig-auth-success {
	background: var(--tig-accent-dim); border: 0.5px solid var(--tig-accent);
	color: var(--tig-text); border-radius: var(--tig-r);
	padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.tig-auth-form { display: flex; flex-direction: column; gap: 14px; }
.tig-auth-field { display: flex; flex-direction: column; gap: 5px; }
.tig-auth-field label { font-size: 13px; color: var(--tig-muted); }
.tig-auth-field input {
	background: var(--tig-inp); color: var(--tig-text);
	border: 0.5px solid var(--tig-div); border-radius: var(--tig-r);
	padding: 10px 12px; font-size: 14px; font-family: inherit;
	transition: border-color 0.15s; width: 100%; box-sizing: border-box;
}
.tig-auth-field input:focus { outline: none; border-color: var(--tig-accent); box-shadow: 0 0 0 2px var(--tig-accent-dim); }
.tig-auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.tig-auth-row a { color: var(--tig-accent); font-size: 13px; }
.tig-auth-check { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--tig-muted); }
.tig-auth-check input[type="checkbox"] { accent-color: var(--tig-accent); width: 14px; height: 14px; }
.tig-auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.tig-auth-alt { font-size: 13px; color: var(--tig-muted); text-align: center; margin-top: 16px; }
.tig-auth-alt a { color: var(--tig-accent); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
	.tig-hero h1 { font-size: 30px; }
	.tig-navlinks { display: none; }
	.tig-hamburger { display: flex; }
	.tig-nav-right .tig-btn { display: none; }
	.tig-nav-right { gap: 8px; }
	.tig-nav { padding: 18px 20px; }
	.tig-footer-brand-cols { gap: 36px; }
	.tig-auth-card { padding: 24px 18px; }
}
