/* obyx.au: the public website's stylesheet. Separate from Facet's own CSS
   (kept out of app/assets so Facet never loads it). No web fonts (system
   stack), no inline styles anywhere, so the site's CSP can be strict.
   Every colour is a variable: lib/site_assets/themes/<name>.css overrides
   them, and the builder appends the chosen theme to this file. These
   defaults are the navy theme. */
:root {
  --ink: #0d1b2a;            /* headings on light backgrounds */
  --text: #2b3a4a;           /* body text */
  --page: #ffffff;           /* page background */
  --muted: #f3f6fa;          /* alternate band background */
  --line: #dbe3ec;           /* borders */
  --link: #1668b8;
  --link-hover: #0f4f8f;
  --accent: #3aa0f0;         /* eyebrow labels */
  --header-bg: #ffffff;
  --header-ink: #0d1b2a;
  --nav-hover: #f3f6fa;
  --logo-filter: none;       /* invert(1) turns the black wordmark white */
  --hero-bg: linear-gradient(160deg, #0b2540 0%, #12385e 100%);
  --hero-text: #dce8f4;
  --hero-heading: #ffffff;
  --btn-bg: #1668b8;
  --btn-text: #ffffff;
  --btn-hover: #0f4f8f;
  --ghost-on-dark: rgba(255, 255, 255, 0.55);
  --card-title: #0b2540;
  --step-bg: #1668b8;
  --step-text: #ffffff;
  --cta-bg: #1668b8;
  --cta-text: #e8f2fc;
  --cta-heading: #ffffff;
  --cta-btn-bg: #ffffff;
  --cta-btn-text: #0b2540;
  --cta-btn-hover: #e6f0fa;
  --footer-bg: #0b2540;
  --footer-text: #b9cbdd;
  --footer-link: #dce8f4;
  --footer-head: #ffffff;
  --field-border: #b9c7d6;
  --focus: rgba(58, 160, 240, 0.35);
  --soft-text: #5b6b7c;
  --radius: 10px;
  --wrap: 72rem;
  --narrow: 46rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--page);
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--btn-bg); color: var(--btn-text); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: var(--narrow); }

/* Header and navigation: a row on wide screens, a <details> menu on phones
   (two copies of the links, so neither needs JavaScript). */
.site-header { border-bottom: 1px solid var(--line); background: var(--header-bg); position: relative; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; }
.brand img { display: block; height: 2.6rem; width: auto; filter: var(--logo-filter); }
.nav-wide { display: none; gap: 0.25rem; }
.nav-wide a, .menu nav a { padding: 0.55rem 0.8rem; color: var(--header-ink); text-decoration: none; border-radius: 6px; font-weight: 500; }
.nav-wide a:hover, .nav-wide a[aria-current="page"], .menu nav a:hover, .menu nav a[aria-current="page"] { background: var(--nav-hover); }
.nav-wide a.nav-cta, .menu nav a.nav-cta { background: var(--btn-bg); color: var(--btn-text); font-weight: 600; }
.nav-wide a.nav-cta:hover, .menu nav a.nav-cta:hover { background: var(--btn-hover); }
.menu summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--header-ink); padding: 0.5rem 0.85rem; border: 1px solid var(--line); border-radius: var(--radius); }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 1.25rem; left: 1.25rem; top: 4.25rem; background: var(--header-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem; z-index: 5; display: grid; }
@media (min-width: 60rem) {
  .nav-wide { display: flex; }
  .menu { display: none; }
}

/* Bands */
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band.muted { background: var(--muted); }
.hero { background: var(--hero-bg); color: var(--hero-text); }
.hero h1, .hero h2 { color: var(--hero-heading); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; font-weight: 700; color: var(--accent); margin-bottom: 1rem; }
.lead, .intro { font-size: 1.15rem; }
.intro { max-width: var(--narrow); margin-bottom: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.button { display: inline-block; background: var(--btn-bg); color: var(--btn-text); font-weight: 600; text-decoration: none; padding: 0.8rem 1.4rem; border-radius: var(--radius); border: 2px solid var(--btn-bg); cursor: pointer; font-size: 1rem; font-family: inherit; }
.button:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-text); }
.button.ghost { background: transparent; color: var(--hero-heading); border-color: var(--ghost-on-dark); }
.button.ghost:hover { border-color: var(--hero-heading); }
.band:not(.hero) .button.ghost { color: var(--link); border-color: var(--link); }
.button.light { background: var(--cta-btn-bg); color: var(--cta-btn-text); border-color: var(--cta-btn-bg); }
.button.light:hover { background: var(--cta-btn-hover); border-color: var(--cta-btn-hover); color: var(--cta-btn-text); }

/* Cards and steps */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; background: var(--page); display: flex; flex-direction: column; }
.card h3 { color: var(--card-title); }
.card-link { margin-top: auto; margin-bottom: 0; font-weight: 600; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); counter-reset: step; }
.steps li { background: var(--page); border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); position: relative; }
.step-num { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 0.35rem; border-radius: 999px; background: var(--step-bg); color: var(--step-text); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.75rem; font-variant-numeric: tabular-nums; }

