/* Mote Technology Group: shared styles for every page */

/* Fonts: self-hosted Latin subsets from Google Fonts (SIL OFL, see /fonts/OFL.txt).
   Each family is one variable file, declared once per weight the site uses,
   the same way Google's own stylesheet declared them. */
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/space-grotesk-latin-500-700.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;
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/space-grotesk-latin-500-700.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;
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/fonts/space-grotesk-latin-500-700.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;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-stretch: 100%; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-400-600.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;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-stretch: 100%; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-400-600.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;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-stretch: 100%; font-display: swap;
  src: url(/fonts/ibm-plex-sans-latin-400-600.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;
}

/* Tokens: Midnight Copper palette, type, layout */
:root {
  --ink: #0C1526;
  --text: #352F33;
  --muted: #5A5059;
  --page: #F7F4F0;
  --surface: #FFFFFF;
  --border: #E5DED5;
  --accent: #9A4F26;
  --band: #F3E9DF;
  --on-dark: #EEE8E0;
  --accent-on-dark: #E0A878;
  --link: #8A4521;
  --link-hover: #6A3418;

  /* Roles: what each color is used for, so dark mode can remap them */
  --heading: var(--ink);
  --card: var(--page);
  --tile: var(--surface);
  --accent-hover: var(--link);
  --accent-soft: var(--accent-on-dark);
  --on-accent: #FFFFFF;
  --inverse: var(--ink);
  --on-inverse: #FFFFFF;
  --about-bg: var(--ink);
  --about-heading: #FFFFFF;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;

  --content-width: 1160px;
  --gutter: 24px;

  /* Fluid type and spacing: phone size at 390px, desktop size at 1280px,
     scaling linearly in between. Equal ends stay fixed. */
  --step-h1: clamp(40px, 40px + 28 * (100vw - 390px) / 890, 68px);
  --step-h2: clamp(30px, 30px + 12 * (100vw - 390px) / 890, 42px);
  --step-h2-cta: clamp(30px, 30px + 14 * (100vw - 390px) / 890, 44px);
  --step-h2-faq: clamp(26px, 26px + 8 * (100vw - 390px) / 890, 34px);
  --step-h3: 21px;
  --step-h3-lg: 24px;
  --space-section: 88px;
  --space-cta: 96px;
  --space-hero-top: clamp(24px, 24px + 16 * (100vw - 390px) / 890, 40px);
  --space-header-top: clamp(16px, 16px + 8 * (100vw - 390px) / 890, 24px);
  --space-header-bottom: clamp(8px, 8px + 16 * (100vw - 390px) / 890, 24px);
  --space-cols: clamp(40px, 40px + 8 * (100vw - 390px) / 890, 48px);

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --ease: 180ms ease;
  --lift: translateY(-1px);
  --shadow-hover: 0 6px 16px rgba(12, 21, 38, 0.14);
  --shadow-press: 0 1px 3px rgba(12, 21, 38, 0.14);
  --shadow-faint: 0 4px 14px rgba(12, 21, 38, 0.06);
  --shadow-soft: 0 0 0 1px var(--border), var(--shadow-faint);
}
/* Reduced motion: no lifts, instant color changes */
@media (prefers-reduced-motion: reduce) { :root { --ease: 0s; --lift: none; } }
/* Dark mode: follows the visitor's system setting (screen only, so print
   stays light). Navy page, lighter navy layers, cream text, light copper
   accents. The About section stays its own deeper navy. */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --page: #0C1526;
    --surface: #111C30;
    --card: #18243A;
    --band: #18243A;
    --tile: #223049;
    --border: #2C3A54;
    --heading: #F7F4F0;
    --text: #E3DCD3;
    --muted: #B3A99F;
    --accent: #E0A878;
    --accent-hover: #F0C9A5;
    --accent-soft: #9A4F26;
    --link: #E0A878;
    --link-hover: #F0C9A5;
    --on-accent: #0C1526;
    --inverse: #F7F4F0;
    --on-inverse: #0C1526;
    --about-bg: #060B16;
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.45);
    --shadow-press: 0 1px 3px rgba(0, 0, 0, 0.45);
    --shadow-faint: 0 4px 14px rgba(0, 0, 0, 0.3);
  }
}

