/* Kalus shared styles.
   Direction: lean and centered (after celigo.com): light page, plain text tabs with dropdowns,
   centered section headings with one-line subheads, one primary action per block.
   Brand colors kept from the original kalus.io: forest green, lime, cream.
   Progressive extras: view transitions, scroll-driven progress, scroll-state header, anchor positioning, @property. */

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #fbfbf7;
  --alt: #f1f5ee;
  --paper: #ffffff;
  --ink: #15211a;
  --muted: #5b685f;
  --line: #e1e7dd;
  --green: #1e5138;
  --green-hi: #276645;
  --mint: #e3f0e5;
  --lime: #cfe86a;
  --mark: rgba(207, 232, 106, 0.75);
  --btn: #1e5138;
  --btn-ink: #ffffff;
  --shadow: rgba(21, 33, 26, 0.08);
  --shadow-lg: rgba(21, 33, 26, 0.14);
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  interpolate-size: allow-keywords;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1813; --alt: #132019; --paper: #17241c; --ink: #edf1ea; --muted: #a3b3a8; --line: #27382d;
    --green: #9bd2ad; --green-hi: #b6e3c4; --mint: #1d3326; --mark: rgba(207, 232, 106, 0.32);
    --btn: #cfe86a; --btn-ink: #15211a; --shadow: rgba(0, 0, 0, 0.35); --shadow-lg: rgba(0, 0, 0, 0.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1813; --alt: #132019; --paper: #17241c; --ink: #edf1ea; --muted: #a3b3a8; --line: #27382d;
  --green: #9bd2ad; --green-hi: #b6e3c4; --mint: #1d3326; --mark: rgba(207, 232, 106, 0.32);
  --btn: #cfe86a; --btn-ink: #15211a; --shadow: rgba(0, 0, 0, 0.35); --shadow-lg: rgba(0, 0, 0, 0.5); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--body); margin: 0; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 72rem; margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-stretch: 100%; line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
.label { font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); }
.muted { color: var(--muted); }
.mark { background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%); padding-inline: 0.08em; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--btn); color: var(--btn-ink); font: 700 1rem/1 var(--body); text-decoration: none; padding: 0.9rem 1.35rem; border-radius: 99px; border: 1.5px solid var(--btn); white-space: nowrap; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px var(--shadow-lg); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.line:hover { border-color: var(--ink); box-shadow: none; }
.btn.sm { padding: 0.6rem 1rem; font-size: 0.92rem; }
.btn .ico { width: 1.05em; height: 1.05em; }
.link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--green); font-weight: 700; text-decoration: none; }
.link .ico { width: 1.05em; height: 1.05em; transition: transform .2s ease; }
.link:hover .ico { transform: translateX(4px); }

/* Reading progress */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; background: var(--green); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress { animation: grow linear both; animation-timeline: scroll(root); }
    @keyframes grow { to { transform: scaleX(1); } }
  }
}
@supports not (animation-timeline: scroll()) { .progress { display: none; } }