.prose h2 { margin-top: 0; }
.site-list { padding-left: 1.2rem; margin: 0 0 1em; }
.site-list li { margin-bottom: 0.35em; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.faq details p { margin: 0.75rem 0 0; }

/* Call to action */
.cta { background: var(--cta-bg); color: var(--cta-text); text-align: center; }
.cta h2 { color: var(--cta-heading); }
.cta .actions { justify-content: center; }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }
.contact-details { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin-top: 1.5rem; }
.contact-details dt { font-weight: 600; color: var(--ink); }
.contact-details dd { margin: 0; }
.enquiry { display: grid; gap: 1rem; background: var(--muted); padding: 1.75rem; border-radius: var(--radius); }
.enquiry label { display: grid; gap: 0.35rem; font-weight: 600; color: var(--ink); }
.enquiry input, .enquiry textarea { font: inherit; font-weight: 400; padding: 0.7rem 0.8rem; border: 1px solid var(--field-border); border-radius: 8px; background: var(--page); color: var(--text); width: 100%; }
.enquiry input:focus, .enquiry textarea:focus { outline: 3px solid var(--focus); border-color: var(--link); }
.enquiry .button { justify-self: start; }
.optional { font-weight: 400; color: var(--soft-text); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: 0.9rem; color: var(--soft-text); margin: 0; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 3rem 0 1.5rem; font-size: 0.95rem; }
.site-footer a { color: var(--footer-link); text-decoration: none; }
.site-footer a:hover { color: var(--footer-head); text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.footer-brand, .footer-head { color: var(--footer-head); font-weight: 700; margin-bottom: 0.5rem; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.85rem; }
.footer-base p { margin: 0; }
.footer-base a { margin-right: 1rem; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-header .menu, .site-footer, .enquiry { display: none; } .hero { background: none; color: var(--text); } .hero h1 { color: var(--ink); } }

/* Ticker: a band of service names scrolling sideways (two copies of the
   list so the loop is seamless; the second is hidden from screen readers). */
.ticker { background: var(--ticker-bg, var(--footer-bg)); color: var(--ticker-text, var(--footer-head)); overflow: hidden; border-top: 1px solid var(--ticker-line, rgba(255, 255, 255, 0.12)); border-bottom: 1px solid var(--ticker-line, rgba(255, 255, 255, 0.12)); }
.ticker-track { display: flex; width: max-content; }
.ticker-list { display: flex; list-style: none; margin: 0; padding: 1rem 0; }
.ticker-list li { white-space: nowrap; padding: 0 1.25rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; }
.ticker-list li::after { content: "/"; margin-left: 2.5rem; opacity: 0.35; }

/* Motion: everything here is opt-in. Hero intro, ticker and scan effects
   run only when the visitor has not asked for reduced motion; scroll
   reveals need site.js too (it adds the "motion" class). */
@media (prefers-reduced-motion: no-preference) {
  .intro-1, .intro-2, .intro-3, .intro-4 { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .intro-2 { animation-delay: 0.08s; }
  .intro-3 { animation-delay: 0.18s; }
  .intro-4 { animation-delay: 0.28s; }
  .ticker-track { animation: ticker 38s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  .motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
  .motion .reveal.is-visible { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Scroll extras, added by site.js only when motion is on: a progress line
   under the header, and a faint outlined section index ("/01") behind
   each band that drifts slower than the page (site.js sets --p from -1 to
   1 as the band crosses the screen). */
.scroll-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--progress, var(--btn-bg)); transform-origin: 0 50%; transform: scaleX(var(--scroll, 0)); z-index: 20; pointer-events: none; }
.motion .band[data-index]:not(.hero):not(.cta) { position: relative; overflow: hidden; isolation: isolate; }
.motion .band[data-index]:not(.hero):not(.cta)::after {
  content: attr(data-index); position: absolute; right: -0.04em; top: 50%; z-index: -1; pointer-events: none;
  font-size: clamp(8rem, 22vw, 19rem); font-weight: 800; line-height: 1; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px var(--watermark, rgba(0, 0, 0, 0.07));
  transform: translateY(calc(-50% + var(--p, 0) * 70px));
}
@media print { .motion .reveal { opacity: 1; transform: none; } .ticker, .scroll-progress { display: none; } .band::after { display: none; } }

/* Black and white: black header, hero, calls to action and footer; white
   content bands; black buttons on white, white buttons on black. */
:root {
  --ink: #000000;
  --text: #262626;
  --muted: #f4f4f4;
  --line: #dddddd;
  --link: #000000;
  --link-hover: #444444;
  --accent: #bdbdbd;
  --header-bg: #000000;
  --header-ink: #ffffff;
  --nav-hover: #1c1c1c;
  --logo-filter: invert(1);
  --hero-bg: #000000;
  --hero-text: #d6d6d6;
  --hero-heading: #ffffff;
  --btn-bg: #ffffff;
  --btn-text: #000000;
  --btn-hover: #e2e2e2;
  --ghost-on-dark: rgba(255, 255, 255, 0.6);
  --card-title: #000000;
  --step-bg: #000000;
  --step-text: #ffffff;
  --cta-bg: #000000;
  --cta-text: #d6d6d6;
  --cta-heading: #ffffff;
  --cta-btn-bg: #ffffff;
  --cta-btn-text: #000000;
  --cta-btn-hover: #e2e2e2;
  --footer-bg: #000000;
  --footer-text: #a8a8a8;
  --footer-link: #ffffff;
  --footer-head: #ffffff;
  --field-border: #bbbbbb;
  --focus: rgba(0, 0, 0, 0.25);
  --soft-text: #666666;
}
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.site-header { border-bottom-color: #222222; }
.menu summary, .menu nav { border-color: #333333; }
/* On white bands the buttons are black with white text. */
.band:not(.hero):not(.cta) .button:not(.ghost), .enquiry .button { background: #000000; color: #ffffff; border-color: #000000; }
.band:not(.hero):not(.cta) .button:not(.ghost):hover, .enquiry .button:hover { background: #333333; border-color: #333333; }
.band:not(.hero) .button.ghost { color: #000000; border-color: #000000; }

/* ---- Flair for black and white ---------------------------------------- */
:root {
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --ticker-bg: #ffffff;
  --ticker-text: #000000;
  --ticker-line: #000000;
  --progress: #000000;
  --watermark: rgba(0, 0, 0, 0.08);
}
h1 { letter-spacing: -0.035em; }
h2 { letter-spacing: -0.02em; }

/* Hero: dot grid, a pointer-following spotlight (site.js sets --mx/--my),
   a scan line sweeping down, and a blinking cursor after the headline. */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at var(--mx, 75%) var(--my, 30%), rgba(255, 255, 255, 0.13), transparent 38%),
    radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; top: -30%; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.05) 85%, rgba(255, 255, 255, 0.18) 99%, transparent);
  opacity: 0;
}
.hero h1::after {
  content: ""; display: inline-block; width: 0.42em; height: 0.82em; margin-left: 0.12em; vertical-align: -0.06em;
  background: #ffffff;
}
.eyebrow, .ticker-list li, .footer-head { font-family: var(--mono); }
.eyebrow::before { content: "> "; color: #ffffff; }

/* Buttons: an arrow slides in on hover. */
.button { position: relative; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, padding 0.2s ease; }
.button:not(.ghost)::after { content: "→"; display: inline-block; width: 0; opacity: 0; overflow: hidden; vertical-align: top; transition: width 0.2s ease, opacity 0.2s ease, margin 0.2s ease; }
.button:not(.ghost):hover::after { width: 1em; opacity: 1; margin-left: 0.45em; }

/* Links: an underline that draws in. */
.card-link a, .prose a, .contact-details a, .small a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.25s ease;
}
.card-link a:hover, .prose a:hover, .contact-details a:hover, .small a:hover { background-size: 0 1px; background-position: 100% 100%; }

/* Cards flip to black on hover. */
.card { transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; border-color: #000000; }
.card:hover { background: #000000; color: #d6d6d6; transform: translateY(-4px); box-shadow: 8px 8px 0 #d9d9d9; }
.card:hover h3, .card:hover a { color: #ffffff; }

/* Steps: big monospace numbers, 01 / 02 / 03, under a rule that draws in.
   site.js decodes each number (random digits settling on the real one). */
.steps li { border: 0; border-radius: 0; background: transparent; padding: 1.25rem 0 0; }
.steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #000000; transform-origin: 0 50%; }
.step-num {
  display: block; min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; color: #000000;
  font-family: var(--mono); font-size: 2.6rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: 1rem;
}
.motion .steps li::before { transform: scaleX(0); transition: transform 0.9s cubic-bezier(0.6, 0, 0.2, 1); transition-delay: calc(var(--i, 0) * 160ms); }
.motion .steps li.is-visible::before { transform: scaleX(1); }
.band.muted { background: #f4f4f4; }

/* Section headings get a short rule. */
.band:not(.hero):not(.cta) h2::before { content: ""; display: block; width: 2.5rem; height: 3px; background: #000000; margin-bottom: 1rem; }

/* FAQ: plus and minus markers. */
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 1.3rem; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }

/* Call to action: faint diagonal lines. */
.cta { background: repeating-linear-gradient(135deg, #000000 0 14px, #070707 14px 28px); }

@media (prefers-reduced-motion: no-preference) {
  .hero::after { animation: scan 7s linear infinite 1.2s; }
  .hero h1::after { animation: blink 1.1s steps(1) infinite; }
}
@keyframes scan { 0% { top: -30%; opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { top: 105%; opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
