/* ==========================================================================
   Rowenford — corporate site
   Single stylesheet. No preprocessor, no framework, no build step.
   Order: fonts → tokens → reset → type → layout → components → utilities
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------
   Self-hosted and subset to the characters this site actually uses:
   91 KB of full latin subsets reduced to 38 KB across two files. Served from
   this domain, so the page makes no third-party requests.
   IBM Plex, SIL Open Font License 1.1 — see assets/fonts/LICENSE.txt.
   ------------------------------------------------------------------------ */

@font-face {
  font-family: 'Plex Sans';
  src: url('fonts/plex-sans-var.woff2') format('woff2-variations');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plex Mono';
  src: url('fonts/plex-mono.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --------------------------------------------------------------
   Rebranding happens here. No rule below hardcodes a colour or a size.
   ------------------------------------------------------------------------ */

:root {
  /* Light surface (body) */
  --paper: #f7f7f5;
  --paper-raised: #ffffff;
  --ink: #14161a;
  --graphite: #565c63;
  --slate: #6b7178;
  --rule: #e2e1dd;
  --rule-strong: #c8c7c2;

  /* Dark surface (masthead, hero, footer) */
  --ink-surface: #101216;
  --on-ink: #f2f2ef;
  --on-ink-dim: #9aa0a6;
  --on-ink-rule: rgba(242, 242, 239, 0.14);

  /* Single accent */
  --accent: #1b4d4a;
  --accent-tint: #e9efed;
  --accent-on-ink: #6fb3a6;

  /* Type */
  --font-sans: 'Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  --font-mono: 'Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --text-title: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --text-display: clamp(2rem, 1.25rem + 3.6vw, 4.5rem);
  --text-doc: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);

  --tracking-display: -0.035em;
  --tracking-tight: -0.012em;
  --tracking-label: 0.09em;

  /* Space */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;
  --s10: 8rem;

  /* Layout */
  --container: 72rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --rail: 9rem;
  --measure: 36rem;
  --measure-lede: 40rem;
  --header-h: 3.5rem;

  --radius: 3px;
  --speed: 160ms;
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
}

/* --- Reset ---------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s5));
  /* Guards against any child forcing a horizontal scrollbar at 320px. */
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: var(--tracking-tight);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 450;
  line-height: 1.3;
  letter-spacing: var(--tracking-tight);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

::selection {
  background: var(--accent-tint);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Focus ring must stay visible on the dark bands too. */
.band-dark :focus-visible {
  outline-color: var(--accent-on-ink);
}

/* --- Type roles ----------------------------------------------------------- */

.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--slate);
}

.band-dark .label {
  color: var(--on-ink-dim);
}

.prose {
  max-width: var(--measure);
  color: var(--graphite);
}

.prose + .prose {
  margin-top: var(--s4);
}

.link {
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
  transition:
    color var(--speed) var(--ease),
    border-color var(--speed) var(--ease);
}

.link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- Layout --------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: 100;
  padding: var(--s3) var(--s4);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-sm);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--s3);
}

/* --- Header --------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink-surface);
  color: var(--on-ink);
}

.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  padding-block: var(--s3);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--on-ink);
}

.wordmark__mark {
  display: block;
  flex: none;
  color: var(--accent-on-ink);
}

.header__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s5);
}

.header__link {
  font-size: var(--text-sm);
  color: var(--on-ink-dim);
  transition: color var(--speed) var(--ease);
}

.header__link:hover {
  color: var(--on-ink);
}

/* Below 560px the nav drops to its own full-width row rather than being
   squeezed. Four items at 320px do not fit beside the wordmark. */
@media (max-width: 560px) {
  .header__inner {
    gap: var(--s2);
  }

  .header__nav {
    width: 100%;
    justify-content: space-between;
    gap: var(--s3);
    padding-bottom: var(--s1);
  }

  .header__link {
    font-size: var(--text-xs);
  }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--ink-surface);
  color: var(--on-ink);
  display: grid;
  align-content: end;
  min-height: min(76svh, 42rem);
  padding-block: var(--s9) var(--s8);
  overflow: hidden;
}

/* Generated grain. Removes the deadness of a flat fill without an image
   request. Invisible as texture, visible as depth. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__statement {
  font-size: var(--text-display);
  font-weight: 300;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  max-width: 18ch;
  text-wrap: balance;
}

.hero__lede {
  max-width: var(--measure-lede);
  margin-top: var(--s6);
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--on-ink-dim);
}

.hero__record {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--on-ink-rule);
}

.hero__record li {
  position: relative;
}

.hero__record li + li::before {
  content: '';
  position: absolute;
  left: calc(var(--s2) * -1 - 1px);
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--on-ink-rule);
  transform: translateY(-50%);
}

/* --- Sections: label rail + content --------------------------------------- */

