/* ============================================================
   SeersWare — site styles. Built on the Kapable token system.
   Theme (dark/light), accent, and density are driven by CSS
   variables + data-attributes the React app sets on .sw-root.
   ============================================================ */

@import url('./ds/colors_and_type.css');

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-default);
  color: var(--fg-default);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Accent indirection: defaults to warm amber, overridden inline ---- */
.sw-root {
  --sw-accent:      var(--accent-warm);
  --sw-accent-hov:  var(--accent-warm-hov);
  --sw-accent-act:  var(--accent-warm-act);
  --sw-accent-soft: var(--accent-warm-soft);
  --sw-accent-line: var(--accent-warm-line);
  --sw-on-accent:   var(--fg-on-accent);

  --sw-section-y: 112px;   /* density: airy */
  --sw-card-pad: 30px;

  background: var(--bg-default);
  color: var(--fg-default);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.sw-root[data-density="compact"] {
  --sw-section-y: 72px;
  --sw-card-pad: 24px;
}

/* ---- Light theme overrides (accents preserved) ---- */
.sw-root[data-theme="light"] {
  --bg-default:  #F7F4ED;
  --bg-raised:   #FFFFFF;
  --bg-sunken:   #ECE7DB;
  --bg-elevated: #FFFFFF;
  --fg-default:  #1B1813;
  --fg-muted:    #595348;
  --fg-subtle:   #6E685C;
  --fg-faint:    #C7C0B0;
  --border-subtle: #E6E0D1;
  --border-default: #D9D2C0;
  --border-strong:  #C7BFAB;
  --shadow-lg: 0 1px 0 rgba(255,255,255,0.6) inset, 0 18px 50px rgba(40,33,20,0.10);
  --shadow-md: 0 1px 0 rgba(255,255,255,0.6) inset, 0 6px 18px rgba(40,33,20,0.08);
}

/* ---- Ambient glow behind hero (warm, low opacity) ---- */
.sw-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.sw-glow::before {
  content: ""; position: absolute; top: -260px; right: -120px;
  width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, var(--sw-accent-soft) 0%, transparent 68%);
  opacity: 0.9;
}
.sw-glow::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 30px 30px; opacity: 0.4;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 60%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 60%);
}

.sw-shell { position: relative; z-index: 1; }
.sw-container { max-width: var(--container-max); margin: 0 auto; padding: 0 32px; }

/* ============================================================
   NAV
   ============================================================ */
.sw-nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-height);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg-default) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.sw-nav .sw-container { display: flex; align-items: center; gap: 32px; width: 100%; }
.sw-brand { display: flex; align-items: center; gap: 11px; cursor: pointer; text-decoration: none; color: var(--fg-default); }
.sw-mark { width: 28px; height: 28px; flex-shrink: 0; }
.sw-wordmark { font-weight: var(--fw-semibold); font-size: 18px; letter-spacing: -0.02em; }
.sw-wordmark b { color: var(--sw-accent); font-weight: var(--fw-semibold); }
.sw-nav-links { display: flex; gap: 26px; margin-left: 12px; }
.sw-nav-links a {
  text-decoration: none; color: var(--fg-muted); font-size: 14px; font-weight: var(--fw-medium);
  transition: color var(--dur-micro) var(--ease-out);
}
.sw-nav-links a:hover { color: var(--fg-default); }
.sw-nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* lang + theme toggles */
.sw-toggle {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  background: transparent; color: var(--fg-muted);
  border: 1px solid var(--border-default); border-radius: var(--r-sm);
  padding: 7px 11px; cursor: pointer; line-height: 1; min-height: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all var(--dur-micro) var(--ease-out);
}
.sw-toggle:hover { color: var(--fg-default); border-color: var(--border-strong); }
.sw-toggle svg { width: 15px; height: 15px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.sw-btn {
  font-family: var(--font-sans); font-size: 14px; font-weight: var(--fw-medium);
  padding: 10px 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  transition: all var(--dur-micro) var(--ease-out); white-space: nowrap;
}
.sw-btn:active { transform: translateY(1px); }
.sw-btn-primary { background: var(--sw-accent); color: var(--sw-on-accent); box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset; }
.sw-btn-primary:hover { background: var(--sw-accent-hov); }
.sw-btn-secondary { background: transparent; color: var(--fg-default); border-color: var(--border-strong); }
.sw-btn-secondary:hover { background: var(--bg-raised); border-color: var(--fg-muted); }
.sw-btn-lg { font-size: 15px; padding: 14px 24px; }
.sw-btn .arr { transition: transform var(--dur-micro) var(--ease-out); }
.sw-btn:hover .arr { transform: translateX(3px); }

/* ============================================================
   SHARED SECTION SCAFFOLD
   ============================================================ */
.sw-section { padding-top: var(--sw-section-y); padding-bottom: var(--sw-section-y); }
.sw-eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--sw-accent);
}
.sw-h2 {
  font-size: clamp(1.9rem, 4vw, var(--fs-3xl)); font-weight: var(--fw-semibold);
  line-height: var(--lh-snug); letter-spacing: var(--tr-tight); color: var(--fg-default);
  margin: 14px 0 0; max-width: 18ch; text-wrap: balance;
}
.sw-section-sub {
  font-size: var(--fs-md); line-height: var(--lh-relaxed); color: var(--fg-muted);
  max-width: 60ch; margin: 18px 0 0;
}
.sw-section-head { margin-bottom: 52px; }

