/* Torellia Solutions website: working tokens from CLAUDE.md (not yet signed off). */
@font-face {
  font-family: "Josefin Sans";
  src: url("fonts/JosefinSans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Josefin Sans";
  src: url("fonts/JosefinSans-latin-ext.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --page: #12141a;
  --panel: #1a1d24;
  --raised: #22252c;
  --rule: #2c2f38;
  --rule-strong: #3a3d48;
  --text: #f7f7f8;
  --muted: #a8adb6;
  --dim: #8b9099;
  --crimson: #a32035;
  --crimson-hover: #b42840;
  --gold: #c8b078;
  --font: "Josefin Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--panel); padding: 8px 12px; z-index: 10; }

/* Type */
h1, h2, h3 {
  font-weight: 300;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}
h1 { font-size: clamp(30px, 4.2vw, 50px); letter-spacing: 0.08em; }
h2 { font-size: clamp(24px, 2.8vw, 34px); letter-spacing: 0.12em; }
h3 { font-size: 17px; letter-spacing: 0.16em; font-weight: 400; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
}
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 40em; margin: 24px 0 0; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  padding: 24px 0;
  transition: background .3s, padding .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(18, 20, 26, 0.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
  padding: 14px 0;
}
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 36px; }
.nav-group { display: flex; align-items: center; gap: 36px; }
.brand { display: inline-block; text-decoration: none; color: var(--text); }
.brand-mark { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-weight: 300; font-size: 34px; text-transform: uppercase;
  letter-spacing: 0.28em; margin-right: -0.28em;
  -webkit-text-stroke: 0.35px currentColor;
}
.brand-sub {
  display: flex; justify-content: space-between;
  font-weight: 600; font-size: 13px; color: var(--gold);
  margin-top: 9px; padding-right: 1px;
}
.brand:hover .brand-name { color: #fff; }
.brand-footer .brand-name { font-size: 26px; }
.brand-footer .brand-sub { font-size: 10.5px; margin-top: 7px; }
.site-header nav { display: flex; gap: 32px; }
.site-header nav a, .nav-contact {
  white-space: nowrap;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
}
.site-header nav a:hover, .nav-contact:hover { color: var(--text); }
.nav-contact { border: 1px solid var(--rule-strong); padding: 10px 18px; color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font); font-size: 13px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  padding: 14px 24px; border: 1px solid var(--rule-strong); color: var(--text);
  transition: background .2s, border-color .2s;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--crimson); border-color: var(--crimson); }
.btn.primary:hover { background: var(--crimson-hover); border-color: var(--crimson-hover); }
.icon { width: 1em; height: 1em; flex: none; }
.btn .icon { font-size: 20px; }

/* Hero */
.hero {
  position: relative;
  padding: 168px 0 112px;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero .wrap { position: relative; }
.hero-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 64px; }
.hero-intro .lede { margin-top: 0; }
.hero-intro .actions { margin-top: 32px; }
.hero-dash { position: relative; }
.hero h1 { max-width: 13em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }
.hero-logo {
  position: absolute; left: 0; right: 0; bottom: 44px;
}
.hero-logo img { width: 200px; height: auto; }

/* Sections */
section.block { padding: clamp(72px, 10vw, 128px) 0; border-bottom: 1px solid var(--rule); }
section.block.alt { background: var(--panel); }
.section-head { max-width: 46em; margin-bottom: clamp(40px, 5vw, 64px); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.card { background: var(--page); padding: clamp(28px, 3vw, 40px); }
.alt .card { background: var(--panel); }
.card .icon { font-size: 32px; color: var(--gold); display: block; margin-bottom: 28px; }
.card h3 { margin-bottom: 14px; }
.card p { color: var(--muted); font-size: 17px; margin: 0; }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.ticks { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.ticks li { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.ticks .icon { font-size: 24px; color: var(--gold); flex: none; margin-top: 2px; }
.ticks strong { color: var(--text); font-weight: 400; display: block; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; list-style: none; padding: 0; margin: 0; }
.steps li { border-top: 1px solid var(--rule-strong); padding-top: 24px; }
.steps li::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.22em; color: var(--gold); margin-bottom: 18px;
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 17px; margin: 0; }

.note {
  margin-top: 48px; padding: 28px 32px; border-left: 2px solid var(--crimson);
  background: var(--raised); color: var(--muted); max-width: 52em;
}
.note strong { color: var(--text); font-weight: 400; }

/* Contact */
.contact { text-align: left; }
.contact .mail {
  display: inline-block; font-size: clamp(22px, 3vw, 36px); letter-spacing: 0.06em;
  text-decoration: none; border-bottom: 1px solid var(--crimson); padding-bottom: 6px; margin: 8px 0 40px;
}
.contact .mail:hover { color: var(--gold); }
.contact dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 32px; margin: 0; color: var(--muted); font-size: 17px; }
.contact dt { font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); padding-top: 3px; }
.contact dd { margin: 0; }

/* Footer */
.site-footer { padding: 56px 0 48px; color: var(--dim); font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 24px 64px; align-items: end; }
.site-footer img { width: 150px; height: auto; }
.site-footer p { margin: 0 0 8px; max-width: 60em; }
.site-footer nav { display: flex; gap: 24px; margin-top: 12px; }
.site-footer nav a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.site-footer nav a:hover { color: var(--text); }

/* Legal page */
.legal-head { padding: 150px 0 56px; border-bottom: 1px solid var(--rule); }
.legal-body { padding: 64px 0 96px; }
.legal-body .wrap > * { max-width: 860px; }
.legal-body h2 { font-size: 22px; margin: 56px 0 18px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--muted); font-size: 17px; }
.legal-body strong { color: var(--text); font-weight: 400; }
.legal-body a { color: var(--text); }
.legal-body table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 8px 0 16px; }
.legal-body th, .legal-body td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--muted); }
.legal-body th { color: var(--text); font-weight: 400; width: 34%; }
.home-link { display: inline-flex; align-items: center; gap: 8px; }

