/* ==========================================================================
   Rightomation design system
   Source of truth: Rightomation website design directions/design_handoff_rightomation
   (README.md tokens are binding; DESIGN-DIRECTION.md and COPY-RULES.md apply)
   ========================================================================== */

/* Instrument Sans - self-hosted (first-party assets, no third-party requests).
   Variable font, weight range 400-700, split by unicode subset. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surfaces */
  --paper: #F6F5F2;
  --panel: #FFFFFF;
  --ink: #141414;
  --ink-hero: #1A1A1A;
  --ink-hover: #2C2C2C;

  /* Text */
  --text: #2C2C2C;
  --muted: #5C5C5C;
  --faint: #8A8880;

  /* Lines */
  --card-line: #E3E1DC;
  --rule-strong: #DFDCD5;
  --rule-light: #EAE7E1;
  --divider: #D8D5CF;
  --footer-line: #2A2A2A;

  /* Accent (kickers, step numbers, links only; never fills a button) */
  --accent: #3B5573;
  --accent-hover: #2C4159;

  /* Text on ink */
  --on-ink: #F6F5F2;
  --on-ink-2: #C9C7C2;
  --on-ink-3: #A8A6A1;

  --radius: 6px;
  --pad-x: 48px;
}

/* Base ------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

::selection { background: rgba(59, 85, 115, 0.16); }

img { max-width: 100%; }

h1, h2, h3, h4, p { margin: 0; }

/* Kickers ------------------------------------------------------------------ */

.kicker {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.kicker--sm { font-size: 11px; }

.kicker--on-ink {
  color: var(--on-ink-3);
  font-weight: 400;
}

/* Headings ----------------------------------------------------------------- */

.hero h1 {
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  max-width: 17ch;
  margin: 0 0 16px;
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.panel-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

/* Buttons -------------------------------------------------------------------
   On paper: solid ink / bordered secondary. On ink: solid paper / bordered.
   The accent never fills a button. */

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn--lg { padding: 11px 22px; }
.btn--sm { padding: 9px 18px; }

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

.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #E4E1DA; color: var(--ink); }

.btn-outline { border: 1px solid var(--divider); color: var(--text); padding: 9px 19px; }
.btn-outline:hover { border-color: var(--on-ink-3); color: var(--text); }
.btn--lg.btn-outline { padding: 10px 21px; }

.btn-outline-ink { border: 1px solid #5C5C5C; background: rgba(20, 20, 20, 0.8); color: var(--on-ink); padding: 9px 19px; }
.btn-outline-ink:hover { border-color: #8A8A8A; background: rgba(28, 28, 28, 0.9); color: var(--on-ink); }
.btn--lg.btn-outline-ink { padding: 10px 21px; }

/* Nav ------------------------------------------------------------------------ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: var(--on-ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 14px var(--pad-x);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-ink);
  text-decoration: none;
  margin-right: auto;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}

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

.brand-mark {
  border: 1px solid #3A3A3A;
  padding: 2px 8px;
  white-space: nowrap;
}

.brand img {
  display: block;
  height: 18px;
  width: auto;
}

.footer-brand .brand img { height: 16px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links > a {
  color: var(--on-ink-2);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.nav-links > a:not(.btn):hover { color: var(--on-ink); }

.nav-links > a.active {
  color: var(--on-ink);
  font-weight: 600;
}

.nav-links > .btn { color: var(--ink); }
.nav-links > .btn:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid #4A4A4A;
  color: var(--on-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius);
  cursor: pointer;
}

/* Heroes ----------------------------------------------------------------------
   One full-height band on every page (.hero and .page-hero). */

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #050506;
  color: var(--on-ink);
  min-height: 560px;
  display: flex;
  align-items: center;
}

/* Ambient colour wells (home uses img; page-hero paints contour in CSS) */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.18) 0%, rgba(0, 210, 255, 0) 68%);
  pointer-events: none;
  z-index: 0;
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -15%;
  width: min(80vw, 820px);
  height: min(80vw, 820px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 70, 220, 0.16) 0%, rgba(110, 70, 220, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.page-hero {
  background:
    linear-gradient(90deg,
      rgba(5, 5, 6, 0.88) 0%,
      rgba(5, 5, 6, 0.62) 32%,
      rgba(5, 5, 6, 0.22) 58%,
      rgba(5, 5, 6, 0.05) 100%),
    linear-gradient(180deg,
      rgba(5, 5, 6, 0.7) 0%,
      rgba(5, 5, 6, 0.15) 28%,
      rgba(5, 5, 6, 0) 48%),
    linear-gradient(0deg,
      rgba(5, 5, 6, 0.45) 0%,
      rgba(5, 5, 6, 0) 36%),
    radial-gradient(ellipse 55% 80% at 78% 42%, rgba(0, 220, 255, 0.14) 0%, transparent 62%),
    radial-gradient(ellipse 50% 70% at 18% 90%, rgba(120, 70, 230, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 92% 12%, rgba(59, 85, 115, 0.22) 0%, transparent 55%),
    url("bg-contour-cyan.svg") center / cover no-repeat #050506;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: brightness(1.05) contrast(1.12) saturate(1.15);
  z-index: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg,
      rgba(5, 5, 6, 0.88) 0%,
      rgba(5, 5, 6, 0.62) 32%,
      rgba(5, 5, 6, 0.22) 58%,
      rgba(5, 5, 6, 0.05) 100%),
    linear-gradient(180deg,
      rgba(5, 5, 6, 0.7) 0%,
      rgba(5, 5, 6, 0.15) 28%,
      rgba(5, 5, 6, 0) 48%),
    linear-gradient(0deg,
      rgba(5, 5, 6, 0.45) 0%,
      rgba(5, 5, 6, 0) 36%);
}

.hero-inner,
.page-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 980px;
  min-height: 560px;
  padding: 128px var(--pad-x) 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.hero-inner { max-width: 900px; }

.hero-inner .kicker--on-ink,
.page-hero .kicker--on-ink {
  margin-bottom: 14px;
}

.hero .lead,
.page-hero .lead {
  font-size: 17px;
  color: #D5D3CE;
  max-width: 56ch;
  margin: 0 0 26px;
}

/* Inner pages: same band height as home; slightly smaller type than home H1 */
.page-hero h1,
.hero-title--page {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  max-width: 28ch;
  margin: 0 0 12px;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.45);
}

.hero h1:not(.hero-title--page) {
  text-shadow: 0 1px 22px rgba(0, 0, 0, 0.4);
}

.hero-actions { display: flex; gap: 12px; }

/* Sections ----------------------------------------------------------------- */

.section { padding: 36px var(--pad-x); }
.section--first { padding: 44px var(--pad-x); }

.section-intro {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 20px;
}

.section-divider {
  height: 1px;
  background: var(--card-line);
  margin: 0 var(--pad-x);
}

/* Grids ---------------------------------------------------------------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1100px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 20px;
}

.grid-4--wide { gap: 20px; }

/* Cards ----------------------------------------------------------------------- */

.card {
  background: var(--panel);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
}

.card--hover { transition: border-color 0.15s, box-shadow 0.15s; }

.card--hover:hover {
  border-color: #C4C1B9;
  box-shadow: 0 2px 10px rgba(20, 20, 20, 0.06);
}

.product-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card .kicker--sm { margin-bottom: 0; }

.product-card .name { font-size: 18px; font-weight: 600; }

.product-card .desc { font-size: 14px; color: var(--muted); }

.product-card .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  font-size: 13px;
}