/* ============================================================
   HERO
   ============================================================ */
.sw-hero { padding-top: 84px; padding-bottom: 96px; }
.sw-hero-grid { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 56px; align-items: center; }
.sw-hero-eyebrow {
  font-family: var(--font-mono); font-size: 13px; color: var(--fg-muted);
  letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 10px;
}
.sw-hero-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.sw-h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem); font-weight: var(--fw-semibold);
  line-height: 1.04; letter-spacing: -0.028em; margin: 22px 0 0; text-wrap: balance;
}
.sw-h1 em { color: var(--fg-muted); font-style: italic; font-weight: var(--fw-medium); }
.sw-hero-sub { font-size: var(--fs-md); line-height: 1.6; color: var(--fg-muted); max-width: 52ch; margin: 24px 0 0; }
.sw-hero-cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Hero device (always dark) ---- */
.sw-device {
  --bg-default: #0B0D10; --bg-sunken: #06080A; --fg-default: #F5EFE6;
  --fg-muted: #A8A296; --fg-subtle: #6B6558; --border-subtle: #1B1F26;
  background: #0c0e12; border: 1px solid #1b1f26; border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-lg);
  font-family: var(--font-mono); color: #F5EFE6;
}
.sw-device-bar {
  display: flex; align-items: center; gap: 10px; padding: 11px 15px;
  border-bottom: 1px solid #1b1f26; background: #0a0b0e; font-size: 11.5px; color: #6B6558;
}
.sw-device-dots { display: flex; gap: 6px; }
.sw-device-dots span { width: 10px; height: 10px; border-radius: 50%; background: #2a2f37; }
.sw-device-file { font-size: 11.5px; }
.sw-device-meta { margin-left: auto; font-size: 11px; }
.sw-device-body { display: grid; grid-template-columns: 1fr; }
.sw-yml { padding: 18px 20px; font-size: 13px; line-height: 1.85; overflow-x: auto; }
.sw-yml .l { display: flex; gap: 14px; white-space: nowrap; }
.sw-yml .gut { color: #2c313a; width: 18px; text-align: right; user-select: none; flex-shrink: 0; }
.sw-yml .key { color: var(--sw-accent); }
.sw-yml .val { color: #E5D5B8; }
.sw-yml .str { color: #A8C98A; }
.sw-yml .com { color: rgba(168,162,150,0.55); }
.sw-yml .li { color: #6FC3D4; }
.sw-yml .li::before { content: "- "; color: #4a525d; }
.sw-run {
  border-top: 1px solid #1b1f26; background: #050607; padding: 16px 20px;
  font-size: 12.5px; line-height: 1.85; color: #A8A296;
}
.sw-run .cmd { color: #F5EFE6; }
.sw-run .cmd .p { color: #6FC3D4; }
.sw-run .tag { color: var(--sw-accent); }
.sw-run .ok { color: #6EBF7A; }
.sw-run .ready { color: #6EBF7A; margin-top: 8px; }
.sw-caret { display: inline-block; width: 8px; height: 15px; background: var(--sw-accent); margin-left: 3px; vertical-align: middle; animation: sw-blink 1.1s steps(1) infinite; }
@keyframes sw-blink { 50% { opacity: 0; } }

/* ============================================================
   STATS BAND
   ============================================================ */
.sw-stats { border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); background: var(--bg-raised); }
.sw-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.sw-stat { padding: 40px 28px; border-left: 1px solid var(--border-subtle); }
.sw-stat:first-child { border-left: none; }
.sw-stat-v { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: var(--fw-semibold); letter-spacing: -0.03em; color: var(--fg-default); font-variant-numeric: tabular-nums; }
.sw-stat-v .pos { color: var(--sw-accent); }
.sw-stat-l { font-size: 13.5px; color: var(--fg-muted); margin-top: 8px; line-height: 1.4; max-width: 22ch; }

/* ============================================================
   SERVICES
   ============================================================ */
.sw-svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--r-md); overflow: hidden; }
.sw-svc {
  background: var(--bg-raised); padding: var(--sw-card-pad);
  min-height: 210px; display: flex; flex-direction: column;
  transition: background var(--dur-short) var(--ease-out);
}
.sw-svc:hover { background: var(--bg-elevated); }
.sw-svc-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent-cool); }
.sw-root[data-theme="light"] .sw-svc-tag { color: var(--accent-cool-act); }
.sw-svc-icon { width: 26px; height: 26px; color: var(--sw-accent); margin-bottom: 14px; }
.sw-svc h3 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: -0.01em; margin: 8px 0 10px; color: var(--fg-default); }
.sw-svc p { font-size: 14.5px; line-height: 1.6; color: var(--fg-muted); margin: 0; }
.sw-svc-ret { margin-top: auto; padding-top: 18px; font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-subtle); display: flex; align-items: center; gap: 8px; }
.sw-svc-ret .ck { color: var(--success); }

/* ============================================================
   IMPACT
   ============================================================ */
.sw-impact-list { display: flex; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: var(--r-md); overflow: hidden; }
.sw-impact-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center;
  padding: 30px var(--sw-card-pad); border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-raised); transition: background var(--dur-short) var(--ease-out);
}
.sw-impact-row:last-child { border-bottom: none; }
.sw-impact-row:hover { background: var(--bg-elevated); }
.sw-impact-metric { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: var(--fw-semibold); letter-spacing: -0.03em; color: var(--sw-accent); line-height: 1; font-variant-numeric: tabular-nums; }
.sw-impact-unit { font-size: 12.5px; color: var(--fg-subtle); margin-top: 8px; font-family: var(--font-mono); letter-spacing: 0.02em; }
.sw-impact-body { font-size: var(--fs-md); line-height: 1.55; color: var(--fg-default); max-width: 60ch; text-wrap: pretty; }

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.sw-timeline { display: flex; flex-direction: column; }
.sw-exp {
  display: grid; grid-template-columns: 150px 1fr; gap: 40px;
  padding: 30px 0; border-top: 1px solid var(--border-subtle); position: relative;
}
.sw-exp:last-child { border-bottom: 1px solid var(--border-subtle); }
.sw-exp-period { font-family: var(--font-mono); font-size: 13px; color: var(--fg-subtle); padding-top: 3px; letter-spacing: 0.01em; }
.sw-exp-role { font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: -0.01em; color: var(--fg-default); }
.sw-exp-org { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 3px; margin-bottom: 12px; font-size: 14px; }
.sw-exp-org b { color: var(--sw-accent); font-weight: var(--fw-medium); }
.sw-exp-org span { color: var(--fg-subtle); }
.sw-exp-body { font-size: 15px; line-height: 1.6; color: var(--fg-muted); max-width: 70ch; margin: 0; text-wrap: pretty; }

/* ============================================================
   ABOUT / APPROACH
   ============================================================ */
.sw-about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
.sw-about-body { font-size: var(--fs-lg); line-height: 1.55; color: var(--fg-default); max-width: 40ch; text-wrap: pretty; }
.sw-principles { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-direction: column; gap: 0; }
.sw-principle { display: flex; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--border-subtle); font-size: var(--fs-md); color: var(--fg-default); }
.sw-principle:last-child { border-bottom: 1px solid var(--border-subtle); }
.sw-principle .n { font-family: var(--font-mono); font-size: 13px; color: var(--sw-accent); flex-shrink: 0; }
.sw-meta-card { background: var(--bg-raised); border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: var(--sw-card-pad); }
.sw-meta-block + .sw-meta-block { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--border-subtle); }
.sw-meta-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: 14px; }
.sw-meta-item { font-size: 14px; color: var(--fg-default); line-height: 1.5; padding: 5px 0; }
.sw-lang-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-lang-chip { font-family: var(--font-mono); font-size: 13px; padding: 6px 13px; border: 1px solid var(--border-default); border-radius: var(--r-pill); color: var(--fg-default); }