/* Responsive */
@media (max-width: 1100px) {
  .hero-intro { grid-template-columns: 1fr; gap: 28px; margin-bottom: 48px; }
}
@media (max-width: 1000px) {
  .site-header nav { display: none; }
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .app-shot { max-width: 560px; }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-header nav { display: none; }
  .hero { padding: 128px 0 64px; }
  .brand-name { font-size: 25px; }
  .brand-sub { font-size: 10px; margin-top: 7px; }
  .hero .actions .btn { width: 100%; justify-content: center; }
  .grid-2, .steps { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .contact dl { grid-template-columns: 1fr; gap: 4px; }
  .contact dd { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.legal-company { margin-top: 40px; max-width: 860px; }
.legal-company table { width: 100%; border-collapse: collapse; font-size: 16px; }
.legal-company th, .legal-company td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); color: var(--muted); vertical-align: top; }
.legal-company th { color: var(--text); font-weight: 400; width: 34%; }
.legal-logo { width: 168px; height: auto; margin-top: 48px; }

/* Hero app screen (illustrative) */
.app-shot { position: relative; margin: 0; padding: 28px 0 0 28px; }
.sheet-ghost {
  position: absolute; inset: 0 40px 56px 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 64px 28px;
  -webkit-mask-image: linear-gradient(135deg, #000 10%, transparent 70%);
          mask-image: linear-gradient(135deg, #000 10%, transparent 70%);
  opacity: .7;
}
.app {
  position: relative; background: var(--panel); border: 1px solid var(--rule-strong);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.02) inset;
  font-size: 15px;
}
.app-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--rule); }
.app-title { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; }
.app-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.app-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #4cbf6a; box-shadow: 0 0 0 4px rgba(76,191,106,.15); }
.app-kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.app-kpis div { padding: 18px 22px; border-right: 1px solid var(--rule); }
.app-kpis div:last-child { border-right: 0; }
.kpi { display: block; font-size: 30px; font-weight: 300; line-height: 1.1; }
.kpi-label { white-space: nowrap; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.app-rows { list-style: none; margin: 0; padding: 6px 0; }
.app-rows li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 22px; border-bottom: 1px solid var(--rule); }
.app-rows li:last-child { border-bottom: 0; }
.ref { color: var(--dim); font-size: 13px; letter-spacing: .06em; }
.job { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border: 1px solid; white-space: nowrap; }
.pill.ok { color: #7fd197; border-color: rgba(76,191,106,.4); }
.pill.wait { color: var(--gold); border-color: rgba(200,176,120,.45); }
.pill.plan { color: var(--muted); border-color: var(--rule-strong); }
.pill.done { color: var(--muted); border-color: var(--rule-strong); background: var(--raised); }
.app-foot { padding: 14px 22px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); background: var(--raised); }
.app-shot figcaption { margin-top: 12px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); text-align: right; }

/* Card and link polish */
.card { transition: background .25s; }
.card:hover { background: var(--raised); }
.alt .card:hover { background: var(--raised); }