.product-card .meta-row .label { color: var(--faint); }

.product-card .meta-row a {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* Rule-topped list items (services, eight ways) ------------------------------ */

.rule-item {
  border-top: 1px solid var(--divider);
  padding-top: 10px;
}

.rule-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 3px;
}

.rule-item p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Numbered steps (approach, principles) --------------------------------------- */

.step .num {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.step h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 3px;
}

.step p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Info cards (typical problems) ------------------------------------------------ */

.info-card { padding: 18px; }

.info-card .kicker--sm { margin-bottom: 6px; }

.info-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}

.info-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* White bordered panels and bars ------------------------------------------------ */

.panel {
  margin: 0 var(--pad-x);
  padding: 24px 28px;
  max-width: 1100px;
}

.panel p { color: var(--muted); max-width: 66ch; }
.panel p + p { margin-top: 6px; }
.panel .fine { font-size: 14px; }

.bar {
  margin: 8px var(--pad-x) 36px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.bar .strong { font-size: 14px; font-weight: 600; }
.bar .note { font-size: 14px; color: var(--muted); }
.bar .pipe { color: var(--divider); }
.bar .btn { margin-left: auto; }

.bar--stack { gap: 20px; margin-bottom: 40px; }
.bar--stack .btn { margin-left: auto; }
.bar--stack .lead-line { font-size: 16px; font-weight: 600; }
.bar--stack p { font-size: 13px; color: var(--muted); }

/* Slim CTA row ------------------------------------------------------------------- */

.cta-row {
  padding: 28px var(--pad-x) 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-row--flush { padding-top: 0; }

.cta-row .ask { font-size: 17px; font-weight: 600; }

/* Product detail splits (products page) -------------------------------------------- */

.split {
  padding: 36px var(--pad-x);
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 40px;
  max-width: 1200px;
}

.split .blurb { color: var(--muted); max-width: 48ch; margin: 0 0 8px; }

.split .fine { font-size: 14px; color: var(--faint); margin: 0 0 14px; }

.split .actions { display: flex; gap: 12px; }

.feature-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.feature-card { padding: 14px 18px; }

.feature-card .name { font-weight: 600; font-size: 14px; }

.feature-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0 0;
}

/* About: who we are + spec list ------------------------------------------------------ */

.split-about {
  padding: 44px var(--pad-x) 32px;
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: 56px;
  max-width: 1148px;
  align-items: start;
}

.split-about .who h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.split-about .who p { color: var(--muted); margin: 0 0 8px; }
.split-about .who p.fine { font-size: 14px; margin: 0; }

.spec-list {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 0 24px;
  padding-top: 4px;
  margin: 0;
}

.spec-list .spec-head {
  grid-column: 1 / -1;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 10px;
}

.spec-list dt {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--rule-light);
  padding: 10px 0;
  margin: 0;
}

