/* XpMind — shared styles. Static, no build. Light/dark via tokens. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f2ea;
  --bg-raise: #fbf9f4;
  --ink: #1b1d21;
  --sub: #4e5257;
  --accent: #7a5a1e;
  --accent-soft: rgba(122, 90, 30, .09);
  --accent-border: #c9b98f;
  --rule: #e5dfd0;
  --card-border: #e3dcc9;
  --btn-bg: #1b1d21;
  --btn-fg: #f5f2ea;
  --body-weight: 400;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  --max-width: 1100px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --em-color: inherit;
  --bg: #0f1114;
  --bg-raise: #16181c;
  --ink: #e8e5de;
  --sub: #a6a29a;
  --accent: #c9973b;
  --accent-soft: rgba(201, 151, 59, .12);
  --accent-border: rgba(201, 151, 59, .4);
  --rule: #24272c;
  --card-border: #24272c;
  --btn-bg: #e8e5de;
  --btn-fg: #0f1114;
  --body-weight: 300;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --em-color: inherit;
    --bg: #0f1114;
    --bg-raise: #16181c;
    --ink: #e8e5de;
    --sub: #a6a29a;
    --accent: #c9973b;
    --accent-soft: rgba(201, 151, 59, .12);
    --accent-border: rgba(201, 151, 59, .4);
    --rule: #24272c;
    --card-border: #24272c;
    --btn-bg: #e8e5de;
    --btn-fg: #0f1114;
    --body-weight: 300;
    color-scheme: dark;
  }
}

html { font-size: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-weight: var(--body-weight);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(22px, 5vw, 44px); }
section { scroll-margin-top: 84px; }

/* ── Logo theme swap ── */
.logo-img-dark { display: none; }
:root[data-theme="dark"] .logo-img-light { display: none; }
:root[data-theme="dark"] .logo-img-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-img-light { display: none; }
  :root:not([data-theme="light"]) .logo-img-dark { display: block; }
}

/* ── Nav ── */
nav.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 44px);
  display: flex; align-items: center; justify-content: space-between; height: 66px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 24px; width: auto; }
.nav-logo .wordmark { font-size: .95rem; font-weight: 500; color: var(--ink); letter-spacing: .045em; }
.nav-logo:hover { text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 26px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { font-size: .85rem; color: var(--sub); letter-spacing: .02em; }
.nav-back { font-size: .85rem; color: var(--sub); letter-spacing: .02em; }
.nav-back:hover { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  font-size: .8rem !important; font-weight: 500; color: var(--accent) !important;
  border: 1px solid var(--accent-border); padding: 8px 18px; border-radius: 4px;
}
.nav-cta:hover { background: var(--accent-soft); text-decoration: none !important; }

/* Theme toggle — hidden without JS */
.theme-toggle {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 6px;
  background: none; border: 1px solid var(--rule); cursor: pointer; color: var(--sub);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--sub); }
html.js .theme-toggle { display: inline-flex; }
.theme-toggle svg { width: 16px; height: 16px; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-hamburger span { width: 22px; height: 1.5px; background: var(--sub); }
@media (max-width: 680px) {
  .nav-links {
    display: none;
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    background: var(--bg); border-bottom: 1px solid var(--rule);
    padding: 22px clamp(22px, 5vw, 44px); gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: flex; }
}

/* ── Shared type ── */
.section-label {
  font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--accent); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.3rem);
  line-height: 1.2; margin-bottom: 1.4rem; font-weight: 400;
}
.lede { color: var(--sub); font-size: .98rem; max-width: 560px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; background: var(--btn-bg); color: var(--btn-fg);
  font-size: .85rem; font-weight: 600; border: none; border-radius: 4px;
  letter-spacing: .02em; cursor: pointer;
}
.btn-primary:hover { opacity: .92; text-decoration: none; color: var(--btn-fg); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; background: transparent; color: var(--ink);
  font-size: .85rem; font-weight: 500; border: 1px solid var(--card-border); border-radius: 4px;
}
.btn-secondary:hover { border-color: var(--sub); text-decoration: none; color: var(--ink); }

