/* Operon · "Both sides of the counter". Tokens, base, chrome and the shared paper materials. */
@font-face { font-family: 'Bricolage'; src: url(../assets/bricolage.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Hanken'; src: url(../assets/hanken.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JBMono'; src: url(../assets/jetbrains.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  /* the morning (paper) ground is the page's default; the night overrides inside the story */
  --sc-canvas: #efeae0; --sc-surface: #fffdf9; --sc-ink: #12120f; --sc-ink-soft: #57544c;
  --sc-accent: #2f7a16; --sc-accent-ink: #ffffff;
  --sc-font-display: 'Bricolage', 'Hanken', system-ui, sans-serif;
  --sc-font-text: 'Hanken', system-ui, sans-serif;
  --sc-font-mono: 'JBMono', ui-monospace, monospace;
  --sc-shadow-color: 35 40% 20%;

  --night: #0a1019; --night-2: #121b29; --night-ink: #f4efe4; --night-soft: #b7bfcc;
  --lime: #b6f24d; --lime-ink: #0e1a05;
  --sheet: #fffdf9; --sheet-2: #faf6ee; --desk: #efeae0; --desk-2: #e3dccd;
  --manila: #ecdcb0; --manila-2: #dcc58e; --manila-ink: #5d4d24;
  --rule: #e2ddd1; --rule-2: #d3ccbb;
  --green: #37861c; --green-2: #2a6716; --green-tint: #e4f3d5;
  --pencil: #c4382f; --pencil-tint: #f8e1dc; --amber-tint: #f7e7c4; --amber-ink: #7a5310;
  --fibre: url(../assets/paper-fibre-tile.webp);
  --paper: linear-gradient(rgba(255, 253, 249, .82), rgba(255, 253, 249, .82)), var(--fibre) 0 0 / 360px;
  --paper-desk: linear-gradient(rgba(239, 234, 224, .64), rgba(239, 234, 224, .64)), var(--fibre) 0 0 / 360px;
  --e1: 0 1px 0 rgba(70, 55, 25, .05), 0 1px 2px rgba(70, 55, 25, .09);
  --e2: 0 1px 0 rgba(70, 55, 25, .05), 0 2px 5px rgba(70, 55, 25, .08), 0 14px 28px -14px rgba(70, 55, 25, .32);
  --e3: 0 2px 0 rgba(70, 55, 25, .04), 0 10px 18px rgba(70, 55, 25, .07), 0 40px 70px -30px rgba(70, 55, 25, .45);
  --ease: cubic-bezier(.23, 1, .32, 1);
  --spring: cubic-bezier(.2, 1.5, .35, 1);
  --bar-h: 72px;
}

/* --top-tint is the colour of the hero's top edge; the status-bar strip and the photo's first pixels share it */
:root { --top-tint: #0d559e; }
@media (max-width: 760px) { :root { --top-tint: #061f3c; } }
html { overflow-x: clip; background: var(--top-tint); scroll-padding-top: calc(var(--bar-h) + 12px); }
html[data-top="day"] { background: var(--desk); }
/* iOS Safari (26+) paints the area behind the status bar itself. Owner-tested on an iPhone 17 Pro Max (Safari 27):
   the wanted look is edge-lab variant D, a page with NO header and nothing pinned across the top, where Safari simply
   extends the page background. Any full-width fixed/sticky box near the top edge is copied as a flat band, and its
   colour sticks after it scrolls away. Proven on the device with edge-lab2: a pinned scene 13px down is ignored, page
   background changes are followed live, a pinned scene touching the top is copied and that colour then sticks. So on
   touch devices: the bar is two narrow fixed pills, the pinned stage sticks 13px down and is released into normal flow
   (story.js, .is-past) before it would ever touch the top, and story.js keeps the page background equal to the top. */
@media (hover: none) and (pointer: coarse) {
  /* the logo and CTA stay put as two narrow fixed pills; Safari's top-centre probe never meets them */
  html .bar { display: block; width: 0; height: 0; padding: 0; inset: 0 auto auto 0; }
  html .bar::before, html .bar__tabs { display: none; }
  html .bar .brand { position: fixed; top: 14px; left: 10px; height: 42px; padding: 0 14px 0 10px; border-radius: 999px; transition: background-color .3s var(--ease), box-shadow .3s var(--ease); }
  html .bar__end { position: fixed; top: 14px; right: 10px; height: 42px; }
  html .bar[data-mode="day"] .brand { background: rgba(255, 253, 249, .94); box-shadow: 0 0 0 1px rgba(90, 70, 30, .08), 0 8px 18px -10px rgba(40, 30, 10, .4); }
  html .bar[data-mode="day"] .bar__signin { display: none; }
}
body {
  margin: 0; background: var(--paper-desk); background-color: var(--desk); color: var(--sc-ink);
  font: 450 17px/1.6 var(--sc-font-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: rgba(182, 242, 77, .55); color: #12120f; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: #12120f; color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.num, [data-bind$="Txt"] { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --bg: var(--green); --fg: #fff; --edge: var(--green-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  height: 42px; padding: 0 18px; border: 0; border-radius: 10px; text-decoration: none;
  background: var(--bg); color: var(--fg); font: 650 15px/1 var(--sc-font-text); letter-spacing: -.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 0 var(--edge), 0 2px 0 var(--edge), 0 6px 14px -6px rgba(20, 40, 5, .5);
  transition: transform .14s var(--ease), box-shadow .14s var(--ease), background-color .16s var(--ease);
}
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 0 var(--edge), 0 2px 6px -4px rgba(20, 40, 5, .5); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background-color: color-mix(in oklab, var(--bg) 88%, #000); } }
.btn--lg { height: 52px; padding: 0 24px; font-size: 16.5px; border-radius: 12px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn--ink { --bg: #1b1c19; --edge: #000; }
.btn--ghost { --bg: transparent; --fg: var(--sc-ink); --edge: transparent; box-shadow: inset 0 0 0 1px var(--rule-2); }
.btn--lime { --bg: var(--lime); --fg: var(--lime-ink); --edge: #7aa82a; }

/* ---------------------------------------------------------------- the ✳ */
.mark { display: inline-block; line-height: 0; }
.mark svg { display: block; overflow: visible; }
.mark .m-eye { transform-origin: 0 0; transition: transform .09s ease-out; }

/* ---------------------------------------------------------------- the bar: marketing at night, the app's folder tabs by morning */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 var(--sc-gutter);
  color: var(--night-ink); transition: color .3s var(--ease);
}
.bar::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s var(--ease);
  background: var(--paper-desk); background-color: var(--desk); box-shadow: 0 1px 0 var(--rule-2);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 720 21px/1 var(--sc-font-display); letter-spacing: -.025em; justify-self: start; }
.bar__tabs { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.bar__tabs a {
  position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 14px; margin-top: 16px;
  text-decoration: none; font: 560 15px/1 var(--sc-font-text); color: color-mix(in oklab, currentColor 78%, transparent);
  border-radius: 10px 10px 0 0; transition: background-color .25s var(--ease), color .2s var(--ease), box-shadow .25s var(--ease);
}
.bar__tabs a:hover { color: currentColor; }
.bar__end { display: flex; align-items: center; gap: 18px; justify-self: end; }
.bar__signin { text-decoration: none; font: 560 15px/1 var(--sc-font-text); opacity: .86; }
.bar .btn { --bg: var(--lime); --fg: var(--lime-ink); --edge: #7aa82a; height: 40px; }

.bar[data-mode="day"] { color: var(--sc-ink); }
.bar[data-mode="day"]::before { opacity: 1; }
.bar[data-mode="day"] .btn { --bg: var(--green); --fg: #fff; --edge: var(--green-2); }
.bar[data-mode="day"] .bar__tabs a { background: var(--manila); color: var(--manila-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 -1px 0 var(--manila-2); height: 36px; }
.bar[data-mode="day"] .bar__tabs a[aria-current="true"] { background: var(--sheet); color: var(--sc-ink); height: 42px; box-shadow: 0 -1px 0 var(--rule-2), 1px 0 0 var(--rule-2), -1px 0 0 var(--rule-2); z-index: 1; }
.bar[data-mode="day"] .bar__tabs a[aria-current="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--sheet); }

@media (max-width: 980px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar__tabs { display: none; }
  .bar__signin { display: none; }
}
@media (max-width: 600px) { :root { --bar-h: 60px; } .bar .btn { height: 36px; padding: 0 13px; font-size: 14px; } .brand { font-size: 19px; } }

/* ---------------------------------------------------------------- shared paper */
.sheet { position: relative; background: var(--paper); background-color: var(--sheet); border-radius: 4px; box-shadow: var(--e2); }
.sheet::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(90, 70, 30, .07); }
.hl { background: linear-gradient(transparent 22%, rgba(182, 242, 77, .78) 22% 88%, transparent 88%); padding: 0 .12em; margin: 0 -.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.stamp {
  --c: #2a2a26; --rot: -5deg;
  display: inline-flex; align-items: center; white-space: nowrap; color: var(--c); border: 2.6px solid currentColor; border-radius: 6px;
  padding: .2em .58em .14em; font: 800 12px/1.1 var(--sc-font-display); letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(var(--rot)); filter: url(#ink); mix-blend-mode: multiply; opacity: .92; user-select: none; pointer-events: none;
}
.stamp.lg { font-size: 15px; border-width: 3px; }
.stamp.xl { font-size: 21px; border-width: 3.5px; padding: .22em .55em .14em; letter-spacing: .12em; }
.stamp.new { --c: #cf3b2f; } .stamp.handled, .stamp.applied, .stamp.live { --c: #2f7a16; } .stamp.void { --c: #cf3b2f; }
@keyframes stamp-land {
  0% { transform: rotate(calc(var(--rot) - 12deg)) scale(1.9); opacity: 0; }
  55% { transform: rotate(var(--rot)) scale(.94); opacity: .95; }
  100% { transform: rotate(var(--rot)) scale(1); opacity: .92; }
}

/* ---------------------------------------------------------------- section heads (flow sections) */
.sc-section { padding-block: clamp(5rem, 10vw, 9.5rem); }
.sec-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(2.2rem, 4vw, 3.5rem); }
.sec-head--row { max-width: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; gap: 18px 48px; }
.sec-title { margin: 0; font: 720 clamp(2.2rem, 1.5rem + 2.6vw, 3.9rem)/1.02 var(--sc-font-display); letter-spacing: -.035em; text-wrap: balance; }
.sec-sub { margin: 0; font-size: clamp(17px, 1rem + .25vw, 19.5px); line-height: 1.55; color: var(--sc-ink-soft); max-width: 40rem; text-wrap: pretty; }
@media (max-width: 860px) { .sec-head--row { grid-template-columns: 1fr; } }