/* Base */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--page); }
/* Avoid a lone word on the last line of a paragraph (no effect where unsupported) */
p, li { text-wrap: pretty; }
a { color: var(--link); transition: color var(--ease), text-decoration-color var(--ease); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.page {
  min-height: 100vh;
  background: var(--page);
  color: var(--heading);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
.page-404 { display: flex; flex-direction: column; }

.skip-link {
  position: absolute; left: 16px; top: -80px; z-index: 10;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-sm); background: var(--inverse); color: var(--on-inverse);
  font-family: var(--font-body); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--on-inverse); }

/* Layout */
.section { max-width: var(--content-width); margin: 0 auto; padding: var(--space-section) var(--gutter); }
.section-white { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title {
  margin: 0 0 48px; font-family: var(--font-heading);
  font-size: var(--step-h2); letter-spacing: -0.02em; line-height: 1.15;
}
.section-title-tight { margin-bottom: 12px; }
.section-title-mid { margin-bottom: 32px; }
.section-intro { margin: 0 0 48px; max-width: 620px; color: var(--text); }
.section-outro { margin: 32px 0 0; color: var(--text); }

/* Header and nav */
.site-header {
  width: 100%; max-width: calc(var(--content-width) + 2 * var(--gutter)); box-sizing: border-box;
  margin: 0 auto; padding: var(--space-header-top) var(--gutter) var(--space-header-bottom);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 14px; min-height: 44px; text-decoration: none; color: var(--heading); }
.brand:hover { color: var(--heading); }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.brand-mark { flex: 0 0 auto; }
.mark-line { fill: none; stroke: var(--heading); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.mark-nodes { fill: var(--heading); }
.mark-hub { fill: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 500;
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 8px;
}
.nav-link:hover { color: var(--heading); text-decoration-color: var(--accent-soft); }
.nav-short { display: none; }
.site-nav a[aria-current="page"] {
  color: var(--heading); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 8px;
}
.nav-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-sm); background: var(--inverse); color: var(--on-inverse); text-decoration: none; font-weight: 600;
  transition: box-shadow var(--ease), transform var(--ease);
}
.nav-cta:hover { color: var(--on-inverse); transform: var(--lift); box-shadow: var(--shadow-hover); }
.nav-cta:active { transform: none; box-shadow: var(--shadow-press); }
@media (max-width: 640px) {
  .site-header { row-gap: 4px; }
  .nav-cta { display: none; }
  .site-nav { column-gap: 14px; row-gap: 0; font-size: 15px; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
}

/* Hero */
.hero { max-width: var(--content-width); margin: 0 auto; padding: var(--space-hero-top) var(--gutter) var(--space-section); }
.hero-split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-compact { padding-bottom: 56px; }
.hero-text { flex: 999 1 560px; min-width: 0; }
.hero-title {
  margin: 0 0 24px; font-family: var(--font-heading); font-weight: 700;
  font-size: var(--step-h1); line-height: 1.05; letter-spacing: -0.025em;
}
.lead { margin: 0 0 36px; max-width: 600px; font-size: 20px; color: var(--text); }
.lead-wide { max-width: 680px; }
.hero-compact .lead { margin-bottom: 0; }
.strong-link { font-weight: 600; }
.hero-net { flex: 1 1 320px; min-width: 0; }
.hero-net svg { display: block; width: 100%; height: auto; }
.net-edges { stroke: var(--heading); }
.net-nodes { fill: var(--heading); }
.net-hub { fill: var(--accent); }
/* Hero motion: pulses travel along three edges into the hub (SVG animateMotion)
   and a soft ring grows and fades around it. Both are off for reduced motion. */
.net-pulses { fill: var(--accent); }
.net-glow { fill: none; stroke: var(--accent); stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
@keyframes net-glow { from { opacity: 0.35; transform: scale(1); } to { opacity: 0; transform: scale(2.1); } }
@media (prefers-reduced-motion: no-preference) { .net-glow { animation: net-glow 3.6s ease-out infinite; } }
@media (prefers-reduced-motion: reduce) { .net-pulses { display: none; } }
@media (max-width: 999px) {
  .hero-net { flex: 0 0 240px; }
  .hero-text { flex-basis: 420px; }
}
@media (max-width: 859px) { .hero-net { display: none; } }

/* Eyebrows and group labels */
.eyebrow, .group-label { font-weight: 600; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; }
.eyebrow { margin: 0 0 20px; color: var(--accent); }
.group-label { margin: 0 0 16px; color: var(--muted); }
.group-label-spaced { margin-top: 48px; }
.how-cols .group-label { margin-bottom: 24px; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-row-center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px;
  border-radius: var(--radius-md); text-decoration: none; font-weight: 600; font-size: 17px;
  transition: color var(--ease), background-color var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.btn:hover { transform: var(--lift); box-shadow: var(--shadow-hover); }
.btn:active { transform: none; box-shadow: var(--shadow-press); }
.btn-lg { padding-left: 28px; padding-right: 28px; }
.btn-wrap { padding-top: 8px; padding-bottom: 8px; box-sizing: border-box; max-width: 100%; text-align: center; }
.btn-primary, .btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline, .btn-outline:hover { border: 1.5px solid var(--heading); color: var(--heading); }
.btn-outline:hover { background: var(--band); }
.more-row { margin: 16px 0 0; }
.more-link {
  display: inline-block; box-sizing: border-box; min-height: 44px; padding: 8px 0; font-weight: 600;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
}
.more-link:hover { text-decoration-color: currentColor; }

/* Cards */
.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .svc-grid { grid-template-columns: minmax(0, 1fr); } }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 640px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }
.card { padding: 28px; border-radius: var(--radius-lg); background: var(--card); display: flex; flex-direction: column; gap: 12px; }
.card, .note-card { transition: box-shadow var(--ease); }
.card:hover, .note-card:hover { box-shadow: var(--shadow-soft); }
.card-title { margin: 0; font-family: var(--font-heading); font-size: var(--step-h3); }
.card-text { margin: 0; color: var(--text); font-size: 16px; }
.note-card { margin: 0; padding: 28px; border-radius: var(--radius-lg); background: var(--card); color: var(--text); font-size: 16px; }
.note-card strong { font-weight: 600; color: var(--heading); }
.icon { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon .icon-dot { fill: var(--accent); }

/* "Typical projects" and similar small print */
.tp { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tp strong { font-weight: 600; }
ul.tp { padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }
.svc-note { margin: -8px 0 16px; }
.svc-after { margin: 16px 0 0; }

/* Bands */
.band { padding: 36px; border-radius: var(--radius-lg); background: var(--band); display: flex; flex-wrap: wrap; gap: 32px; }
.band-services { align-items: center; }
.band-info { column-gap: 48px; }
.band-col { flex: 1 1 360px; min-width: 0; }
.band-main { display: flex; flex-direction: column; gap: 12px; }
.band-title { margin: 0; font-family: var(--font-heading); font-size: var(--step-h3-lg); }
.band-text { max-width: 460px; }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .tile-grid { grid-template-columns: minmax(0, 1fr); } }
.tile {
  display: flex; align-items: center; padding: 16px 18px; border-radius: var(--radius-md);
  background: var(--tile); font-weight: 600; font-size: 16px; line-height: 1.4;
}
.band-area { flex: 1 1 100%; margin: 0; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text); font-size: 16px; }
.band .more-row { flex: 1 1 100%; margin: -16px 0 0; }
.box-title { margin: 0 0 12px; font-family: var(--font-heading); font-size: var(--step-h3-lg); line-height: 1.2; }
.box-lead { margin: 0 0 12px; color: var(--text); font-size: 16px; }
.prep-list { margin: 0; padding-left: 22px; color: var(--text); font-size: 16px; display: flex; flex-direction: column; gap: 6px; }

/* How it works */
.how-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-cols); }
@media (max-width: 640px) { .how-cols { grid-template-columns: minmax(0, 1fr); } }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-cols); }
@media (max-width: 640px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step-list { display: flex; flex-direction: column; gap: 32px; }
.step-num { margin: 0 0 8px; font-family: var(--font-heading); font-weight: 700; font-size: 40px; color: var(--accent); line-height: 1; }
.step-title { margin: 0 0 8px; font-family: var(--font-heading); font-size: var(--step-h3); }
.step-text { margin: 0; color: var(--text); }

/* About (dark) */
.about { background: var(--about-bg); color: var(--on-dark); }
.about-inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.about-inner picture { display: flex; flex: 0 0 auto; } /* flex, not inline, so no line box adds space under the img */
.headshot { flex: 0 0 auto; width: 200px; height: 200px; border-radius: var(--radius-xl); object-fit: cover; }
.about-text { flex: 999 1 480px; min-width: 0; }
.about .eyebrow { margin-bottom: 12px; color: var(--accent-on-dark); }
.about-title { margin-bottom: 20px; color: var(--about-heading); }
.about-copy { margin: 0 0 16px; max-width: 680px; }
.about-copy:last-child { margin-bottom: 0; }
.about :focus-visible { outline-color: var(--accent-on-dark); }

/* FAQ */
.faq-list { padding: 72px var(--gutter) var(--space-section); display: flex; flex-direction: column; gap: 56px; }
.faq-group { width: 100%; max-width: 760px; margin: 0 auto; }
.faq-group-title { margin: 0 0 20px; font-family: var(--font-heading); font-size: var(--step-h2-faq); letter-spacing: -0.02em; line-height: 1.15; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.faq details:hover { border-color: var(--accent-soft); box-shadow: var(--shadow-faint); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px;
  padding: 14px 24px; border-radius: var(--radius-lg); cursor: pointer; list-style: none;
  font-family: var(--font-heading); font-weight: 600; font-size: 19px; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; content: "+" / ""; flex: 0 0 auto; color: var(--accent); font-size: 28px; font-weight: 500; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; content: "\2212" / ""; }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--text); font-size: 16px; }

