/* PiloSuite.com – the brand site. Plain CSS, no framework, no external fonts (nothing is loaded from a third party).
   Colours are the ones of the business card and of Pilo (plan 7.5, 16.1); the readability rules follow PageLayout.md:
   running text 16 px and darker than mid-grey, every text/background pair at least WCAG AA. */

:root {
  --navy: #1f3a5f;
  --navy-deep: #16304f;
  --teal: #2e7d7a;
  --teal-deep: #236360;
  --sky: #dbe8f7;
  --sky-soft: #eef4fb;
  --ring: #b9cde6;
  --ink: #2c3a4d;
  --ink-soft: #46556b;
  --fur: #c98546;
  --fur-soft: #f3e4d2;
  --paper: #ffffff;
  --line: #d4dde9;
  --ok: #2f7d4f;
  --warn: #a8651a;
  --focus: #1f3a5f;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(31, 58, 95, .08), 0 6px 20px rgba(31, 58, 95, .08);
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p, ul, ol, dl, table { margin: 0 0 1em; }
p:last-child, ul:last-child, ol:last-child, dl:last-child { margin-bottom: 0; }
li { margin-bottom: .35em; }
a { color: var(--teal-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
strong { color: var(--navy); }
small, .small { font-size: .9375rem; }
code { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .95em; background: var(--sky-soft); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
img, svg { max-width: 100%; height: auto; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.prose { max-width: var(--measure); }
.prose-wide { max-width: 80ch; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: .5rem 1rem; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header: the wordmark stands alone (plan D90); Pilo sits beside it. */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding: .85rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.brand img { width: 40px; height: 40px; }
.site-nav { display: flex; align-items: center; gap: .25rem 1.1rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; padding: .45rem .25rem; font-weight: 500; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--teal); }
.site-nav a.lang { border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .95rem; }
.site-nav a.lang:hover { border-color: var(--navy); border-bottom-color: var(--navy); }
.site-nav a.btn { margin-left: .5rem; color: #fff; border-bottom-color: var(--navy); }
.site-nav a.btn:hover { color: #fff; border-bottom-color: var(--navy-deep); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.15rem; border-radius: 8px; font-weight: 600; text-decoration: none; border: 2px solid transparent; line-height: 1.2; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--sky-soft); color: var(--navy); }
.btn-small { padding: .45rem .85rem; font-size: .95rem; }

/* Sections */
.section { padding: 3.5rem 0; }
.section-tint { background: var(--sky-soft); }
.section-navy { background: var(--navy); color: #e8eef7; }
.section-navy h2, .section-navy h3, .section-navy strong { color: #fff; }
.section-navy a { color: #cfe3f5; }
.section-navy a:hover { color: #fff; }
.section-navy .btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.section-navy .btn-secondary:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.kicker { display: block; font-size: .95rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: .6rem; }
.section-navy .kicker { color: #9fd3cf; }
.lede { font-size: 1rem; color: var(--ink); max-width: var(--measure); }
.section-navy .lede { color: #d6e1ee; }

/* Hero */
.hero { padding: 3.5rem 0 3rem; background: linear-gradient(180deg, var(--sky-soft) 0%, var(--paper) 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem 3rem; align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { font-weight: 500; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.hero .note { color: var(--ink-soft); font-size: .95rem; max-width: var(--measure); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* The instrument panel: an illustration of what the product shows, marked as an example. */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.25rem 1.25rem 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.panel-head h3 { margin: 0; font-size: 1.05rem; }
.tag { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); background: var(--sky-soft); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; }
.panel ul { list-style: none; padding: 0; margin: 0; }
.panel li { display: grid; grid-template-columns: 12px 1fr auto; gap: .75rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--line); margin: 0; }
.panel li:first-child { border-top: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; position: relative; top: 1px; }
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-info { background: var(--teal); }
.panel .when { color: var(--ink-soft); font-size: .95rem; text-align: right; max-width: 11rem; }
.panel .foot { margin-top: .75rem; color: var(--ink-soft); font-size: .9rem; }

/* Card grids */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.35rem 1.25rem; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.section-tint .card { box-shadow: var(--shadow); border-color: transparent; }
.card-accent { border-top: 4px solid var(--teal); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { counter-increment: step; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.1rem 1.25rem; margin: 0; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: .7rem; }
.steps h3 { font-size: 1.1rem; }

/* Two-column "is / is not" */
.compare { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.compare .card ul { padding-left: 1.2rem; }

/* Definition lists and tables */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.5rem; }
dl.facts dt { font-weight: 600; color: var(--navy); }
dl.facts dd { margin: 0; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: .6rem; } }

table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: .65rem .75rem; border-bottom: 1px solid var(--line); }
th { color: var(--navy); background: var(--sky-soft); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* Pricing */
.plans { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: stretch; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan-featured { border: 2px solid var(--teal); }
.plan .price { font-size: 2rem; font-weight: 700; color: var(--navy); margin: .25rem 0 0; line-height: 1.1; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--ink-soft); }
.plan .for { color: var(--ink-soft); margin-bottom: 1rem; }
.plan ul { padding-left: 1.2rem; margin-bottom: 1.25rem; }
.plan .btn { margin-top: auto; align-self: flex-start; }

/* Callouts */
.callout { border-left: 4px solid var(--teal); background: var(--sky-soft); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.25rem 0; }
.callout-warm { border-left-color: var(--fur); background: var(--fur-soft); }
.callout p:last-child { margin-bottom: 0; }

/* Page header for subpages */
.page-head { padding: 2.75rem 0 2rem; background: var(--sky-soft); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .5rem; }
.page-head .lede { margin: 0; }

/* Legal pages */
.legal h2 { font-size: 1.3rem; margin-top: 2.25rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.legal address { font-style: normal; }
.todo { background: #fff3c4; border: 1px dashed var(--warn); color: #5a3a00; padding: 0 .3em; border-radius: 3px; font-weight: 600; }

/* Table of contents on long pages */
.toc { background: var(--sky-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 2rem; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* Contact */
.contact-card { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--sky-soft); padding: 2.5rem 0 2rem; color: var(--ink); font-size: .95rem; }
.site-footer .cols { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); margin-bottom: .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .3rem; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--navy); }
.site-footer .legal-line { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* Utilities */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.flex { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media print {
  .site-header, .site-footer, .btn, .skip { display: none; }
  body { font-size: 12pt; }
  a { color: inherit; text-decoration: none; }
}

/* The assistant: text beside the large Pilo. With scroll-driven animations he flies in from the right as the section
   arrives and leaves the same way as it scrolls out; browsers without them, and readers who prefer reduced motion,
   simply see him sitting there. The section clips the flight so nothing widens the page. */
.section#pilo { overflow-x: clip; }
.pilo-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 3.5rem; align-items: center; }
.pilo-figure { margin: 0; display: flex; justify-content: center; }
.pilo-figure img { width: min(320px, 70vw); height: auto; filter: drop-shadow(0 10px 24px rgba(31, 58, 95, .22)); }
@media (max-width: 860px) { .pilo-intro { grid-template-columns: 1fr; } .pilo-figure img { width: min(220px, 60vw); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .pilo-figure img {
      animation: pilo-fly-in linear both, pilo-fly-out linear forwards;
      animation-timeline: view(), view();
      animation-range: entry 0% entry 100%, exit 0% exit 100%;
    }
  }
}
@keyframes pilo-fly-in {
  from { transform: translate(110vw, 12vh) rotate(-14deg) scale(.7); opacity: 0; }
  40%  { opacity: 1; }
  to   { transform: none; opacity: 1; }
}
@keyframes pilo-fly-out {
  from { transform: none; opacity: 1; }
  60%  { opacity: 1; }
  to   { transform: translate(110vw, -14vh) rotate(10deg) scale(.7); opacity: 0; }
}
