/* ============================================================
   Miniteq — "Sydney Signal" theme
   Custom theme: ink-navy base, electric signal accent, warm paper surfaces
   ============================================================ */

:root {
  /* palette */
  --ink: #0A1628;
  --deep: #11233F;
  --deep-2: #16294a;
  --signal: #1FB6FF;
  --signal-2: #2563EB;
  --paper: #F7F8FA;
  --white: #FFFFFF;
  --line: #E2E6EC;
  --line-dark: rgba(255, 255, 255, 0.10);
  --text: #1B2433;
  --text-soft: #51607A;
  --text-invert: #EAF1FB;
  --text-invert-soft: #9DB1CE;

  /* gradient signature */
  --signal-grad: linear-gradient(115deg, var(--signal) 0%, var(--signal-2) 100%);

  /* type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.55rem, 1.3rem + 1.2vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2.5vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.7rem + 4.4vw, 4.8rem);

  /* spacing rhythm */
  --space-section: clamp(3.5rem, 2rem + 7vw, 7rem);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1180px;
  --shadow: 0 14px 40px -18px rgba(10, 22, 40, 0.30);
  --shadow-soft: 0 6px 20px -10px rgba(10, 22, 40, 0.22);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1rem; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.section { padding-block: var(--space-section); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-2);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--signal-grad);
  display: inline-block;
}
.lede { font-size: var(--step-1); color: var(--text-soft); max-width: 60ch; line-height: 1.45; }
.center { text-align: center; }
.center .lede, .center .eyebrow { margin-inline: auto; }
.center .eyebrow { justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-0);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--signal-grad); color: var(--white); box-shadow: 0 10px 26px -10px rgba(31, 182, 255, 0.6); }
.btn-primary:hover { box-shadow: 0 16px 34px -10px rgba(31, 182, 255, 0.75); }
.btn-ghost { background: transparent; color: var(--text-invert); border-color: var(--line-dark); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--deep); }
.btn-lg { padding: 1.05rem 2rem; font-size: var(--step-1); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--white); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--signal-grad);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 0 45%, rgba(255,255,255,0.85) 50%, transparent 55% 100%);
  background-size: 100% 220%;
  animation: scan 2.6s linear infinite;
}
@keyframes scan { from { background-position: 0 -100%; } to { background-position: 0 200%; } }
.brand-mark span { font-family: var(--font-mono); font-weight: 700; color: var(--ink); font-size: 0.95rem; position: relative; z-index: 1; }

.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-invert-soft); font-size: var(--step--1); font-weight: 500; letter-spacing: 0.01em; transition: color 0.15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--white); text-decoration: none; }
.nav-cta { margin-left: 0.4rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; color: var(--white); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: currentColor; position: relative; margin: 0 auto; transition: 0.2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-links {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line-dark);
    padding: 0.5rem 0;
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .nav-links[data-open="true"] { max-height: 420px; }
  .nav-links li { padding: 0; }
  .nav-links a { display: block; padding: 0.9rem clamp(1.1rem, 4vw, 2.5rem); }
  .nav-cta { padding: 0.6rem clamp(1.1rem, 4vw, 2.5rem) 1.1rem; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- hero ---------- */
.hero {
  background: radial-gradient(120% 130% at 80% -10%, var(--deep-2) 0%, var(--ink) 55%);
  color: var(--text-invert);
  position: relative; overflow: hidden;
  padding-block: clamp(3.5rem, 2rem + 9vw, 8rem) var(--space-section);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(70% 60% at 70% 20%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 70% 20%, #000 0%, transparent 75%);
  opacity: 0.5;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--white); max-width: 16ch; }
.hero h1 .accent { background: var(--signal-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { color: var(--text-invert-soft); margin-top: 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.hero-trust { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; align-items: center; color: var(--text-invert-soft); font-size: var(--step--1); }
.hero-trust strong { color: var(--white); font-family: var(--font-display); font-size: var(--step-1); display: block; line-height: 1; margin-bottom: 0.25rem; }

/* live audit signature panel */
.audit-card {
  margin-top: 3rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(10, 22, 40, 0.5);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.audit-bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line-dark); font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-invert-soft); }
.audit-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(31,182,255,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,182,255,0.55);} 70% { box-shadow: 0 0 0 9px rgba(31,182,255,0);} 100% { box-shadow: 0 0 0 0 rgba(31,182,255,0);} }
.audit-rows { padding: 0.4rem 0; }
.audit-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; padding: 0.6rem 1rem; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-invert); border-bottom: 1px solid var(--line-dark); }
.audit-row:last-child { border-bottom: 0; }
.audit-row .metric { color: var(--text-invert-soft); }
.audit-score { font-weight: 700; }
.audit-score.good { color: #34d399; }
.audit-score.warn { color: #fbbf24; }
.audit-track { height: 5px; border-radius: 4px; background: var(--line-dark); overflow: hidden; min-width: 80px; }
.audit-fill { height: 100%; background: var(--signal-grad); border-radius: 4px; transform-origin: left; animation: fill 1.6s ease forwards; }
@keyframes fill { from { transform: scaleX(0); } }

/* ---------- generic surfaces ---------- */
.surface-paper { background: var(--paper); }
.surface-dark { background: var(--ink); color: var(--text-invert); }
.surface-dark h2, .surface-dark h3 { color: var(--white); }
.surface-dark .lede { color: var(--text-invert-soft); }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: #cdd6e2; }
.card .num { font-family: var(--font-mono); font-size: var(--step--1); color: var(--signal-2); letter-spacing: 0.1em; }
.card h3 { margin-top: 0.7rem; }
.card p { color: var(--text-soft); margin-bottom: 0; }
.card-icon {
  width: 46px; height: 46px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: rgba(31, 182, 255, 0.10);
  border: 1px solid rgba(31,182,255,0.25);
}
.card-icon svg { width: 24px; height: 24px; stroke: var(--signal-2); }
.card ul { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--text-soft); }
.card ul li { margin-bottom: 0.35rem; }

/* section heading block */
.section-head { max-width: 56ch; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; }

/* ---------- split feature ---------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.stat-band { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin-top: 1.8rem; }
.stat strong { font-family: var(--font-display); font-size: var(--step-3); display: block; line-height: 1; background: var(--signal-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--text-soft); font-size: var(--step--1); }

/* process steps (a real sequence -> numbered is justified) */
.steps { counter-reset: step; display: grid; gap: 1.2rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; padding: 1.4rem 0; border-top: 1px solid var(--line-dark); }
.step:first-child { border-top: 0; }
.step-no { font-family: var(--font-mono); color: var(--signal); font-size: var(--step-1); }
.step h3 { margin: 0 0 0.3rem; }
.step p { color: var(--text-invert-soft); margin: 0; }

/* ---------- CTA banner ---------- */
.cta-band { background: var(--signal-grad); border-radius: var(--radius); padding: clamp(2rem, 4vw, 3.5rem); color: var(--white); text-align: center; box-shadow: var(--shadow); }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.9); max-width: 52ch; margin-inline: auto; }
.cta-band .btn { margin-top: 1.4rem; }

