/* ============================================================
   AUSEMO — Automation, Security & Monitoring
   Design system: corporate / sober / trustworthy, teal palette
   Type: IBM Plex Sans + IBM Plex Mono
   ============================================================ */

:root {
  /* Color — neutrals */
  --bg:        oklch(0.992 0.004 175);
  --bg-tint:   oklch(0.975 0.008 178);
  --surface:   #ffffff;
  --ink:       oklch(0.24 0.022 188);
  --ink-soft:  oklch(0.40 0.018 188);
  --muted:     oklch(0.54 0.014 188);
  --line:      oklch(0.905 0.009 188);
  --line-soft: oklch(0.945 0.007 188);

  /* Color — teal/green primary */
  --primary:        oklch(0.52 0.078 182);
  --primary-strong: oklch(0.44 0.082 184);
  --primary-ink:    oklch(0.34 0.06 186);
  --primary-soft:   oklch(0.955 0.022 182);
  --primary-line:   oklch(0.88 0.035 182);
  --accent:         oklch(0.70 0.105 178);

  /* Dark section */
  --dark:        oklch(0.255 0.034 188);
  --dark-2:      oklch(0.305 0.036 188);
  --dark-line:   oklch(0.40 0.03 188);
  --on-dark:     oklch(0.96 0.008 185);
  --on-dark-mut: oklch(0.74 0.018 185);
  --dark-accent: oklch(0.78 0.105 178);

  /* Type */
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Geometry */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);

  --shadow-sm: 0 1px 2px oklch(0.24 0.02 188 / 0.05), 0 2px 6px oklch(0.24 0.02 188 / 0.04);
  --shadow-md: 0 4px 14px oklch(0.24 0.02 188 / 0.07), 0 16px 40px oklch(0.24 0.02 188 / 0.06);
  --shadow-lg: 0 18px 60px oklch(0.24 0.02 188 / 0.16);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--primary); color: #fff; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 130px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--primary-line);
  display: inline-block;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.022em; line-height: 1.08; color: var(--ink); text-wrap: balance; }
.section-head { max-width: 640px; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 44px); margin-top: 18px; }
.section-head .lead { margin-top: 18px; font-size: clamp(16px, 1.4vw, 18.5px); color: var(--ink-soft); text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 500; font-size: 15.5px;
  padding: 14px 24px; border-radius: 999px;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 0 oklch(1 0 0 / 0.15) inset, var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-2px); box-shadow: 0 1px 0 oklch(1 0 0 / 0.15) inset, var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary-ink); transform: translateY(-2px); }
.btn-on-dark { background: var(--on-dark); color: var(--dark); }
.btn-on-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-block { width: 100%; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.992 0.004 175 / 0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--line); background: oklch(0.992 0.004 175 / 0.92); }
.nav { display: flex; align-items: center; gap: 28px; height: 70px; }

/* Wordmark */
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand .mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand .word { font-weight: 600; font-size: 20px; letter-spacing: 0.02em; color: var(--ink); }
.brand .word b { color: var(--primary); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  font-size: 15px; color: var(--ink-soft); padding: 8px 13px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-tint); }
.nav-spacer { flex: 1; }

/* Lang switcher */
.lang {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
  background: var(--surface);
}
.lang button {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
  padding: 5px 10px; border-radius: 999px; color: var(--muted); text-transform: uppercase;
  transition: color .15s, background .15s;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--primary); color: #fff; }

.header-cta { display: inline-flex; }

/* Mobile nav toggle */
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(48px, 7vw, 86px); padding-bottom: clamp(56px, 8vw, 100px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 82% -10%, var(--primary-soft) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-tint), var(--bg) 40%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 75% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(120% 80% at 75% 0%, #000 0%, transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero-copy { max-width: 600px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); margin-top: 22px; letter-spacing: -0.03em; }
.hero h1 .hl { color: var(--primary); }

/* ---------- Animated AUSEMO wordmark (hero headline) ---------- */
.ausemo-mark {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: center;
  justify-content: flex-start;
  gap: 8px clamp(22px, 4vw, 60px);   /* expanded: row-gap / column-gap */
  max-width: 9em;                    /* forces each long word onto its own line, keeps "AU SE MO" inline */
  min-height: 3.5em;
  line-height: 1.05;
  font-weight: 700;
  transition: gap 0.55s var(--ease);
}
.ausemo-mark.is-collapsed { gap: 0; }   /* collapsed: AU+SE+MO reads "AUSEMO" */
.ausemo-mark .am-word { display: inline-flex; align-items: baseline; white-space: nowrap; }
.ausemo-mark .am-pre  { color: var(--primary); }
.ausemo-mark .am-suf  { color: var(--ink-soft); font-weight: 600; }

/* blinking caret on the word currently being typed */
.ausemo-mark .am-word.active .am-suf::after {
  content: "";
  display: inline-block;
  width: 0.07em;
  height: 0.9em;
  margin-left: 0.04em;
  transform: translateY(0.06em);
  background: var(--accent);
  animation: am-blink 1s steps(1) infinite;
}
.ausemo-mark.typing .am-word.active .am-suf::after { animation: none; }  /* solid while typing */
@keyframes am-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .ausemo-mark { transition: none; }
  .ausemo-mark .am-word.active .am-suf::after { display: none; }
}
.hero .sub { margin-top: 22px; font-size: clamp(17px, 1.5vw, 19.5px); color: var(--ink-soft); max-width: 540px; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-trust { display: flex; align-items: center; gap: 12px; margin-top: 34px; color: var(--muted); font-size: 14px; }
.hero-trust .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--primary-soft); flex-shrink: 0; }