/* Gentle entrance, only when JS is on and motion is welcome */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .app-rows li { opacity: 0; transform: translateX(8px); transition: opacity .5s ease, transform .5s ease; }
.js .app.in .app-rows li { opacity: 1; transform: none; }
.js .app.in .app-rows li:nth-child(2) { transition-delay: .12s; }
.js .app.in .app-rows li:nth-child(3) { transition-delay: .24s; }
.js .app.in .app-rows li:nth-child(4) { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .app-rows li { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 640px) {
  .app-shot { padding: 18px 0 0 14px; }
  .app-rows li { grid-template-columns: 52px 1fr auto; padding: 11px 16px; }
  .app-kpis div, .app-bar, .app-foot { padding-left: 16px; padding-right: 16px; }
  .kpi { font-size: 24px; }
}

/* Contact email button */
.mail-btn { text-transform: none; letter-spacing: .04em; font-size: 18px; padding: 18px 28px; margin: 8px 0 40px; }
.mail-btn { background: var(--gold); border-color: var(--gold); color: var(--page); font-weight: 600; }
.mail-btn:hover { background: #d6c08c; border-color: #d6c08c; }
.mail-btn .icon { font-size: 22px; }

/* Dashboard showcase (illustrative) */
.dash { margin: 0; background: var(--panel); border: 1px solid var(--rule-strong); box-shadow: 0 40px 90px rgba(0,0,0,.4); }
.dash-bar { display: flex; align-items: center; gap: 24px; padding: 16px 24px; border-bottom: 1px solid var(--rule); }
.dash-bar .app-live { margin-left: auto; white-space: nowrap; }
.app-live .short { display: none; }
.dash-tabs { display: flex; gap: 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.dash-tabs span { padding: 6px 12px; border: 1px solid transparent; }
.dash-tabs .on { color: var(--text); border-color: var(--rule-strong); background: var(--raised); }
.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); }
.dash-kpis div { padding: 24px; border-right: 1px solid var(--rule); }
.dash-kpis div:last-child { border-right: 0; }
.dash-kpis .kpi { font-size: 36px; font-variant-numeric: tabular-nums; }
.dash-body { display: grid; grid-template-columns: 1.3fr 1fr; }
.dash-chart, .dash-feed { padding: 24px; }
.dash-chart { border-right: 1px solid var(--rule); }
.dash-sub { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 20px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; height: 200px; align-items: end; }
.bars div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bars span { display: block; height: var(--h); background: linear-gradient(180deg, #3a3d48, #2c2f38); border-top: 2px solid var(--muted); transition: height 1s cubic-bezier(.2,.7,.2,1); }
.bars div:nth-child(2) span { transition-delay: .06s; }
.bars div:nth-child(3) span { transition-delay: .12s; }
.bars div:nth-child(4) span { transition-delay: .18s; }
.bars div:nth-child(5) span { transition-delay: .24s; }
.bars div:nth-child(6) span { transition-delay: .30s; }
.bars div:nth-child(7) span { transition-delay: .36s; }
.bars .peak span { background: linear-gradient(180deg, rgba(163,32,53,.85), rgba(163,32,53,.35)); border-top-color: var(--crimson-hover); }
.bars em { font-style: normal; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); text-align: center; margin-top: 10px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; transition: opacity .5s, transform .5s; }
.feed li:last-child { border-bottom: 0; }
.feed li.enter { opacity: 0; transform: translateY(-8px); }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.feed-dot.ok { background: #4cbf6a; }
.feed-dot.wait { background: var(--gold); }
.feed-text { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-time { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.dash figcaption { padding: 12px 24px; border-top: 1px solid var(--rule); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); text-align: right; }
.js .dash:not(.in) .bars span { height: 0; }

/* Hero status change */
.pill { transition: color .4s, border-color .4s; }
.js .app.in .app-rows li.flash { background: rgba(76,191,106,.07); }

@media (max-width: 960px) {
  .dash-body { grid-template-columns: 1fr; }
  .dash-chart { border-right: 0; border-bottom: 1px solid var(--rule); }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-kpis div:nth-child(2) { border-right: 0; }
  .dash-kpis div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .dash-tabs { display: none; }
  .app-live .long { display: none; }
  .app-live .short { display: inline; }
  .dash-bar, .dash-chart, .dash-feed, .dash-kpis div { padding-left: 16px; padding-right: 16px; }
  .dash-kpis .kpi { font-size: 28px; }
  .bars { gap: 8px; height: 160px; }
  .mail-btn { width: 100%; justify-content: center; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bars span, .feed li, .pill { transition: none; }
  .js .dash:not(.in) .bars span { height: var(--h); }
}