/* Closing call to action */
.cta { max-width: var(--content-width); margin: 0 auto; padding: var(--space-cta) var(--gutter); text-align: center; }
.cta-title { margin: 0 0 16px; font-family: var(--font-heading); font-size: var(--step-h2-cta); letter-spacing: -0.02em; line-height: 1.15; }
.cta-text { margin: 0 auto 32px; max-width: 520px; color: var(--text); }
.cta-text-wide { max-width: 600px; }

/* 404 */
.error-main {
  flex: 1 0 auto; width: 100%; max-width: calc(var(--content-width) + 2 * var(--gutter)); box-sizing: border-box;
  margin: 0 auto; padding: 72px var(--gutter) var(--space-cta);
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  max-width: var(--content-width); margin: 0 auto; padding: 28px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; justify-content: space-between;
  color: var(--muted); font-size: 14px;
}
.footer-email, .footer-email:hover {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600;
  text-decoration-color: var(--accent-soft); text-underline-offset: 4px;
}
.footer-email:hover { text-decoration-color: var(--accent); }

/* Scroll fade-ins: section headings and card groups fade and rise as they
   enter the viewport. Only where scroll-driven animations are supported and
   motion is welcome; the hero is never animated. */
@keyframes fade-rise { from { opacity: 0; transform: translateY(12px); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-title, .faq-group-title, .cta-title,
    .svc-grid, .card-grid, .band, .how-cols, .steps, .faq {
      animation: fade-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 160px;
    }
  }
}

