/* ============================================================
   Texterous base stylesheet
   display: Domine (serif), body: Inter, accent: #009BFF
   Signature background: #FBFBFB with a subtle grid and grain.

   Drop this in, load Domine + Inter, and add page-specific rules
   at the BOTTOM of your own file. Do not edit the token block.
   ============================================================ */

:root {
  /* Core palette (brand guide) */
  --accent: #009BFF;
  --accent-hover: #0080d4;
  --accent-soft: rgba(0, 155, 255, 0.09);
  --bg: #fbfbfb;
  --bg-dark: #151515;
  --surface-dark: #121314;
  --ink: #0c0e14;
  --body-text: #414855;
  --muted: #6b7280;

  /* Derived surfaces and lines */
  --card: #eeeff4;
  --card-border: rgba(12, 14, 20, 0.07);
  --line: rgba(12, 14, 20, 0.08);
  --grid-line: rgba(12, 14, 20, 0.045);

  --radius-btn: 11px;
  --radius-card: 18px;
  --shadow-lift: 0 14px 34px rgba(12, 14, 20, 0.10);

  --font-display: "Domine", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Fine grain overlay, inlined so the page stays self-contained */
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' seed='3300' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23grain)' opacity='0.72'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- Signature background: grid + grain ---------- */

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  color: var(--body-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--grain);
  background-size: 9rem 9rem;
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
}

main, header.site-header, footer { position: relative; z-index: 2; }

/* Dark sections: white on ink, the roll-up banner look */
.on-dark {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.72);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-dark strong { color: #fff; }
.on-dark .lead { color: rgba(255, 255, 255, 0.78); }
.on-dark { --line: rgba(255, 255, 255, 0.14); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.14;
  margin: 0 0 0.5em;
}
/* The brand scale is H1 36 / H2 30 / H3 24 / H4 20 px. On web those become fluid,
   with the printed numbers as the lower bound of each clamp. */
h1 { font-size: clamp(2.4rem, 5.5vw, 3.7rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.35rem, 1.6vw, 1.5rem); line-height: 1.35; }
h4 { font-size: 1.18rem; }

p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--body-text); }
.fineprint { font-size: 0.95rem; color: var(--muted); }
strong { color: var(--ink); font-weight: 600; }

