/* QubeStream site styles. Mobile-first; dark mode only swaps tokens. */

:root {
  --accent: #0E3A66;
  --accent-hover: #0A2D50;
  --accent-tint: #E7EEF6;
  --on-accent: #FFFFFF;
  --link: #0E3A66;
  --focus: #0E3A66;
  --brand-maroon: #5A1414;
  --mark-bg: #0E3A66;
  --mark-fg: #FFFFFF;
  --text: #16202B;
  --text-muted: #4F5A66;
  --bg: #FAFAF8;
  --bg-alt: #F1F3F5;
  --surface: #FFFFFF;
  --border: #E3E5E8;
  --input-border: #7A8591;
  --danger: #B42318;
  --shadow: 0 10px 30px rgba(14, 58, 102, 0.08);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1120px;
  --gutter: 20px;
  --section-pad: 56px;
  --header-h: 64px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7FB0E6;
    --accent-hover: #A3C7EE;
    --accent-tint: #1B2B3D;
    --on-accent: #0F151C;
    --link: #7FB0E6;
    --focus: #7FB0E6;
    --brand-maroon: #E09A9A;
    --text: #E8ECF0;
    --text-muted: #A9B3BE;
    --bg: #0F151C;
    --bg-alt: #131B24;
    --surface: #17202A;
    --border: #2A3542;
    --input-border: #6B7A89;
    --danger: #FF9A8F;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section-pad: 64px;
  }
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

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

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.3rem + 4.2vw, 4.25rem);
  font-weight: 750;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 700;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a[href^="tel:"] {
  white-space: nowrap;
}

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

/* The skip link focuses <main>; no ring around the whole page area. */
main:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  border-color: var(--accent);
  color: var(--link);
}

.btn-secondary:hover {
  background: var(--accent-tint);
}

.btn-sm {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  text-decoration: none;
  min-height: 44px;
}

.brand-mark {
  width: 36px;
  height: 36px;
}

.brand-mark .mark-bg {
  fill: var(--mark-bg);
}

.brand-mark .mark-q {
  fill: none;
  stroke: var(--mark-fg);
  stroke-width: 7;
  stroke-linecap: round;
}

.brand-stream {
  color: var(--brand-maroon);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.no-js .nav-toggle {
  display: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 12px 4px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--link);
}

.site-nav .nav-cta {
  display: flex;
  margin-top: 8px;
  padding: 8px 16px;
  color: var(--on-accent);
}

.site-nav .nav-cta:hover {
  color: var(--on-accent);
}

/* Mobile: the nav is a drop-down panel once JS is running. */
.js .site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 8px var(--gutter) 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.js .site-nav.is-open {
  display: block;
}

.no-js .header-inner {
  flex-wrap: wrap;
  padding-bottom: 8px;
}

.no-js .site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

/* Without JS the wrapped mobile header is tall, so let it scroll away. */
@media (max-width: 767px) {
  .no-js .site-header {
    position: relative;
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
  .site-nav,
  .js .site-nav {
    display: block;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .site-nav ul,
  .no-js .site-nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
  }
  .site-nav a {
    padding: 10px 0;
  }
  .site-nav .nav-cta {
    margin-top: 0;
    padding: 8px 16px;
  }
  .no-js .header-inner {
    flex-wrap: nowrap;
    padding-bottom: 0;
  }
}

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

.section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-lede {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.section-head .section-lede {
  margin-bottom: 0;
}

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

.hero {
  padding: 48px 0 56px;
}

.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  max-width: 13ch;
}

.hero-sub {
  max-width: 60ch;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
}

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

.hero-actions .btn {
  flex: 1 1 auto;
}

.hero-art {
  display: none;
}

.art-surface {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 1.5;
}

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

.art-tint {
  fill: var(--accent-tint);
}

.art-muted {
  fill: var(--border);
}

.art-on-accent {
  fill: var(--on-accent);
}

.art-line {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
  stroke-dasharray: 4 6;
  stroke-linecap: round;
}

.art-check {
  fill: none;
  stroke: var(--link);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art-glyph {
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 960px) {
  .hero {
    padding: 80px 0 88px;
  }
  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 56px;
  }
  .hero-actions .btn {
    flex: 0 0 auto;
  }
  .hero-art {
    display: block;
    width: 100%;
    height: auto;
  }
}

/* ---------- Cards (services) ---------- */

.card-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 960px) {
  .card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card p {
  color: var(--text-muted);
}

.card p:last-child {
  margin-bottom: 0;
}

.card-icon,
.round-icon {
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent-tint);
  color: var(--link);
}

.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
}

.card-icon .icon {
  width: 28px;
  height: 28px;
}

.card-note {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

/* ---------- Steps (how it works) ---------- */

.steps {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.step {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.step p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Why QubeStream ---------- */

.why-grid {
  display: grid;
  gap: 24px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.round-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.round-icon .icon {
  width: 22px;
  height: 22px;
}

.why-item h3 {
  margin-bottom: 0.25em;
}

.why-item p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- About (hidden until the bio is ready) ---------- */

.about-inner {
  display: grid;
  gap: 32px;
  align-items: center;
}

.about-photo {
  width: 100%;
  max-width: 300px;
  border-radius: var(--radius);
}

.placeholder-text {
  color: var(--text-muted);
  font-style: italic;
}

@media (min-width: 768px) {
  .about-inner {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 56px;
  }
}

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

.section-contact {
  background: var(--accent-tint);
}

/* Phones: heading, form, then details. Desktop: heading and details left, form right. */
.contact-inner {
  display: grid;
  gap: 32px;
  grid-template-areas:
    "intro"
    "form"
    "details";
}

.contact-intro {
  grid-area: intro;
}

.contact-form-card {
  grid-area: form;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-details {
  grid-area: details;
}

@media (min-width: 900px) {
  .contact-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "intro form"
      "details form";
    align-items: start;
    gap: 32px 64px;
  }
}

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

.contact-form {
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.field-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 0.9375rem;
}

.field-error:empty {
  display: none;
}

/* Honeypot: off-screen for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn {
  justify-self: start;
}

@media (max-width: 599px) {
  .contact-form .btn {
    justify-self: stretch;
  }
}

.form-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.form-status {
  margin: 0;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  color: var(--danger);
}

.contact-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-list a {
  display: inline-block;
  padding: 10px 0;
  font-size: 1.125rem;
  font-weight: 650;
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.location {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 0;
  color: var(--text-muted);
}

.location .icon {
  width: 20px;
  height: 20px;
  color: var(--link);
}

/* ---------- Simple pages (privacy, 404) ---------- */

.page {
  padding: 48px 0 64px;
}

.prose {
  max-width: 70ch;
}

.prose h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.375rem;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.4em;
}

.updated {
  color: var(--text-muted);
}

.notfound {
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding: 72px 0;
  text-align: center;
}

.notfound-code {
  margin-bottom: 8px;
  color: var(--link);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notfound .hero-actions {
  justify-content: center;
}

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

.site-footer {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 10px 0;
  color: var(--text-muted);
}

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