/* Hero console card */
.console {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
  font-family: var(--mono);
}
.console-bar { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); background: var(--bg-tint); }
.console-bar .dots { display: flex; gap: 6px; }
.console-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.console-bar .dots i:nth-child(1) { background: oklch(0.78 0.12 28); }
.console-bar .dots i:nth-child(2) { background: oklch(0.84 0.11 85); }
.console-bar .dots i:nth-child(3) { background: oklch(0.78 0.11 150); }
.console-bar .title { font-size: 12.5px; color: var(--muted); margin-left: 6px; }
.console-bar .region { margin-left: auto; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }

.console-body { padding: 20px 20px 22px; }
.console-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.metric { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 13px 14px; background: var(--bg); }
.metric .k { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.metric .v { font-family: var(--sans); font-size: 25px; font-weight: 600; letter-spacing: -0.02em; margin-top: 5px; color: var(--ink); }
.metric .v.ok { color: var(--primary); }
.metric .spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-top: 8px; }
.metric .spark i { flex: 1; background: var(--primary-line); border-radius: 2px; display: block; }
.metric .spark i.hi { background: var(--primary); }

.pipeline { display: flex; align-items: center; gap: 0; margin: 4px 0 16px; }
.pipeline .stage { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.pipeline .stage .chk { width: 18px; height: 18px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.pipeline .stage .chk svg { width: 11px; height: 11px; }
.pipeline .conn { flex: 1; height: 2px; background: linear-gradient(90deg, var(--primary-line), var(--primary-line)); margin: 0 8px; border-radius: 2px; position: relative; min-width: 14px; }
.pipeline .stage.run .chk { background: var(--primary); color: #fff; animation: pulse 1.6s var(--ease) infinite; }

.console-log { background: var(--dark); border-radius: var(--radius-sm); padding: 13px 14px; font-size: 12px; line-height: 1.85; color: var(--on-dark-mut); overflow: hidden; }
.console-log .line { white-space: nowrap; }
.console-log .p { color: var(--dark-accent); }
.console-log .g { color: oklch(0.82 0.11 150); }
.console-log .d { color: var(--on-dark-mut); }
.console-log .cursor { display: inline-block; width: 8px; height: 14px; background: var(--dark-accent); vertical-align: -2px; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }

@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 oklch(0.52 0.078 182 / 0.5); } 50% { box-shadow: 0 0 0 6px oklch(0.52 0.078 182 / 0); } }
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

/* ============================================================
   Logos / trust strip
   ============================================================ */
.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-inner { display: flex; align-items: center; gap: clamp(20px, 4vw, 48px); padding-block: 26px; flex-wrap: wrap; justify-content: center; }
.strip .label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.strip .items { display: flex; align-items: center; gap: clamp(20px, 4vw, 46px); flex-wrap: wrap; justify-content: center; }
.strip .items span { font-weight: 600; font-size: 16px; color: var(--ink-soft); letter-spacing: 0.01em; opacity: 0.85; }

/* ============================================================
   Services
   ============================================================ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 54px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px 30px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-line); }
.card .ico {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-strong); margin-bottom: 20px;
  border: 1px solid var(--primary-line);
}
.card .ico svg { width: 24px; height: 24px; stroke-width: 1.6; }
.card h3 { font-size: 19.5px; }
.card p { margin-top: 11px; color: var(--ink-soft); font-size: 15.5px; text-wrap: pretty; }
.card .num { position: absolute; top: 22px; right: 24px; font-family: var(--mono); font-size: 12px; color: var(--line); font-weight: 500; }

/* ============================================================
   Why AUSEMO
   ============================================================ */
.why { background: var(--bg-tint); border-block: 1px solid var(--line); }
.why-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
.why-points { display: grid; gap: 4px; }
.why-point { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.why-point:first-child { border-top: none; }
.why-point .pn { font-family: var(--mono); font-size: 13px; color: var(--primary); font-weight: 500; padding-top: 3px; }
.why-point h3 { font-size: 19px; }
.why-point p { margin-top: 7px; color: var(--ink-soft); font-size: 15.5px; text-wrap: pretty; }

/* ============================================================
   Certifications
   ============================================================ */
.certs-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 50px; }
.cert {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 22px 16px; text-align: center; transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.cert:hover { border-color: var(--primary-line); transform: translateY(-3px); }
.cert .badge {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 14px;
  background:
    repeating-linear-gradient(135deg, var(--primary-soft) 0 7px, var(--surface) 7px 14px);
  border: 1px solid var(--primary-line); display: grid; place-items: center;
}
.cert .badge svg { width: 28px; height: 28px; color: var(--primary); }
.cert .name { font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.cert .lvl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { background: var(--bg-tint); border-block: 1px solid var(--line); }
.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%;
  text-align: left; padding: 22px 4px; font-size: 18px; font-weight: 500; color: var(--ink);
  transition: color .15s;
}
.faq-q:hover { color: var(--primary-strong); }
.faq-q .ic { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: all .25s var(--ease); position: relative; }
.faq-q .ic::before, .faq-q .ic::after { content: ""; position: absolute; background: var(--primary); border-radius: 2px; }
.faq-q .ic::before { width: 12px; height: 2px; }
.faq-q .ic::after { width: 2px; height: 12px; transition: transform .25s var(--ease); }
.faq-item[data-open="true"] .ic { background: var(--primary); border-color: var(--primary); }
.faq-item[data-open="true"] .ic::before, .faq-item[data-open="true"] .ic::after { background: #fff; }
.faq-item[data-open="true"] .ic::after { transform: scaleY(0); }
.faq-a { overflow: hidden; height: 0; transition: height .3s var(--ease); }
.faq-a-inner { padding: 0 4px 24px; color: var(--ink-soft); font-size: 16px; max-width: 62ch; text-wrap: pretty; }

/* ============================================================
   Contact (dark)
   ============================================================ */
.contact { background: var(--dark); color: var(--on-dark); overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.6;
  background:
    radial-gradient(80% 60% at 15% 0%, oklch(0.40 0.05 184) 0%, transparent 60%),
    radial-gradient(70% 70% at 100% 100%, oklch(0.36 0.05 178) 0%, transparent 55%);
}
.contact .container { position: relative; z-index: 1; }
.contact .eyebrow { color: var(--dark-accent); }
.contact .eyebrow::before { background: var(--dark-line); }
.contact h2 { color: var(--on-dark); font-size: clamp(30px, 4.6vw, 50px); margin-top: 16px; }
.contact .lead { color: var(--on-dark-mut); margin-top: 18px; max-width: 540px; font-size: clamp(16px, 1.4vw, 18.5px); }
.contact-head { text-align: center; max-width: 640px; margin-inline: auto; }
.contact-head .lead { margin-inline: auto; }

.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.ccard {
  background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius-lg);
  padding: 30px 26px; display: flex; flex-direction: column; gap: 6px;
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.ccard:hover { transform: translateY(-4px); border-color: var(--dark-accent); background: oklch(0.33 0.038 188); }
.ccard .ico { width: 50px; height: 50px; border-radius: 13px; background: oklch(0.40 0.05 184); color: var(--dark-accent); display: grid; place-items: center; margin-bottom: 16px; }
.ccard .ico svg { width: 25px; height: 25px; stroke-width: 1.7; }
.ccard h3 { color: var(--on-dark); font-size: 21px; }
.ccard p { color: var(--on-dark-mut); font-size: 15px; flex: 1; text-wrap: pretty; }
.ccard .act { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--on-dark); font-size: 15.5px; }
.ccard .act svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.ccard:hover .act svg { transform: translateX(4px); }
.ccard .act .val { font-family: var(--mono); font-size: 14px; color: var(--dark-accent); }

.contact-foot { margin-top: 40px; text-align: center; color: var(--on-dark-mut); font-size: 14.5px; font-family: var(--mono); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--dark); color: var(--on-dark-mut); border-top: 1px solid var(--dark-line); padding-block: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner .brand .word { color: var(--on-dark); }
.footer-inner .brand .word b { color: var(--dark-accent); }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; transition: color .15s; }
.footer-nav a:hover { color: var(--on-dark); }
.footer-copy { font-size: 13px; font-family: var(--mono); width: 100%; padding-top: 24px; margin-top: 8px; border-top: 1px solid var(--dark-line); color: var(--on-dark-mut); opacity: 0.8; }

/* ============================================================
   Reveal animation
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .console { max-width: 520px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid, .faq-wrap { grid-template-columns: 1fr; gap: 36px; }
  .certs-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-cards { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}
/* Collapse the CTA before items overflow */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { height: 62px; gap: 12px; }
  .nav-spacer { display: none; }
  .lang { margin-left: auto; }
  .header-cta { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .console-metrics { grid-template-columns: 1fr; }
  .pipeline { flex-wrap: wrap; gap: 10px 0; }
}
