/* apps.harigovindvalsakumar.com — one stylesheet for the hub and every app page.
   Colours are Atlas's own (Core/Theme.swift in the Atlas repo): dark by default, light when the
   system asks. System fonts only, so nothing is fetched from anywhere. */

:root {
  color-scheme: dark light;
  --bg: #16181d;
  --panel: #1d2027;
  --raised: #232731;
  --line: #2e333d;
  --text: #eceef2;
  --muted: #9aa1ae;
  --accent: #6c8cff;
  --accent-soft: rgba(108, 140, 255, 0.14);
  --glow: rgba(108, 140, 255, 0.18);
  --radius: 18px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

/* Light: when the visitor picks it with the toggle (data-theme="light"), or when their system is light
   and they haven't picked dark. The same values twice, because a media query can't share a rule with an
   attribute selector. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fa;
  --panel: #ffffff;
  --raised: #ffffff;
  --line: #dfe3ea;
  --text: #1a1d24;
  --muted: #5a6270;
  --accent-soft: rgba(108, 140, 255, 0.12);
  --glow: rgba(108, 140, 255, 0.16);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f7fa;
    --panel: #ffffff;
    --raised: #ffffff;
    --line: #dfe3ea;
    --text: #1a1d24;
    --muted: #5a6270;
    --accent-soft: rgba(108, 140, 255, 0.12);
    --glow: rgba(108, 140, 255, 0.16);
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

/* Switching themes cross-fades instead of snapping. */
html.theming, html.theming * { transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease, fill 0.35s ease !important; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; }

/* ── Top bar ─────────────────────────────────────────────── */

/* At the top of the page the bar is transparent, so the hero's glow runs up behind it; once the page
   scrolls (site.js adds .scrolled) it gains its frosted background and a hairline. */
.top {
  position: sticky; top: 0; z-index: 10;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.top.scrolled {
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand img { width: 26px; height: 26px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
.top nav a:hover { color: var(--text); }

/* The theme toggle: a sun in dark mode, a moon in light. */
.theme {
  width: 34px; height: 34px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.theme:hover { border-color: var(--accent); }
.theme svg { width: 16px; height: 16px; }
.theme .moon { display: none; }
:root[data-theme="light"] .theme .sun { display: none; }
:root[data-theme="light"] .theme .moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme .sun { display: none; }
  :root:not([data-theme="dark"]) .theme .moon { display: block; }
}

/* Scroll reveals (site.js). Without JavaScript nothing is hidden: the starting state applies only under .js. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ── Hero ────────────────────────────────────────────────── */

.hero { position: relative; padding: 96px 0 72px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 10% auto; height: 520px; z-index: -1;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.hero .icon {
  width: 132px; height: 132px; display: block; margin: 0 auto 28px;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 8px 12px; border-radius: 999px; margin-bottom: 22px;
}
h1 {
  font: 700 clamp(40px, 7vw, 68px)/1.04 var(--display);
  letter-spacing: -0.035em; margin: 0 0 18px;
}
.lede { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 640px; margin: 0 auto; }

.pill {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 34px;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  font-weight: 600; font-size: 15px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.fine { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ── Sections ────────────────────────────────────────────── */

section { padding: 56px 0; }
.label {
  font: 600 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 22px;
}
h2 { font: 700 clamp(28px, 4vw, 38px)/1.12 var(--display); letter-spacing: -0.025em; margin: 0 0 14px; }
.sub { color: var(--muted); max-width: 620px; margin: 0 0 34px; }

/* ── App cards (hub) ─────────────────────────────────────── */

.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.app {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.app:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.app img { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.app h3 { margin: 2px 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.app p { margin: 0; color: var(--muted); font-size: 15px; }
.meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font: 500 12px/1 var(--mono); color: var(--muted);
  padding: 6px 9px; border-radius: 7px; background: var(--accent-soft);
}
.tag.soon { color: var(--accent); }
.app .go { margin-left: auto; color: var(--muted); font-size: 18px; align-self: center; }
.app:hover .go { color: var(--accent); }

/* ── Feature grid (app page) ─────────────────────────────── */

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.feature {
  padding: 24px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
}
.feature .glyph {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
}
.feature .glyph svg { width: 20px; height: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.feature code {
  font: 13px var(--mono); color: var(--text);
  background: var(--raised); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px;
}

/* ── Callout ─────────────────────────────────────────────── */

.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
  padding: 30px; border-radius: 22px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--panel);
  border: 1px solid var(--line);
}
.callout .glyph { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.callout .glyph svg { width: 26px; height: 26px; }
.callout h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.015em; }
.callout p { margin: 0; color: var(--muted); }

/* ── Requirements ────────────────────────────────────────── */

.reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.req { padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line); }
.req dt { font: 600 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.req dd { margin: 0; }
.req dd span { color: var(--muted); }

/* ── Footer ──────────────────────────────────────────────── */

footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 46px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
footer a:hover { color: var(--text); }
footer .right { margin-left: auto; }

/* ── Small screens ───────────────────────────────────────── */

@media (max-width: 640px) {
  .hero { padding: 64px 0 48px; }
  .hero .icon { width: 104px; height: 104px; }
  .top nav { gap: 16px; }
  .callout { grid-template-columns: 1fr; }
  footer .right { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
