/* =========================================================
   Srinath OS — shared foundation (home + work pages)
   Built on the base microsoft.ai recreation: cream / warm ink /
   paper, peach→terracotta, Bradford LL + Red Hat Mono.
   ========================================================= */

:root {
  --font-serif: 'Bradford LL', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'Red Hat Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --ink: #5d524b;
  --ink-soft: #776b60;
  --ink-deep: #2b2420;
  --night: #221b17;
  --cream: #fef9ed;
  --paper: #f7ecd9;
  --paper-mid: #f2ead9;
  --cream-warm: #f7f1e3;
  --rust: #a67c52;
  --line: rgba(93, 82, 75, 0.16);
  --line-strong: rgba(93, 82, 75, 0.32);

  --hero-1: #fde3d1;
  --hero-2: #fbd3be;
  --hero-3: #f0b494;
  --hero-4: #dc8f6c;
  --hero-5: #b8694a;
  --terracotta: #c9714d;
  --marker: rgba(220, 143, 108, 0.55);

  --edge: clamp(1rem, 3vw, 2.25rem);
  --header-h: clamp(3.75rem, 5vw, 4.25rem);
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-soft: 0 4px 80px rgba(93, 82, 75, 0.22);
  --shadow-win: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 30px 80px -20px rgba(60, 40, 28, 0.45), 0 8px 24px -8px rgba(60, 40, 28, 0.25);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

html { font-size: 16px; background: var(--cream); scroll-behavior: auto; }
body {
  font-family: var(--font-mono);
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.lenis, html.lenis body { height: auto; }
main { overflow-x: clip; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; margin: 0; }
::selection { background: var(--hero-3); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 2000;
  background: var(--ink); color: var(--cream); padding: .7rem 1rem; border-radius: 10px;
  font-size: 13px; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--edge); }

/* ---------- type ---------- */
.serif { font-family: var(--font-serif); }
.display {
  font-family: var(--font-serif);
  font-weight: 450;
  line-height: .95;
  letter-spacing: -0.015em;
}
.display em { font-style: italic; }
.h2 {
  font-family: var(--font-serif);
  font-weight: 450;
  font-size: clamp(2.4rem, 5.6vw, 5.4rem);
  line-height: .98;
  letter-spacing: -0.015em;
}
.h2 em { font-style: italic; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--rust);
}
.eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.4;
  color: var(--ink);
}
.mono-sm { font-size: 12px; letter-spacing: .02em; }

.mark {
  background-image: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding-inline: .06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .02em;
  height: 3em; padding: 0 1.6em; border-radius: var(--radius-full);
  white-space: nowrap;
  transition: transform .35s var(--ease-out-quart), background .25s ease, box-shadow .35s ease, color .25s;
}
.pill svg { width: 1em; height: 1em; flex: none; }
.pill--dark { background: var(--ink); color: var(--paper); }
.pill--dark:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(58, 45, 36, .28); }
.pill--tan { background: var(--paper); color: var(--ink); }
.pill--tan:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(93, 82, 75, .16); }
.pill--line { border: 1px solid var(--line-strong); color: var(--ink); }
.pill--line:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pill--cream { background: var(--cream); color: var(--ink); }
.pill--cream:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.pill--lg { font-size: 13px; height: 3.4em; padding: 0 1.9em; }

.chip {
  display: inline-flex; align-items: center;
  font-size: 11.5px; letter-spacing: .02em;
  padding: .45em .9em; border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}

/* ---------- floating header ---------- */
.site-header {
  position: fixed; z-index: 900;
  top: 18px; left: var(--edge); right: var(--edge);
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: clamp(1rem, 2vw, 1.6rem) .55rem;
  background: var(--cream);
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 4px 60px rgba(93, 82, 75, 0.22));
  transition: transform .6s var(--ease-out-expo), opacity .4s;
}
.site-header.is-hidden { transform: translateY(calc(-100% - 30px)); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand__mark {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border-radius: 9px;
  background: var(--ink); color: var(--cream);
  font-family: var(--font-serif); font-size: 1.15rem; line-height: 1; letter-spacing: -.02em;
}
.brand__mark i { font-style: italic; }
.brand__name { font-family: var(--font-serif); font-size: 1.25rem; letter-spacing: -.01em; }
.site-nav { display: flex; gap: clamp(1.25rem, 2.6vw, 2.5rem); }
.site-nav a {
  font-size: 12px; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: .4rem 0;
  transition: color .25s;
}
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out-quart);
}
.site-nav a:hover, .site-nav a.is-current { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.site-header__right { display: flex; align-items: center; gap: .9rem; }
.clock { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.clock b { font-weight: 500; color: var(--ink); }

@media (max-width: 860px) {
  .site-nav { display: none; }
}
@media (max-width: 520px) {
  .clock { display: none; }
  .brand__name { font-size: 1.1rem; }
  .site-header { top: 12px; }
}

/* ---------- Srinath OS window chrome ---------- */
.win {
  --win-bg: var(--cream);
  --win-bar: var(--paper);
  position: relative;
  background: var(--win-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-win);
  border: 1px solid rgba(93, 82, 75, .14);
  overflow: hidden;
  color: var(--ink);
}
.win__bar {
  display: flex; align-items: center; gap: .75rem;
  height: 2.4rem; padding: 0 .85rem;
  background: var(--win-bar);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-soft);
  user-select: none;
}
.win__dots { display: flex; gap: 6px; flex: none; }
.win__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--hero-4); }
.win__dots i:nth-child(2) { background: var(--hero-3); }
.win__dots i:nth-child(3) { background: #cdbfae; }
.win__title { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win__title b { color: var(--ink); font-weight: 500; }
.win__body { position: relative; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); }
[data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease-out-quart), transform 1.1s var(--ease-out-expo);
  transition-delay: var(--d, 0s);
}
.no-js [data-reveal], .reduce-motion [data-reveal] { opacity: 1; transform: none; }

/* split lines */
.split-line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.split-line > span { display: block; }

/* ---------- page curtain (window open / close transition) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 1500;
  pointer-events: none;
  display: grid; place-items: center;
  background: var(--curtain, var(--ink-deep));
  color: var(--cream);
  clip-path: inset(0 0 0 0 round 0);
  visibility: hidden;
}
.curtain.is-active { visibility: visible; pointer-events: all; }
.curtain__label {
  font-family: var(--font-serif); font-size: clamp(2rem, 6vw, 5rem); font-style: italic; letter-spacing: -.01em;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.curtain__label small {
  font-family: var(--font-mono); font-style: normal; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .7;
}
.curtain__bar { width: 160px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.curtain__bar i { display: block; height: 100%; width: 100%; background: var(--hero-3); transform-origin: left; transform: scaleX(0); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--night);
  color: rgba(254, 249, 237, .7);
  padding: 2.2rem var(--edge) 2.4rem;
  font-size: 12px;
}
.site-footer__row {
  max-width: 1440px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--hero-3); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }

/* ---------- grain ---------- */
.grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.3 0 0 0 0 0.27 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .22; mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