/* Hanging kicker above a heading. Editorial alternative to a card label. */
.kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* The one blue word in a headline */
.accent { color: var(--accent); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink);
}

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  padding: 13px 22px;
  cursor: pointer;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease,
              transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(12, 14, 20, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 155, 255, 0.30);
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: rgba(0, 155, 255, 0.35);
  border-radius: 999px;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--body-text); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  background: rgba(251, 251, 251, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 50;
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(12, 14, 20, 0.05); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; height: 70px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; }
.brand img { width: 24px; height: 40px; display: block; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.26rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a.nav-link { color: var(--ink); font-size: 0.95rem; position: relative; text-decoration: none; }
.site-nav a.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.site-nav a.nav-link:hover { color: var(--accent); }
.site-nav a.nav-link:hover::after { transform: scaleX(1); }
@media (max-width: 780px) { .site-nav a.nav-link { display: none; } }

/* ---------- Hero, with the ASCII owl as background artwork ---------- */

.hero { padding: 84px 0 52px; position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { max-width: 620px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero .kicker, .hero h1, .hero .lead, .hero .hero-actions {
  opacity: 0;
  transform: translateY(20px);
  animation: rise-in 0.85s var(--ease-out) forwards;
}
.hero .kicker       { animation-delay: 0.04s; }
.hero h1            { animation-delay: 0.12s; }
.hero .lead         { animation-delay: 0.30s; }
.hero .hero-actions { animation-delay: 0.44s; }
@keyframes rise-in { to { opacity: 1; transform: none; } }

/* Paste assets/owl-ascii.txt inside <div class="ascii-owl"><pre>...</pre></div> */
.ascii-owl {
  position: absolute;
  top: 50%; right: -4%;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.ascii-owl pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.28;
  letter-spacing: 2px;
  color: var(--ink);
  opacity: 0.06;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 60% 50%, #000 30%, transparent 76%);
  mask-image: radial-gradient(ellipse 60% 60% at 60% 50%, #000 30%, transparent 76%);
  animation: owl-drift 18s ease-in-out infinite alternate;
}
.on-dark .ascii-owl pre { color: var(--accent); opacity: 0.30; }
@keyframes owl-drift {
  from { transform: translateY(-8px) scale(1); }
  to   { transform: translateY(8px) scale(1.03); }
}
@media (max-width: 900px) { .ascii-owl { right: -30%; } }
@media (max-width: 640px) { .ascii-owl { display: none; } }

/* ---------- Owl mark as a bleeding watermark ----------
   The alternative to the ASCII owl, and the right choice in any section too
   short for it (under roughly 700px). Big, hard-edged, running off the edge.
   Use logo/texterous-mark-accent.svg on ink, or the black mark on light. */

.owl-bleed {
  position: absolute;
  top: 50%;
  right: -3%;
  height: 150%;
  transform: translateY(-50%);
  opacity: 0.22;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.owl-bleed--left { right: auto; left: -3%; }
.on-dark .owl-bleed { opacity: 0.28; }
@media (max-width: 700px) { .owl-bleed { opacity: 0.12; } }

/* Owl on the left instead, for alternating it across a series of sections
   or slides, which is what makes a set feel alive rather than repeated. */
.ascii-owl--left { right: auto; left: -4%; }
.ascii-owl--left pre {
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 40% 50%, #000 30%, transparent 76%);
  mask-image: radial-gradient(ellipse 60% 60% at 40% 50%, #000 30%, transparent 76%);
}

/* If a section has content in the right-hand column, the default owl will sit
   under it. Put it behind the whole section instead: bigger, fainter, centred. */
.ascii-owl--behind { top: 50%; right: 50%; transform: translate(50%, -50%); }
.ascii-owl--behind pre {
  font-size: 15px;
  opacity: 0.04;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 25%, transparent 80%);
}
.on-dark .ascii-owl--behind pre { opacity: 0.16; }

/* ---------- Hairline rows: use these INSTEAD of a grid of cards ---------- */

.rows { margin: 0; padding: 0; list-style: none; }
.row-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 30px;
  align-items: center;
  padding: 30px 4px;
  border-top: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.3s var(--ease-out), background 0.25s ease;
}
.row-item:last-child { border-bottom: 1px solid var(--line); }
.row-item::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.3s var(--ease-out);
}
.row-item:hover { background: rgba(0, 155, 255, 0.035); padding-left: 22px; }
.row-item:hover::before { transform: scaleY(1); }
.row-item h2, .row-item h3 { font-size: 1.7rem; margin: 0 0 8px; }
.row-item h2 a, .row-item h3 a { color: var(--ink); }
.row-item h2 a:hover, .row-item h3 a:hover { color: var(--accent); text-decoration: none; }
.row-item p { margin: 0 0 12px; max-width: 56ch; }
@media (max-width: 700px) {
  .row-item { grid-template-columns: 1fr; }
}

/* ---------- Page rhythm ----------
   .section is the top-level separator between the big parts of a page.
   .block is the smaller separator for a sub-part inside one of those.
   Using .block for both is the usual mistake and makes a page feel flat. */

.section { padding: 76px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section > .container > h2, .section > h2 { margin-bottom: 28px; }
.section-tight { padding: 44px 0; }
@media (max-width: 640px) { .section { padding: 52px 0; } }

/* A block separated by a rule and space, not a border */
.block { padding: 34px 0 6px; border-top: 1px solid var(--line); margin-top: 30px; }
.block h2 { margin-bottom: 20px; }

/* Small meta pills. Sparingly, for facts like location or contract type. */
.meta { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; padding: 0; }
.meta li {
  font-size: 0.86rem; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}

/* Blue check list */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 0 0 14px 38px; color: var(--body-text); }
.ticks li::before {
  content: "";
  position: absolute; left: 4px; top: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23009BFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 13px; background-position: center; background-repeat: no-repeat;
}

/* Stat: a number carries the weight, no box around it */
.stat { display: block; }
.stat .value { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--ink); line-height: 1; }
.stat .value .unit { color: var(--accent); }
.stat .label { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--muted); }

/* ---------- Tables: hairlines and a tinted header ---------- */

table.tx { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
table.tx th {
  text-align: left;
  background: #eaf1fb;
  color: var(--ink);
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
table.tx td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.tx tr:hover td { background: rgba(0, 155, 255, 0.03); }

/* ---------- Forms ----------
   A form is one of the few things that genuinely is a distinct object, so it is
   allowed a container. Most other content should not be in a box. */

.form-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 32px 30px;
  box-shadow: var(--shadow-lift);
}
@media (max-width: 560px) { .form-card { padding: 24px 20px; } }

.form-error, .form-success { border-radius: 10px; padding: 13px 15px; margin-bottom: 18px; }
.form-error { background: #fdf0ef; border: 1px solid #f1c1bd; color: #a13c33; }
.form-success { background: var(--accent-soft); border: 1px solid rgba(0, 155, 255, 0.35); color: var(--ink); }

/* Contact band: a named human, not a form. The other legitimate container. */
.contact-band {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
}
.contact-band .avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-band .who { flex: 1 1 260px; }
.contact-band strong { display: block; color: var(--ink); font-size: 1rem; }
.contact-band .role { font-size: 0.85rem; color: var(--muted); }
.contact-band p { margin: 6px 0 0; font-size: 0.93rem; }

/* Honeypot: invisible to people, fillable by bots */
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 8px;
}
.field label .optional { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="url"],
.field input[type="tel"], .field input[type="date"], .field input[type="number"],
.field select, .field textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 14px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: 0.85rem; color: var(--muted); margin: 7px 0 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  background: rgba(251, 251, 251, 0.7);
  padding: 56px 0 0;
  font-size: 0.95rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-bottom: 44px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--body-text); text-decoration: underline; text-underline-offset: 3px; }
.footer-grid a:hover { color: var(--ink); }
.footer-grid address { font-style: normal; color: var(--body-text); }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 0.88rem; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Accessibility ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(0, 155, 255, 0.2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .kicker, .hero h1, .hero .lead, .hero .hero-actions { animation: none; opacity: 1; transform: none; }
  .ascii-owl pre { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .row-item, .site-header { transition: none; }
}

/* ---------- Print and PDF ----------
   The grain prints as mud and the sticky header repeats on every page,
   so both come off. Colour adjust keeps the blue from washing out. */

@media print {
  @page { size: A4; margin: 18mm; }
  body {
    background-image: none;
    background-color: #fff;
    font-size: 10.5pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body::before { display: none; }
  .site-header, .site-nav, .hero-actions, .btn { display: none; }
  .ascii-owl { display: none; }
  .on-dark { background: var(--bg-dark) !important; color: #fff; }
  h1, h2, h3, h4 { break-after: avoid; }
  .row-item, .block, blockquote, table.tx tr { break-inside: avoid; }
  a { color: var(--ink); text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: var(--muted); }
  footer { border-top: 1px solid var(--line); }
}
