/* ==========================================================================
   Onyx Strategies marketing site · styles.css
   Built on the Onyx "Paper & Onyx" design system (css/tokens.css).
   Components read only the alias tokens (--color-*, --theme-*, --radius-*,
   --space-*, --text-*). Never hardcode brand colors here; change tokens.
   Breakpoints: 1024px (tablet), 768px (small tablet), 480px (phone).
   ========================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--color-paper); color: var(--color-text);
  font-family: var(--theme-font-body); font-size: var(--text-base); line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; }
section[id], main [id] { scroll-margin-top: 80px; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--color-inverse); color: var(--color-on-inverse); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--theme-font-display); color: var(--color-text); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.4vw, var(--text-6xl)); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); font-weight: var(--weight-bold); }
h2 { font-size: clamp(1.875rem, 3.4vw, 2.5rem); line-height: 1.15; letter-spacing: var(--tracking-display); font-weight: var(--weight-bold); }
h3 { font-size: var(--text-xl); line-height: 1.35; letter-spacing: -0.01em; font-weight: var(--weight-semibold); }
.accent { font-family: var(--theme-font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--theme-accent-text); }
.eyebrow, .mono-label { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-muted); }
.eyebrow { margin-bottom: var(--space-3); }
.lead { font-size: var(--text-lg); color: var(--color-muted); max-width: 40rem; }
.visual-note { font-size: var(--text-xs); color: var(--color-muted); }

/* ---------- Placeholders (must stay visible until content is final) ---------- */
.placeholder {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1.4;
  color: var(--warning-600); background: var(--warning-50);
  border: 1.5px dashed var(--warning-600); border-radius: var(--radius-xs);
}
.placeholder::before { content: "TODO"; font-size: 10px; letter-spacing: .08em; padding: 1px 5px; border-radius: 3px; background: var(--warning-600); color: #fff; }
.placeholder-sm { padding: 0 6px; font-size: 11px; }
.placeholder-sm::before { display: none; }
.placeholder-inverse { color: #F4D9A0; background: rgba(244, 217, 160, .08); border-color: #F4D9A0; min-height: 48px; padding: 0 16px; }
.placeholder-inverse::before { background: #F4D9A0; color: var(--onyx-900); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h); padding: 0 var(--pad-control-x); border: 1px solid transparent; border-radius: var(--radius-sm);
  font: var(--weight-semibold) var(--text-sm)/1 var(--theme-font-body); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn-primary { background: var(--theme-primary); color: var(--theme-primary-ink); }
.btn-primary:hover { background: var(--onyx-700); }
.btn-accent { background: var(--theme-accent); color: var(--theme-accent-ink); }
.btn-accent:hover { background: var(--peach-300); }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { border-color: var(--ash-300); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 36px; padding: 0 14px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-neutral { background: var(--color-sunken); color: var(--color-text-2); }
.badge-accent { background: var(--peach-100); color: var(--ember-800); }
.badge-success { background: var(--success-50); color: var(--success-600); }
.badge-warning { background: var(--warning-50); color: var(--warning-600); }
.badge-info { background: var(--info-50); color: var(--info-600); }

/* ---------- Cards ---------- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--pad-card); box-shadow: var(--shadow-1); }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--color-muted); font-size: 15px; }
.card-hover { transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard); }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.icon-tile { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--color-sunken); display: grid; place-items: center; margin-bottom: var(--space-5); color: var(--theme-accent-text); }
.icon-tile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout helpers ---------- */
.band { padding: var(--pad-section) 0; }
.band-sunken { background: var(--color-sunken); border-top: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); }
.section-head { max-width: 40rem; margin-bottom: var(--space-12); }
.section-head h2 { margin-bottom: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }

/* ---------- Nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--color-paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--color-divider); }
.nav-inner { height: 64px; display: flex; align-items: center; gap: var(--space-8); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--theme-font-display); font-weight: var(--weight-bold); font-size: 17px; letter-spacing: -0.02em; color: var(--color-text); }
.brand-mark { width: 30px; height: auto; }
.nav-links { display: flex; gap: var(--space-6); flex: 1; }
.nav-links a { text-decoration: none; color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-medium); transition: color var(--dur-fast); }
.nav-links a:hover { color: var(--color-text); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 88px 0 var(--space-24); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--color-text) 9%, transparent) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(#000 20%, transparent 90%); mask-image: linear-gradient(#000 20%, transparent 90%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: var(--space-16); align-items: center; }
.hero h1 { margin-bottom: var(--space-6); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.checks { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: var(--space-6); font-size: var(--text-sm); color: var(--color-text-2); }
.checks li { display: inline-flex; align-items: center; gap: 8px; }
.checks li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--peach-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%237F3328' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.hero-visual { display: flex; flex-direction: column; gap: var(--space-3); align-items: center; }
.hero-visual .visual-note { align-self: flex-end; }

/* ---------- Product window (shared by hero + alerts) ---------- */
.window { width: 100%; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); box-shadow: var(--shadow-3); overflow: hidden; }
.window-bar { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 16px; background: var(--color-sunken); border-bottom: 1px solid var(--color-divider); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--color-border); }
.window-bar span { margin-left: 10px; font: 12px var(--font-mono); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.mock-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3); }
.mock-title { font-family: var(--theme-font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.015em; }
.mock-progress { display: flex; gap: 6px; }
.mock-progress span { flex: 1; height: 6px; border-radius: 99px; background: var(--color-divider); }
.mock-progress .done { background: var(--theme-primary); }
.mock-progress .now { background: var(--theme-accent); }
.mock-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.mock-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.mock-num { font-family: var(--theme-font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; line-height: 1.15; }
.mock-list { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.mock-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 12px 16px; font-size: var(--text-sm); font-weight: 500; border-bottom: 1px solid var(--color-divider); }
.mock-list li:last-child { border-bottom: 0; }

/* ---------- Process ---------- */
.steps { counter-reset: none; }
.step-num { display: flex; align-items: center; gap: var(--space-2); font: 500 13px var(--font-mono); color: var(--theme-accent-text) !important; margin-bottom: var(--space-4); height: 22px; }
.step-num .badge { font-family: var(--theme-font-body); }

/* ---------- Who we help ---------- */
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: start; }
.fit-grid .section-head { margin-bottom: 0; }
.fit-list { display: flex; flex-direction: column; border-top: 1px solid var(--color-border); }
.fit-list li { display: flex; gap: var(--space-5); padding: var(--space-6) 0; border-bottom: 1px solid var(--color-border); }
.fit-num { font: 500 13px var(--font-mono); color: var(--theme-accent-text); padding-top: 4px; }
.fit-list h3 { margin-bottom: 4px; }
.fit-list p { color: var(--color-muted); }

/* ---------- Contact ---------- */
.contact { padding: 0 0 var(--space-16); }
.contact-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-10); align-items: center;
  background: var(--color-inverse); color: var(--color-on-inverse); border-radius: var(--radius-xl); padding: var(--space-16) var(--space-12); }
