/* Kerlo on the web: the app's design system (docs/design-system.md, v2 « Focus ») as CSS.
   Cream canvas, white borderless surfaces, one ink block per view with its butter light, butter for the one primary
   action, clay as a rare accent. Manrope for display, Inter for text and numbers, Instrument Serif for one word. */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/assets/fonts/Inter-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/assets/fonts/Inter-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/assets/fonts/Inter-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url('/assets/fonts/Manrope-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url('/assets/fonts/Manrope-ExtraBold.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/InstrumentSerif-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: italic; font-display: swap; src: url('/assets/fonts/InstrumentSerif-Italic.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --canvas: #F3F0E9;
  --surface: #FFFFFF;
  --sunken: #EAE6DD;
  --tile: #F1E8DA;
  --ink: #0F1720;
  --ink-raised: #1C2632;
  --ink-pressed: #1E2830;
  --butter: #FDCF47;
  --butter-pressed: #EBBD35;
  --butter-tint: #FEEDB8;
  --text: #0F1720;
  --text-2: #66625B;
  --text-3: #6E6962;
  --on-ink: #F8F6F1;
  --on-ink-muted: #B9B5AC;
  --on-butter-muted: #5C4A17;
  --clay: #E76F51;
  --clay-text: #A64830;
  --clay-wash: #FBEDE6;
  --covered-bg: #DCEBB4;
  --covered-text: #35522A;
  --border: #E9E4DA;
  --border-strong: #CFC9BE;
  --ink-rule: rgba(248, 246, 241, 0.16);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow-float: 0 10px 28px rgba(15, 23, 32, 0.10);
  --shadow-sheet: 0 8px 24px rgba(15, 23, 32, 0.12);
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 17px/1.55 var(--ui);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.ink :focus-visible, .on-ink :focus-visible { outline-color: var(--butter); }
::selection { background: var(--butter-tint); color: var(--ink); }

/* Type */
.display, h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.04; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.018em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.005em; }
h1 em, h2 em, .display em { font-size: 1.08em; line-height: 0.9; }
p { margin: 0; text-wrap: pretty; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--text-2); }
.num { font-feature-settings: 'tnum', 'lnum'; font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--text-2); }
.small { font-size: 0.875rem; line-height: 1.5; }

/* Buttons */
.btn {
  --h: 56px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px; border: 0; border-radius: 999px;
  font: 600 1rem/1 var(--ui); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 150ms var(--ease-out), background-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--butter); color: var(--ink); }
.btn-primary:hover { background: var(--butter-pressed); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: var(--ink-pressed); }
.btn-ghost { background: transparent; color: var(--text); padding: 0 18px; }
.btn-ghost:hover { background: rgba(15, 23, 32, 0.05); }
.btn-surface { background: var(--surface); color: var(--ink); }
.btn .arrow { width: 28px; height: 28px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--ink); color: var(--butter); margin-inline-end: -12px; }
.btn-ink .arrow { background: var(--butter); color: var(--ink); }
.btn[disabled] { opacity: 0.4; cursor: default; transform: none; }

/* The bracket device: two rounded corners, top-start and bottom-end, one per view. */
.brackets { position: relative; display: inline-block; --arm: clamp(18px, 2.4vw, 34px); --stroke-color: var(--clay); --gap: 0.28em; padding: var(--gap) calc(var(--gap) * 1.4); }
.brackets::before, .brackets::after {
  content: ''; position: absolute; width: var(--arm); height: var(--arm); background: var(--stroke-color);
  -webkit-mask: url('/assets/corner.svg') no-repeat center / contain; mask: url('/assets/corner.svg') no-repeat center / contain;
}
.brackets::before { inset-inline-start: 0; top: 0; }
.brackets::after { inset-inline-end: 0; bottom: 0; transform: rotate(180deg); }
.brackets.on-ink, .ink .brackets { --stroke-color: var(--butter); }
[dir='rtl'] .brackets::before { transform: scaleX(-1); }
[dir='rtl'] .brackets::after { transform: rotate(180deg) scaleX(-1); }

/* Surfaces */
.card { background: var(--surface); border-radius: var(--r-lg); }
.ink {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: var(--on-ink); border-radius: var(--r-xl);
}
.ink::before {
  /* The one light of an ink block: static radial butter from a corner. */
  content: ''; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; inset-inline-end: -22%; top: -38%;
  background: radial-gradient(closest-side, rgba(253, 207, 71, 0.30), rgba(253, 207, 71, 0.08) 55%, transparent 72%);
  pointer-events: none;
}
.ink .muted, .ink .lead { color: var(--on-ink-muted); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.35rem/1 var(--display); letter-spacing: -0.03em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 6px 14px rgba(15, 23, 32, 0.12); }

/* Motion: things come into focus once, nothing loops. Reduced motion keeps short fades and state changes, drops the travel. */
/* Content is visible by default; only when the page script runs does it wait to be revealed. */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 160ms !important; transition-delay: 0ms !important; animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
  html.js .reveal { transform: none; }
}

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