/* Print: dark text on white with the logo and page content. Navigation,
   buttons and decoration are dropped; the closing email button prints as
   the address, and every FAQ answer prints expanded. */
@media print {
  @page { margin: 16mm; }
  :root {
    --space-section: 32px; --space-cta: 32px; --space-hero-top: 0px;
    --space-header-top: 0px; --space-header-bottom: 16px;
  }
  body, .page, .section-white, .about, .band, .card, .note-card, .tile, .faq details { background: none; box-shadow: none; }
  .card, .note-card, .tile, .band { border: 1px solid var(--border); }
  .page { min-height: 0; }
  .about { color: var(--text); }
  .about-title { color: var(--heading); }
  .about .eyebrow { color: var(--accent); }

  .skip-link, .site-nav, .hero-net, .icon, .btn { display: none; }
  .cta .btn-primary {
    display: inline; min-height: 0; padding: 0; background: none; color: var(--heading);
    font-size: 0; text-decoration: none;
  }
  .cta .btn-primary::after { content: attr(aria-label); font-size: 17px; }

  .section-title, .faq-group-title, .cta-title,
  .svc-grid, .card-grid, .band, .how-cols, .steps, .faq { animation: none; }

  .faq details::details-content { content-visibility: visible; }
  .faq summary::after { display: none; }

  h1, h2, h3, .group-label, .eyebrow, .svc-note { break-after: avoid; }
  .card, .note-card, .tile, .faq details, .step-list > div, .steps > div { break-inside: avoid; }
}