.section {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--s8);
  padding-block: var(--s9);
  border-top: 1px solid var(--rule);
}

.section__rail {
  position: sticky;
  top: calc(var(--header-h) + var(--s5));
  align-self: start;
  padding-top: 0.4rem;
}

.section__title {
  font-size: var(--text-title);
  margin-bottom: var(--s5);
}

@media (max-width: 860px) {
  .section {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s4);
    padding-block: var(--s8);
  }

  .section__rail {
    position: static;
    padding-top: 0;
  }
}

/* --- Businesses ----------------------------------------------------------- */

.businesses {
  border-top: 1px solid var(--rule);
}

.business {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--s4);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
  transition: background-color var(--speed) var(--ease);
}

.business:hover {
  background: var(--paper-raised);
}

.business__name {
  font-size: 1.0625rem;
  font-weight: 500;
}

.business__category {
  margin-left: var(--s3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 2px 6px;
  border-radius: var(--radius);
}

.business__description {
  margin-top: var(--s2);
  color: var(--graphite);
  max-width: var(--measure);
}

.business__go {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--slate);
  white-space: nowrap;
  transition: color var(--speed) var(--ease);
}

.business:hover .business__go {
  color: var(--accent);
}

.empty-note {
  color: var(--graphite);
  max-width: var(--measure);
}

.solutions__intro {
  margin-bottom: var(--s6);
}

/* --- Service landing pages ---------------------------------------------- */

.service-hero {
  background: var(--ink-surface);
  color: var(--on-ink);
  padding-block: clamp(5rem, 12vw, 9rem) var(--s8);
  overflow: hidden;
}

.service-hero__inner {
  position: relative;
}

.service-hero__eyebrow {
  color: var(--accent-on-ink);
}

.service-hero__title {
  max-width: 19ch;
  margin-top: var(--s4);
  font-size: clamp(2.4rem, 1.35rem + 4.3vw, 5.4rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.service-hero__lede {
  max-width: var(--measure-lede);
  margin-top: var(--s6);
  color: var(--on-ink-dim);
  font-size: var(--text-lg);
  line-height: 1.55;
}

.service-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s4) var(--s5);
  margin-top: var(--s6);
}

.service-hero__note {
  color: var(--on-ink-dim);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--s5);
  padding: 0.8rem 1rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.25;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button--light {
  margin-top: 0;
  background: var(--on-ink);
  border-color: var(--on-ink);
  color: var(--ink-surface);
}

.button--light:hover {
  background: var(--accent-on-ink);
  border-color: var(--accent-on-ink);
  color: var(--ink-surface);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--s6);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.panel {
  padding: var(--s5);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-raised);
}

.panel h3 {
  margin-top: var(--s2);
  font-size: 1rem;
  font-weight: 500;
}

.panel p:last-child {
  margin-top: var(--s2);
  color: var(--graphite);
  font-size: var(--text-sm);
}

.steps {
  border-top: 1px solid var(--rule);
}

.steps li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: var(--s4);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--rule);
}

.steps__number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
}

.steps h3 {
  font-size: 1rem;
  font-weight: 500;
}

.steps p {
  max-width: var(--measure);
  margin-top: var(--s2);
  color: var(--graphite);
  font-size: var(--text-sm);
}

.price-card {
  display: grid;
  grid-template-columns: minmax(8rem, 0.65fr) minmax(14rem, 1.35fr);
  gap: var(--s6);
  padding: var(--s6);
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
}

.price-card--three {
  grid-template-columns: minmax(7rem, 0.55fr) minmax(7rem, 0.55fr) minmax(14rem, 1.4fr);
}

.price-card__price {
  margin-top: var(--s2);
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: var(--tracking-display);
}

.check-list li {
  position: relative;
  padding: var(--s2) 0 var(--s2) 1.25rem;
  border-bottom: 1px solid var(--rule);
  color: var(--graphite);
  font-size: var(--text-sm);
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.service-disclaimer {
  max-width: var(--measure-lede);
  margin-top: var(--s4);
  color: var(--slate);
  font-size: var(--text-xs);
  line-height: 1.6;
}

.data-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--s6);
  border-top: 1px solid var(--rule);
}

.data-list li {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
  color: var(--graphite);
  font-size: var(--text-sm);
}

.data-list li:nth-child(odd) {
  padding-right: var(--s4);
}

.data-list li:nth-child(even) {
  padding-left: var(--s4);
  border-left: 1px solid var(--rule);
}

@media (max-width: 700px) {
  .feature-grid,
  .price-card,
  .price-card--three,
  .data-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-list li:nth-child(odd),
  .data-list li:nth-child(even) {
    padding-inline: 0;
    border-left: 0;
  }
}

