/* Shared site foundations. Keep page-specific layout styles in each page folder. */
:root {
  --site-ink: #01062C;
  --site-page: #F6F8FB;
  --site-mint: #3FE0A3;
}

html { scroll-behavior: smooth; }

/* ── Global footer ─────────────────────────────────────────────────────── */
.site-footer { background: #01062C; color: #fff; font-family: 'Inter', sans-serif; }
.site-footer a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 14px; transition: color 0.15s; }
.site-footer a:hover { color: #fff; }
.footer-inner { max-width: 1232px; margin: 0 auto; padding: 64px 24px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 64px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; }
.footer-tagline { color: rgba(255,255,255,0.6); font-size: 15px; flex: 1; min-width: 160px; }
.footer-contact { display: inline-block; padding: 12px 32px; background: #3FE0A3; color: #01062C !important; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.footer-contact:hover { background: #35c98f; color: #01062C !important; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 64px; margin-bottom: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h3 { color: #fff; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: rgba(255,255,255,0.4); gap: 16px; flex-wrap: wrap; }
.footer-bottom-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom-sep { color: rgba(255,255,255,0.2); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

.footer-brand-link { display: inline-block; line-height: 0; text-decoration: none; }
.footer-bottom-links .footer-brand-link { margin-right: 4px; }

.footer-social { display: flex; align-items: center; gap: 16px; }
.footer-social a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.6) !important; transition: background 0.15s, color 0.15s; }
.footer-social a:hover { background: rgba(255,255,255,0.1); color: #fff !important; }
.footer-social svg { display: block; }

/* theme toggle — only shown on AI pages */
.footer-theme { display:none; align-items:center; gap:12px; font-size:14px; padding:0; border:0; background:transparent; color:rgba(255,255,255,0.6); font:inherit; font-size:13px; cursor:pointer; transition:color .2s; }
.footer-theme:hover { color:#fff; }
.footer-theme__track { position:relative; flex:none; display:block; width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,0.05); border:0; transition:background .3s ease, border-color .3s ease; }
.footer-theme:hover .footer-theme__track { background:rgba(255,255,255,0.1); }
.footer-theme[aria-pressed="true"] .footer-theme__track { background:rgba(255,255,255,0.05); }
.footer-theme__knob { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; border-radius:50%; background:transparent; color:rgba(255,255,255,0.6); transition:transform .32s cubic-bezier(0.34,1.4,0.64,1); }
.footer-theme[aria-pressed="true"] .footer-theme__knob { transform:none; background:transparent; }
.footer-theme:hover .footer-theme__knob { color:#fff; }
.footer-theme__knob svg { width:16px; height:16px; display:block; flex:none; }
.footer-theme__moon, .footer-theme[aria-pressed="true"] .footer-theme__sun { display:none !important; }
.footer-theme[aria-pressed="true"] .footer-theme__moon { display:block !important; }
.footer-theme__lab { display:none; }
html[data-ai-page] .footer-theme { display:inline-flex; }

/* AI pages: theme toggle takes the logo's place, links centred */
html[data-ai-page] .footer-bottom { position:relative; }
html[data-ai-page] .footer-bottom-links .footer-brand-link { display:none; }
html[data-ai-page] .footer-bottom-links { justify-content:flex-start; flex:1; }
html[data-ai-page] .footer-bottom .footer-theme { order:1; margin-left:auto; }
@media (max-width:768px) { html[data-ai-page] .footer-bottom-links { justify-content:flex-start; } }

/* AI pages: Supabase-like footer layout — brand block left, link columns right */
.footer-brand { display:none; }
.footer-brand-tag { margin:16px 0 0; font-size:14px; line-height:1.5; color:rgba(255,255,255,0.5); max-width:220px; }
@media (max-width:1080px) { html[data-ai-page] .footer-brand-tag { max-width:none; white-space:nowrap; } }
@media (max-width:640px) {
  html[data-ai-page] .footer-brand { align-items:center; text-align:center; }
  html[data-ai-page] .footer-brand .footer-social { justify-content:center; }
  html[data-ai-page] .footer-bottom { flex-direction:column; align-items:center; gap:14px; }
  html[data-ai-page] .footer-bottom-links { gap:8px; flex-wrap:nowrap; white-space:nowrap; font-size:11.5px; flex:none; justify-content:center; }
  html[data-ai-page] .footer-bottom-links a, html[data-ai-page] .footer-bottom-links span { font-size:11.5px; }
  html[data-ai-page] .footer-bottom .footer-theme { margin-left:0; order:1; }
}
html[data-ai-page] .footer-brand { display:flex; grid-row:1 / span 2; padding-right:24px; }
html[data-ai-page] .footer-brand .footer-brand-link { margin-top:2px; }
html[data-ai-page] .footer-brand .footer-social { display:flex; margin-top:18px; }
html[data-ai-page] .footer-brand-tag { margin-top:14px; }
.footer-brand .footer-social { display:none; }
html[data-ai-page] .footer-bottom > .footer-social { display:none; }
html[data-ai-page] .footer-grid { grid-template-columns:1.5fr repeat(4, 1fr); gap:40px 48px; }
@media (max-width:1080px) {
  html[data-ai-page] .footer-grid { grid-template-columns:repeat(3, 1fr); }
  html[data-ai-page] .footer-brand { grid-column:1 / -1; grid-row:auto; padding-right:0; }
}
@media (max-width:640px) {
  html[data-ai-page] .footer-grid { grid-template-columns:repeat(2, 1fr); }
}

/* nav theme toggle (AI pages only) */
.nav-theme { display:none; border:0; background:transparent; padding:0; cursor:pointer; }
html[data-ai-page] .nav-theme--desktop { display:inline-flex; }
.nav-theme .footer-theme__track { width:36px; height:36px; background:transparent; }
.nav-theme:hover .footer-theme__track { background:rgba(1,6,44,0.07); }
.nav-theme .footer-theme__knob { color:rgba(1,6,44,0.38); }
.nav-theme:hover .footer-theme__knob { color:#01062C; }
html[data-theme="dark"] .nav-theme .footer-theme__track { background:transparent; }
html[data-theme="dark"] .nav-theme:hover .footer-theme__track { background:rgba(255,255,255,0.1); }
html[data-theme="dark"] .nav-theme .footer-theme__knob { color:rgba(255,255,255,0.42); }
html[data-theme="dark"] .nav-theme:hover .footer-theme__knob { color:#fff; }
.nav-theme--mobile { margin-left:auto; margin-right:10px; }
@media (max-width:1080px) {
  html[data-ai-page] .nav-theme--desktop { display:none; }
}
.nav-theme--mobile { display:none !important; }
@media (min-width:1081px) { .nav-theme--mobile { display:none !important; } }