.contact-card h2 { color: inherit; margin-bottom: var(--space-4); }
.contact-card .accent { color: var(--peach-400); }
.contact-card p { color: color-mix(in srgb, var(--color-on-inverse) 72%, transparent); font-size: var(--text-lg); max-width: 34rem; }
.contact-actions { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: var(--space-3); }
.contact-actions .btn { white-space: normal; text-align: center; }
.contact-watermark { position: absolute; right: -48px; bottom: -70px; width: 280px; height: auto; opacity: .06; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { padding: var(--space-10) 0 var(--space-16); font-size: 13px; color: var(--color-muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-6); border-top: 1px solid var(--color-divider); padding-top: var(--space-8); }
.site-footer > .container { border: 0; }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-brand .brand { font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: flex-start; }
.footer-links a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: var(--color-text); }

/* ---------- Reveal motion ---------- */
.reveal { animation: reveal var(--dur-enter) var(--ease-enter) both; }
.hero-visual.reveal { animation-delay: 120ms; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   BEGIN: DAILY ALERTS SHOWCASE styles (delete with the #alerts section)
   12s loop: new email arrives, cursor clicks, email opens, rows reveal.
   ========================================================================== */
.alerts-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-16); align-items: center; }
.alerts-copy h2 { margin-bottom: var(--space-4); }
.alerts-steps { margin-top: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); counter-reset: alerts; }
.alerts-steps li { counter-increment: alerts; display: grid; grid-template-columns: 32px 1fr; column-gap: var(--space-4); }
.alerts-steps li::before { content: counter(alerts); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface); border: 1px solid var(--color-border); font: 500 13px var(--font-mono); color: var(--theme-accent-text); }
.alerts-steps b { font-weight: 600; }
.alerts-steps span { color: var(--color-muted); font-size: 15px; }
.alerts-stage { position: relative; height: 360px; }
.alerts-inbox, .alerts-mail { position: absolute; inset: 0; padding: var(--space-5); }
.alerts-inbox { animation: alerts-inbox 12s var(--ease-standard) infinite; }
.alerts-inbox .mono-label { margin: 0 0 var(--space-2) 4px; }
.alerts-row { display: flex; gap: var(--space-3); align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-md); border-bottom: 1px solid var(--color-divider); }
.alerts-row > div { flex: 1; min-width: 0; }
.alerts-row p { font-size: 13px; line-height: 1.45; }
.alerts-row p:first-child { display: flex; justify-content: space-between; gap: 8px; }
.alerts-row p:first-child span { color: var(--color-muted); font-size: 12px; }
.alerts-subj { font-weight: 600; font-size: 13.5px; }
.alerts-prev { color: var(--color-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.alerts-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--theme-primary); color: var(--theme-primary-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.alerts-avatar-muted { background: var(--color-sunken); }
.alerts-row-new { animation: alerts-new 12s var(--ease-standard) infinite; }
.alerts-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--theme-accent); }
.alerts-cursor { position: absolute; left: 0; top: 0; animation: alerts-cursor 12s var(--ease-standard) infinite; }
.alerts-mail { opacity: 0; animation: alerts-mail 12s var(--ease-standard) infinite; display: flex; flex-direction: column; gap: var(--space-3); }
.alerts-mail-head { display: flex; gap: var(--space-3); align-items: center; padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-divider); }
.alerts-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.alerts-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; }
.alerts-card .placeholder { font-size: 12px; }
.alerts-meter-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.alerts-meter { height: 8px; border-radius: 99px; background: var(--color-divider); overflow: hidden; }
.alerts-meter span { display: block; height: 100%; width: 70%; background: var(--theme-accent); border-radius: inherit; animation: alerts-meter 12s var(--ease-standard) infinite; transform-origin: left; }
.alerts-r1, .alerts-r2, .alerts-r3, .alerts-r4 { animation: 12s var(--ease-enter) infinite; }
.alerts-r1 { animation-name: alerts-r1; } .alerts-r2 { animation-name: alerts-r2; } .alerts-r3 { animation-name: alerts-r3; } .alerts-r4 { animation-name: alerts-r4; }
@keyframes alerts-inbox { 0%, 46% { opacity: 1; } 50%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes alerts-mail { 0%, 47% { opacity: 0; transform: translateY(6px); } 52%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes alerts-new { 0%, 6% { opacity: 0; transform: translateY(-10px); } 12% { opacity: 1; transform: none; background: transparent; } 20%, 46% { background: var(--peach-50); } 100% { opacity: 1; } }
@keyframes alerts-cursor { 0%, 18% { transform: translate(380px, 300px); opacity: 0; } 22% { opacity: 1; } 36% { transform: translate(220px, 60px); } 40% { transform: translate(220px, 60px) scale(.85); } 44% { transform: translate(220px, 60px) scale(1); opacity: 1; } 48%, 100% { opacity: 0; transform: translate(220px, 60px); } }
@keyframes alerts-r1 { 0%, 54% { opacity: 0; transform: translateY(6px); } 58%, 100% { opacity: 1; transform: none; } }
@keyframes alerts-r2 { 0%, 60% { opacity: 0; transform: translateY(6px); } 64%, 100% { opacity: 1; transform: none; } }
@keyframes alerts-r3 { 0%, 66% { opacity: 0; transform: translateY(6px); } 70%, 100% { opacity: 1; transform: none; } }
@keyframes alerts-r4 { 0%, 72% { opacity: 0; } 76%, 100% { opacity: 1; } }
@keyframes alerts-meter { 0%, 68% { transform: scaleX(0); } 80%, 100% { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .alerts-inbox { display: none; }
  .alerts-mail, .alerts-r1, .alerts-r2, .alerts-r3, .alerts-r4, .alerts-meter span { animation: none; opacity: 1; transform: none; }
}
@media (max-width: 1024px) { .alerts-grid { grid-template-columns: 1fr; gap: var(--space-10); } .alerts-demo { max-width: 560px; } }
@media (max-width: 480px) { .alerts-stage { height: 380px; } .alerts-inbox, .alerts-mail { padding: var(--space-4); } }
/* END: DAILY ALERTS SHOWCASE styles */

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --pad-section: 80px; }
  .hero { padding-top: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-12); }
  .hero-visual { max-width: 560px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .fit-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .contact-card { grid-template-columns: 1fr; padding: var(--space-12) var(--space-8); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .section-head { margin-bottom: var(--space-8); }
}
@media (max-width: 480px) {
  :root { --pad-section: 64px; --gutter: 20px; }
  .hero { padding: 48px 0 64px; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; }
  .brand span { font-size: 16px; }
  .nav-cta { height: 34px; padding: 0 12px; font-size: 13px; }
  .window-body { padding: var(--space-4); }
  .contact-card { padding: var(--space-10) var(--space-6); }
  .placeholder { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .btn, .card-hover { animation: none; transition: none; }
}

/* If the alerts section is removed, services follows the hero directly: tighten the gap. */
.hero + #services { padding-top: var(--space-6); }