/* Header: plain text tabs, dropdowns on hover or keyboard focus */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; container-type: scroll-state; view-transition-name: site-head; }
.site-head .shell { background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s ease, box-shadow .3s ease; }
@container scroll-state(stuck: top) { .site-head .shell { border-bottom-color: var(--line); box-shadow: 0 6px 24px var(--shadow); } }
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font: 800 1.25rem/1 var(--display); font-stretch: 120%; letter-spacing: 0.04em; text-decoration: none; view-transition-name: brand; }
.brand i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px var(--green); }
.nav { display: flex; align-items: center; gap: 0.25rem; margin-inline: auto; }
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.55rem 0.8rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.96rem; color: var(--ink); transition: background-color .2s ease; }
.nav-link .chev { width: 0.9rem; height: 0.9rem; color: var(--muted); transition: transform .2s ease; }
.nav-link:hover, .nav-item:focus-within > .nav-link { background: var(--alt); }
.nav-item:hover .chev, .nav-item:focus-within .chev { transform: rotate(180deg); }
.nav-link[aria-current="page"] { color: var(--green); }
.drop { position: absolute; top: 100%; left: 50%; padding-top: 0.6rem; transform: translate(-50%, 6px); opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.nav-item:hover .drop, .nav-item:focus-within .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.drop-in { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 50px var(--shadow-lg); padding: 0.6rem; width: max-content; max-width: min(40rem, 90vw); }
.drop-grid { display: grid; grid-template-columns: repeat(2, minmax(15rem, 1fr)); gap: 0.15rem; }
.drop-grid.one { grid-template-columns: minmax(17rem, 1fr); }
.drop a.item { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.1rem 0.75rem; align-items: center; padding: 0.65rem 0.75rem; border-radius: 10px; text-decoration: none; }
.drop a.item:hover { background: var(--alt); }
.drop a.item .ico { grid-row: span 2; width: 2.4rem; height: 2.4rem; padding: 0.55rem; border-radius: 10px; background: var(--mint); color: var(--green); }
.drop a.item b { font-size: 0.95rem; }
.drop a.item small { color: var(--muted); font-size: 0.85rem; }
.drop .drop-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.4rem; padding: 0.75rem 0.85rem; border-radius: 10px; background: var(--alt); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.drop .drop-foot span { color: var(--green); }
.right { display: flex; align-items: center; gap: 1rem; }
.phone { font-weight: 600; font-size: 0.92rem; color: var(--muted); white-space: nowrap; }
.menu-btn { display: none; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; width: 2.6rem; height: 2.5rem; place-items: center; cursor: pointer; }
.menu-btn .ico { width: 1.3rem; height: 1.3rem; }
@media (max-width: 980px) { .phone { display: none; } }
@media (max-width: 820px) { .nav { display: none; } .right { margin-left: auto; } .menu-btn { display: grid; } }
#menu { margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); padding: 0.5rem; width: min(20rem, calc(100vw - 2rem)); box-shadow: 0 24px 50px var(--shadow-lg); position: fixed; inset: 4.6rem 1rem auto auto; transition: opacity .18s ease, transform .18s ease, overlay .18s allow-discrete, display .18s allow-discrete; }
@starting-style { #menu:popover-open { opacity: 0; transform: translateY(-6px) scale(0.98); } }
#menu p { padding: 0.6rem 0.8rem 0.2rem; }
#menu a { display: block; text-decoration: none; padding: 0.6rem 0.8rem; border-radius: 9px; font-weight: 600; }
#menu a:hover { background: var(--alt); }
#menu a.btn { margin-top: 0.5rem; color: var(--btn-ink); }
@supports (anchor-name: --a) {
  .menu-btn { anchor-name: --menu-btn; }
  #menu { position-anchor: --menu-btn; inset: auto; top: calc(anchor(bottom) + 0.5rem); right: anchor(right); }
}

/* Sections: centered heading, one-line subhead */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.alt { background: var(--alt); }
.center-head { text-align: center; display: grid; justify-items: center; gap: 0.8rem; max-width: 44rem; margin: 0 auto clamp(2rem, 5vw, 3.25rem); }
.center-head .sub { color: var(--muted); font-size: 1.1rem; max-width: 38rem; }
.after { text-align: center; margin-top: clamp(1.75rem, 4vw, 2.5rem); }

/* Page intro for inner pages */
.page-intro { text-align: center; display: grid; justify-items: center; gap: 1rem; padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 6vw, 3.75rem); background: radial-gradient(60% 80% at 50% 0%, var(--mint), transparent 70%); }
.page-intro .sub { color: var(--muted); font-size: 1.12rem; max-width: 36rem; }
.crumbs { display: flex; gap: 0.5rem; align-items: center; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.page-intro .acts { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-top: 0.4rem; }

/* Scroll-driven entrance: movement only, text always readable */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    @keyframes rise { from { transform: translateY(28px); } to { transform: none; } }
  }
}

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
a.card { text-decoration: none; }
a.card:hover { transform: translateY(-4px); border-color: var(--green); box-shadow: 0 18px 36px var(--shadow); }
.ico-tile { width: 3rem; height: 3rem; padding: 0.72rem; border-radius: 12px; background: var(--mint); color: var(--green); }

/* FAQ, centered single column, smooth open where supported */
.faq { max-width: 46rem; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.15rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--mint); color: var(--green); font: 500 1.15rem/1 var(--mono); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1.15rem; max-width: 42rem; }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* Picks bar (Workflows page) */
.picks-bar { position: fixed; left: 50%; bottom: max(0.9rem, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 45; width: min(46rem, calc(100% - 1.5rem)); background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; box-shadow: 0 18px 40px var(--shadow-lg); padding: 0.55rem 0.55rem 0.55rem 1.1rem; display: flex; align-items: center; gap: 0.9rem; }
.slots { display: flex; gap: 4px; flex: none; }
.slots i { width: 1.1rem; height: 0.5rem; border-radius: 3px; background: var(--line); transition: background-color .25s ease, transform .25s ease; }
.slots i.f { background: var(--green); transform: scaleY(1.2); }
.picks-bar p { font-size: 0.9rem; color: var(--muted); min-width: 0; flex: 1; line-height: 1.35; }
.picks-bar p b { color: var(--ink); }
.picks-bar .clear { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.82rem; padding: 0; }
@media (max-width: 560px) { .picks-bar { border-radius: 18px; flex-wrap: wrap; } .picks-bar p { flex-basis: calc(100% - 7rem); } }
body.has-bar { padding-bottom: 6rem; }

/* Final call to action, centered */
.final { text-align: center; display: grid; justify-items: center; gap: 1rem; }
.final .sub { color: var(--muted); font-size: 1.1rem; max-width: 34rem; }
.final .acts { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 0.4rem; }
.final .call { font-weight: 600; color: var(--muted); }
.final .call b { color: var(--ink); user-select: all; }

/* Footer, multi-column and quiet */
.site-foot { border-top: 1px solid var(--line); background: var(--alt); padding-block: clamp(2.5rem, 6vw, 3.5rem) 1.5rem; font-size: 0.92rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.foot-grid h4 { margin: 0 0 0.75rem; font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.foot-grid a { text-decoration: none; color: var(--ink); }
.foot-grid a:hover { color: var(--green); }
.foot-grid .about { display: grid; gap: 0.75rem; align-content: start; color: var(--muted); max-width: 22rem; }
.foot-grid .about b { color: var(--ink); user-select: all; }
.foot-base { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; color: var(--muted); font-size: 0.85rem; }

/* Page-to-page transitions (Chrome, Edge, Safari 18.2+) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 200ms ease both vt-out; }
  ::view-transition-new(root) { animation: 300ms cubic-bezier(.2, .7, .2, 1) both vt-in; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.drop a.item .num-ico { grid-row: span 2; width: 2.4rem; height: 2.4rem; border-radius: 10px; background: var(--mint); color: var(--green); display: grid; place-items: center; font: 800 1.05rem/1 var(--display); }