/* ── Hero (ledger) ── */
.hero { padding: clamp(64px, 10vh, 120px) 0 clamp(56px, 8vh, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.hero-eyebrow {
  font-size: .78rem; font-weight: 500; color: var(--accent);
  letter-spacing: .15em; text-transform: uppercase; margin-bottom: 1.4rem;
}
.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem); line-height: 1.12; margin-bottom: 1.2rem;
}
.hero-title em { font-style: italic; color: var(--em-color, var(--accent)); }
.hero-sub { font-size: clamp(.98rem, 1.6vw, 1.08rem); color: var(--sub); max-width: 500px; margin-bottom: 1.9rem; }
.currently { padding-top: .5rem; }
.currently h2 {
  font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem;
}
.currently-item { padding: 12px 0; border-top: 1px solid var(--rule); font-size: .92rem; line-height: 1.5; }
.currently-item .detail { display: block; color: var(--sub); font-size: .8rem; }
@media (prefers-reduced-motion: no-preference) {
  .fade-in { opacity: 0; animation: fadeUp .7s .15s forwards; }
  .fade-in.d2 { animation-delay: .3s; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* ── About ── */
.about { padding: clamp(64px, 9vh, 110px) 0; border-top: 1px solid var(--rule); }
.about-grid { display: grid; grid-template-columns: 1.2fr .9fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.about-text p { color: var(--sub); margin-bottom: 1.2rem; font-size: .95rem; }
.about-text p strong { color: var(--ink); font-weight: 500; }
.about-detail { padding: 13px 0; border-bottom: 1px solid var(--rule); }
.about-detail:first-child { border-top: 1px solid var(--rule); }
.about-detail dt {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--accent); margin-bottom: 2px;
}
.about-detail dd { font-size: .9rem; color: var(--ink); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ── Apps teaser / app rows ── */
.apps-teaser { padding: clamp(48px, 7vh, 80px) 0; border-top: 1px solid var(--rule); }
.app-line { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.app-line:first-of-type { border-top: 1px solid var(--rule); }
.app-line img { width: 22px; height: 22px; border-radius: 6px; }
.app-line .name { font-weight: 500; font-size: .95rem; color: var(--ink); }
.app-line .blurb { font-size: .92rem; color: var(--sub); }
.app-line .end { margin-left: auto; font-size: .85rem; white-space: nowrap; }
.badge-upcoming {
  font-size: .68rem; font-weight: 600; letter-spacing: .05em; color: var(--accent);
  border: 1px solid var(--accent-border); padding: 2px 9px; border-radius: 3px;
}
.see-all { display: inline-block; margin-top: 16px; font-size: .9rem; font-weight: 500; }

/* ── Timeline ── */
.experience { padding: clamp(64px, 9vh, 110px) 0; border-top: 1px solid var(--rule); }
.timeline-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 28px;
  padding: 24px 0; border-bottom: 1px solid var(--rule); align-items: start;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-period { font-size: .8rem; color: var(--sub); letter-spacing: .04em; padding-top: 3px; }
.timeline-role { font-size: 1.02rem; font-weight: 500; color: var(--ink); }
.timeline-company { font-size: .85rem; color: var(--accent); margin: 1px 0 6px; }
.timeline-desc { font-size: .88rem; color: var(--sub); }
@media (max-width: 700px) { .timeline-item { grid-template-columns: 1fr; gap: 6px; } }

/* ── Tech ── */
.tech { padding: clamp(64px, 9vh, 110px) 0; border-top: 1px solid var(--rule); }
.tech-row {
  display: grid; grid-template-columns: 190px 1fr; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.tech-row:first-of-type { border-top: 1px solid var(--rule); }
.tech-row h3 {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .15em; color: var(--accent);
}
.tech-row p { font-size: .92rem; color: var(--ink); line-height: 1.8; }
@media (max-width: 640px) { .tech-row { grid-template-columns: 1fr; gap: 4px; } }

/* ── Services ── */
.services { padding: clamp(64px, 9vh, 110px) 0; border-top: 1px solid var(--rule); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2.4rem; }
.service-card {
  background: var(--bg-raise); border: 1px solid var(--card-border);
  border-radius: 8px; padding: clamp(24px, 3vw, 32px);
}
.service-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; margin-bottom: .7rem; }
.service-card p { font-size: .88rem; color: var(--sub); line-height: 1.65; }
.service-meta { font-size: .74rem; color: var(--accent); margin-top: 1rem; letter-spacing: .03em; }
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr; } }

/* ── Contact / footer ── */
.contact { padding: clamp(64px, 9vh, 110px) 0; border-top: 1px solid var(--rule); }
.contact p.pitch { color: var(--sub); font-size: .95rem; max-width: 460px; margin-bottom: 1.6rem; }
.contact-email { font-size: 1.3rem; font-weight: 500; }
.contact-meta { font-size: .9rem; color: var(--sub); margin-top: .5rem; }
footer.site-footer { padding: 34px 0; border-top: 1px solid var(--rule); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-left { font-size: .78rem; color: var(--sub); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: .78rem; color: var(--sub); }
.footer-links a:hover { color: var(--ink); }

/* ── Apps page ── */
.page-header { padding: clamp(56px, 9vh, 96px) 0 clamp(40px, 6vh, 60px); }
.page-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.15; margin-bottom: .9rem; }
.page-title em { font-style: italic; color: var(--accent); }
.app-group { padding: clamp(40px, 6vh, 64px) 0; border-top: 1px solid var(--rule); }
.group-title { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; margin-bottom: .3rem; }
.group-sub { font-size: .92rem; color: var(--sub); margin-bottom: 1.6rem; }
.app-row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 22px;
  padding: 24px 0; border-top: 1px solid var(--rule); align-items: start;
}
.app-row img, .app-row .icon-slot { width: 64px; height: 64px; border-radius: 15px; }
.app-row h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; margin-bottom: .3rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-row .desc { font-size: .92rem; color: var(--sub); line-height: 1.65; max-width: 520px; }
.app-row .meta { font-size: .78rem; color: var(--accent); margin-top: .5rem; letter-spacing: .02em; }
.app-row .store { font-size: .88rem; font-weight: 500; white-space: nowrap; padding-top: 4px; }
@media (max-width: 620px) {
  .app-row { grid-template-columns: 48px 1fr; }
  .app-row img, .app-row .icon-slot { width: 48px; height: 48px; border-radius: 11px; }
  .app-row .store { grid-column: 2; }
}

/* ── Support page ── */
.support-header { padding: clamp(48px, 8vh, 80px) 0 clamp(32px, 5vh, 48px); border-bottom: 1px solid var(--rule); }
.support-header-grid { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: start; }
.support-email-block { text-align: right; padding-top: 42px; }
.support-email-block .label {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--sub); margin-bottom: 3px;
}
.support-email-block a { font-size: .95rem; font-weight: 500; }
.header-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.4rem; }
.badge {
  font-size: .72rem; padding: 5px 12px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent); font-weight: 500; letter-spacing: .03em;
}
@media (max-width: 620px) {
  .support-header-grid { grid-template-columns: 1fr; }
  .support-email-block { text-align: left; padding-top: 0; }
}
.toc { margin: clamp(28px, 5vh, 44px) 0 0; }
.toc h2 {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .18em;
  color: var(--sub); font-weight: 600; margin-bottom: 12px;
}
.toc ol { list-style: none; counter-reset: toc; display: grid; gap: 8px; }
.toc li { counter-increment: toc; display: flex; gap: 12px; align-items: baseline; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-size: .72rem; color: var(--accent); font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.toc a { font-size: .9rem; color: var(--sub); }
.toc a:hover { color: var(--ink); }
.support-body { padding: clamp(36px, 6vh, 56px) 0 clamp(52px, 8vh, 80px); }
section.topic { padding-top: clamp(32px, 5vh, 44px); scroll-margin-top: 84px; }
section.topic:first-of-type { padding-top: 0; }
section.topic + section.topic { border-top: 1px solid var(--rule); margin-top: clamp(32px, 5vh, 44px); }
.topic h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-bottom: .8rem; }
.topic p { color: var(--sub); font-size: .93rem; margin-bottom: 1rem; }
.topic p:last-child { margin-bottom: 0; }
.topic strong { color: var(--ink); font-weight: 500; }
.path {
  display: inline-block; font-size: .85rem; font-weight: 500; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  border-radius: 4px; padding: 0 8px; white-space: nowrap;
}
ol.steps { list-style: none; counter-reset: step; margin: 1rem 0 1.2rem; display: grid; gap: 10px; }
ol.steps li {
  counter-increment: step; display: flex; gap: 13px; align-items: flex-start;
  font-size: .92rem; color: var(--sub);
}
ol.steps li::before {
  content: counter(step); flex-shrink: 0;
  width: 23px; height: 23px; margin-top: 2px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: .72rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
ul.plain { list-style: none; margin: 1rem 0; display: grid; gap: 8px; }
ul.plain li { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--sub); }
ul.plain li::before { content: ''; flex-shrink: 0; width: 5px; height: 5px; margin-top: 11px; border-radius: 50%; background: var(--accent); }
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 6px 6px 0;
  padding: 13px 18px; margin: 1.2rem 0;
}
.callout p { font-size: .88rem; margin: 0; color: var(--sub); }
.contact-card { margin: 1.2rem 0 1.6rem; }