/* --- Approach: four principles -------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}

.principle {
  padding: var(--s5) var(--s5) var(--s5) 0;
  border-bottom: 1px solid var(--rule);
}

.principle:nth-child(odd) {
  border-right: 1px solid var(--rule);
}

.principle:nth-child(even) {
  padding-left: var(--s5);
}

.principle__term {
  display: block;
  margin-bottom: var(--s2);
  color: var(--ink);
}

.principle__text {
  color: var(--graphite);
  font-size: var(--text-sm);
  line-height: 1.55;
}

@media (max-width: 700px) {
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .principle:nth-child(odd) {
    border-right: 0;
  }

  .principle:nth-child(even) {
    padding-left: 0;
  }
}

/* --- Structure diagram ---------------------------------------------------- */

.structure {
  margin-top: var(--s7);
  padding-top: var(--s7);
  border-top: 1px solid var(--rule);
}

.structure__svg {
  width: 100%;
  max-width: 34rem;
  height: auto;
  display: block;
}

.structure__caption {
  margin-top: var(--s5);
  font-size: var(--text-sm);
  color: var(--graphite);
  max-width: var(--measure);
}

.structure__node-fill {
  fill: var(--accent);
}

.structure__node-line {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1;
}

.structure__link {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1;
}

.structure__key {
  fill: var(--slate);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
}

/* --- Company record ------------------------------------------------------- */

.record {
  margin-top: var(--s7);
  border-top: 1px solid var(--rule);
  max-width: var(--measure-lede);
}

.record__row {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
}

.record__key {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--slate);
  padding-top: 0.2rem;
}

.record__value {
  font-size: var(--text-sm);
  color: var(--ink);
}

@media (max-width: 560px) {
  .record__row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s1);
  }
}

/* --- Contact -------------------------------------------------------------- */

.contact__email {
  display: inline-block;
  margin-top: var(--s2);
  font-size: var(--text-lg);
  /* Long address must wrap rather than overflow at 320px. */
  overflow-wrap: anywhere;
}

.contact__note {
  margin-top: var(--s5);
  font-size: var(--text-sm);
  color: var(--slate);
}

/* <address> defaults to italic in every browser; reset it. */
.contact__address {
  margin-top: var(--s6);
  font-style: normal;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--graphite);
}

/* --- Footer --------------------------------------------------------------- */

.footer {
  background: var(--ink-surface);
  color: var(--on-ink);
  padding-block: var(--s8) var(--s6);
  margin-top: var(--s9);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s6);
}

.footer__statement {
  margin-top: var(--s3);
  max-width: 26rem;
  font-size: var(--text-sm);
  color: var(--on-ink-dim);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--on-ink-dim);
  transition: color var(--speed) var(--ease);
}

.footer__link:hover {
  color: var(--on-ink);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s8);
  padding-top: var(--s4);
  border-top: 1px solid var(--on-ink-rule);
}

.footer__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--on-ink-dim);
}

/* --- Legal documents ------------------------------------------------------ */

.doc {
  padding-block: var(--s8) var(--s9);
  max-width: var(--measure);
}

.doc__title {
  font-size: var(--text-doc);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
}

.doc__meta {
  margin-top: var(--s3);
}

.doc__intro {
  margin-top: var(--s5);
  color: var(--graphite);
}

.doc__section {
  margin-top: var(--s7);
}

.doc__heading {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: var(--s3);
}

.doc__section p {
  color: var(--graphite);
}

.doc__section p + p {
  margin-top: var(--s3);
}

.doc__list {
  color: var(--graphite);
}

.doc__list li {
  padding-block: var(--s2);
  border-bottom: 1px solid var(--rule);
}

.doc__back {
  display: inline-block;
  margin-top: var(--s8);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--slate);
  transition: color var(--speed) var(--ease);
}

.doc__back:hover {
  color: var(--accent);
}

/* Marks a document that must not be published as final. Visible on purpose:
   if this box ever reaches production, it is obvious at a glance. */
.draft-notice {
  margin-top: var(--s5);
  padding: var(--s4);
  border: 1px solid var(--accent);
  background: var(--accent-tint);
  color: var(--ink);
  font-size: var(--text-sm);
  border-radius: var(--radius);
}

.placeholder {
  font-family: var(--font-mono);
  font-size: 0.8em;
  color: var(--accent);
  overflow-wrap: anywhere;
}

/* --- Motion ---------------------------------------------------------------
   One entrance sequence, plus scroll-driven reveals where the browser
   supports them natively. No JavaScript, no observers.
   ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .hero__statement,
  .hero__lede,
  .hero__record {
    animation: rise 700ms var(--ease) both;
  }

  .hero__lede {
    animation-delay: 110ms;
  }

  .hero__record {
    animation-delay: 200ms;
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise 600ms var(--ease) both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }

    .structure__link {
      stroke-dasharray: 700;
      stroke-dashoffset: 700;
      animation: draw 1s linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 35%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@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;
  }
}