/* ============================================================
   CONTACT
   ============================================================ */
.sw-contact { border-top: 1px solid var(--border-subtle); }
.sw-contact-card {
  background: var(--bg-raised); border: 1px solid var(--border-subtle); border-radius: var(--r-lg);
  padding: 56px; position: relative; overflow: hidden;
}
.sw-contact-card::before {
  content: ""; position: absolute; top: -120px; right: -80px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, var(--sw-accent-soft) 0%, transparent 70%);
}
.sw-contact-inner { position: relative; z-index: 1; }
.sw-contact h2 { font-size: clamp(2rem, 4vw, var(--fs-3xl)); font-weight: var(--fw-semibold); letter-spacing: -0.02em; line-height: 1.1; margin: 14px 0 0; max-width: 20ch; text-wrap: balance; }
.sw-contact-sub { font-size: var(--fs-md); color: var(--fg-muted); margin: 18px 0 0; max-width: 56ch; line-height: 1.55; }
.sw-contact-actions { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.sw-contact-detail { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px 28px; font-family: var(--font-mono); font-size: 13px; color: var(--fg-subtle); }
.sw-contact-detail a { color: var(--fg-muted); text-decoration: none; }
.sw-contact-detail a:hover { color: var(--sw-accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.sw-footer { border-top: 1px solid var(--border-subtle); padding: 56px 0 48px; }
.sw-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.sw-footer-tag { font-size: 13.5px; color: var(--fg-subtle); margin-top: 12px; max-width: 34ch; line-height: 1.5; }
.sw-footer h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-default); margin: 0 0 14px; }
.sw-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.sw-footer a { text-decoration: none; color: var(--fg-muted); font-size: 14px; }
.sw-footer a:hover { color: var(--sw-accent); }
.sw-footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--fg-subtle); font-family: var(--font-mono); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .sw-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .sw-about-grid { grid-template-columns: 1fr; gap: 36px; }
  .sw-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sw-stat:nth-child(3) { border-left: none; }
  .sw-stat:nth-child(odd) { border-left: none; }
  .sw-svc-grid { grid-template-columns: 1fr; }
  .sw-nav-links { display: none; }
}
@media (max-width: 680px) {
  .sw-container { padding: 0 20px; }
  .sw-impact-row { grid-template-columns: 1fr; gap: 12px; }
  .sw-exp { grid-template-columns: 1fr; gap: 8px; }
  .sw-stats-grid { grid-template-columns: 1fr; }
  .sw-stat { border-left: none !important; border-top: 1px solid var(--border-subtle); }
  .sw-stat:first-child { border-top: none; }
  .sw-contact-card { padding: 32px 24px; }
  .sw-footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .sw-caret { animation: none; }
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