.spec-list dd {
  font-size: 14px;
  border-top: 1px solid var(--rule-light);
  padding: 10px 0;
  margin: 0;
}

.spec-list dt:first-of-type,
.spec-list dd:first-of-type { border-top-color: var(--rule-strong); }

.panel--about { max-width: 1090px; }

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

.split-contact {
  padding: 36px var(--pad-x) 44px;
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 40px;
  max-width: 1200px;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-channels .channel-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}

.contact-channels a {
  font-size: 16px;
  font-weight: 500;
}

.contact-channels .hours {
  font-size: 15px;
  color: var(--muted);
}

.contact-note {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted);
}

.enquiry-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.enquiry-form .form-title { font-size: 17px; font-weight: 600; }

.enquiry-form .form-hint {
  font-size: 13px;
  color: var(--faint);
  margin: 2px 0 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.enquiry-form label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.enquiry-form input,
.enquiry-form textarea,
.enquiry-form select {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 8px 10px;
  width: 100%;
}

.enquiry-form input:focus,
.enquiry-form textarea:focus,
.enquiry-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.enquiry-form textarea { resize: vertical; }

.form-status {
  display: none;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.form-status.is-visible { display: block; }

/* Legal pages -------------------------------------------------------------------------- */

.legal-wrap { padding: 40px var(--pad-x) 48px; }

.legal { max-width: 800px; }

.legal h1,
.legal .page-title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 20px;
}

.legal h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
}

.legal p,
.legal li {
  color: var(--muted);
  margin: 0 0 10px;
}

.legal-meta {
  font-size: 14px;
  color: var(--faint);
  margin: 0 0 24px;
  line-height: 1.55;
}

.legal-list {
  margin: 0 0 14px;
  padding-left: 1.25em;
}

.legal-list li {
  margin-bottom: 6px;
}

.legal a {
  word-break: break-word;
}

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

.site-footer {
  background: var(--ink);
  color: var(--on-ink);
  padding: 32px var(--pad-x) 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .brand { margin: 0 0 8px; }

.footer-brand p {
  font-size: 13px;
  color: var(--on-ink-3);
  margin: 0;
}

.foot-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
}

.footer-links a {
  color: var(--on-ink-2);
  text-decoration: none;
}

.footer-links a:hover { color: var(--on-ink); }

.footer-links span { color: var(--on-ink-3); }

.footer-meta {
  border-top: 1px solid var(--footer-line);
  margin-top: 24px;
  padding-top: 14px;
  font-size: 12px;
  color: var(--faint);
}

/* Responsive -------------------------------------------------------------------------------
   References are desktop at 1440px. Below ~1024px: 4-col grids to 2, splits to
   single column. Below ~640px: 1 column, side padding 20px, hero h1 32px. */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .split,
  .split-about,
  .split-contact { grid-template-columns: 1fr; }

  .split-about { gap: 32px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 12px;
  }

  .nav-links.open { display: flex; }
}

@media (max-width: 640px) {
  :root { --pad-x: 20px; }

  .grid-3,
  .grid-4,
  .form-grid { grid-template-columns: 1fr; }

  .hero h1 { font-size: 32px; }

  .hero,
  .page-hero,
  .hero-inner,
  .page-hero-inner {
    min-height: 420px;
  }

  .hero-inner,
  .page-hero-inner {
    padding-top: 80px;
    padding-bottom: 72px;
  }

  .page-hero h1,
  .hero-title--page,
  .legal h1,
  .legal .page-title { font-size: 28px; }

  .footer-grid { grid-template-columns: 1fr; }

  .bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .bar .pipe { display: none; }

  .bar .btn,
  .cta-row .btn { margin-left: 0; }

  .bar .btn { margin-top: 6px; }

  .hero-actions,
  .split .actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card--hover { transition: none; }
}