/* ---------- form ---------- */
.form-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.6rem); box-shadow: var(--shadow-soft); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 0.4rem; color: var(--text); }
.field .hint { color: var(--text-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 0.95rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--text); background: var(--paper);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--signal-2);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: var(--step--1); color: var(--text-soft); margin-top: 0.8rem; }
.required { color: var(--signal-2); }
.form-success { display: none; background: rgba(52, 211, 153, 0.12); border: 1px solid #34d399; color: #065f46; padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; }
.form-success[data-show="true"] { display: block; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.8rem; background: var(--white); }
.faq summary { cursor: pointer; padding: 1.1rem 1.3rem; font-family: var(--font-display); font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--signal-2); font-size: 1.3rem; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.3rem 1.2rem; color: var(--text-soft); margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--text-invert-soft); padding-block: clamp(3rem, 5vw, 4.5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-mono); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: var(--text-invert-soft); font-size: var(--step--1); }
.site-footer a:hover { color: var(--white); }
.footer-about p { color: var(--text-invert-soft); font-size: var(--step--1); max-width: 34ch; }
.footer-bottom { border-top: 1px solid var(--line-dark); padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: var(--step--1); }

/* ---------- breadcrumb ---------- */
.crumb { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-soft); padding-top: 1.4rem; }
.crumb a { color: var(--text-soft); }
.crumb a:hover { color: var(--signal-2); }

/* ---------- page hero (inner pages) ---------- */
.page-hero { background: radial-gradient(120% 130% at 85% -20%, var(--deep-2) 0%, var(--ink) 60%); color: var(--text-invert); padding-block: clamp(3rem, 2rem + 6vw, 5.5rem); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px); background-size: 54px 54px; -webkit-mask-image: radial-gradient(60% 60% at 80% 0%, #000, transparent 70%); mask-image: radial-gradient(60% 60% at 80% 0%, #000, transparent 70%); opacity: 0.5; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); max-width: 20ch; }
.page-hero .lede { color: var(--text-invert-soft); margin-top: 1rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* blog */
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card .tag { font-family: var(--font-mono); font-size: var(--step--1); color: var(--signal-2); letter-spacing: 0.08em; text-transform: uppercase; }
.post-card h3 { margin: 0.6rem 0 0.5rem; }
.post-card .meta { font-size: var(--step--1); color: var(--text-soft); margin-top: auto; padding-top: 1rem; }
.article { max-width: 72ch; margin-inline: auto; }
.article h2 { margin-top: 2.4rem; }
.article h3 { margin-top: 1.8rem; }
.article ul, .article ol { color: var(--text-soft); padding-left: 1.3rem; }
.article li { margin-bottom: 0.5rem; }
.article blockquote { border-left: 3px solid var(--signal); padding-left: 1.2rem; margin: 1.6rem 0; color: var(--text); font-style: italic; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); color: var(--ink); padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   Miniteq logo — Ascending M monogram
   Append this to the END of assets/styles.css.
   (No HTML changes needed — it restyles the existing .brand /
    .brand-mark that already appear in every header & footer.)
   ============================================================ */

/* Wordmark: match the logo's uppercase MINITEQ */
.brand { text-transform: uppercase; letter-spacing: 0.015em; }

/* Hide the old "m" placeholder glyph */
.brand-mark span { display: none; }

/* Draw the Ascending M (white) on the existing gradient tile.
   The ::after scan animation is preserved. */
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cpath d='M14 82V24L49 52L82 14' fill='none' stroke='%23fff' stroke-width='12' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M82 14V82' fill='none' stroke='%23fff' stroke-width='12' stroke-linecap='round'/%3E%3Ccircle cx='82' cy='14' r='9' fill='%23fff'/%3E%3C/svg%3E") center / 58% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cpath d='M14 82V24L49 52L82 14' fill='none' stroke='%23fff' stroke-width='12' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M82 14V82' fill='none' stroke='%23fff' stroke-width='12' stroke-linecap='round'/%3E%3Ccircle cx='82' cy='14' r='9' fill='%23fff'/%3E%3C/svg%3E") center / 58% no-repeat;
}
