/* ==========================================================================
   Ooroboros Sdn Bhd — Site styles
   Built on the official brand tokens in tokens.css (Ooroboros Design System —
   Electric Blue / Ink / Canvas Cloud / Hard-Disk, Zoho Puvi, blueprint grid).
   Load tokens.css before this file.
   ========================================================================== */

:root {
  --container: 1120px;
  --code-accent: var(--oo-blueprint);   /* deep blueprint blue — CODE division */
  --canvas-accent: var(--oo-electric);  /* electric blue — CANVAS division */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { margin: 0; -webkit-font-smoothing: antialiased; }

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

a { text-decoration: none; }

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--fg-2);
  max-width: 42em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--type-eyebrow);
  font-weight: var(--w-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: var(--s-24) 0; }
section.tight { padding: var(--s-16) 0; }

.hr {
  border: none;
  border-top: var(--bw-1) solid var(--border-1);
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: var(--w-semibold);
  padding: 14px 26px;
  border: var(--bw-1) solid transparent;
  border-radius: var(--r-1);
  color: var(--fg-1);
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

.btn.primary { background: var(--oo-electric); color: #fff; }
.btn.primary:hover { background: var(--oo-electric-deep); box-shadow: var(--shadow-electric); }

.btn.ghost { border-color: var(--border-1); color: var(--fg-1); }
.btn.ghost:hover { background: var(--bg-3); }

/* Ghost buttons sitting on dark (Ink / blueprint) grounds */
.hero .btn.ghost, .site-nav .btn.ghost, .site-footer .btn.ghost, .panel .btn.ghost {
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.hero .btn.ghost:hover, .site-nav .btn.ghost:hover, .site-footer .btn.ghost:hover, .panel .btn.ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.6);
}

.btn-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--oo-ink);
  border-bottom: var(--bw-1) solid var(--on-dark-border);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; }
.brand .logo { height: 26px; width: auto; }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: var(--w-medium);
  color: var(--on-dark-fg-2);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-base) var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--on-dark-fg-1); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--oo-electric);
}

.nav-actions { display: flex; align-items: center; gap: 24px; }
.nav-actions .btn { padding: 10px 20px; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  background: none;
  border: var(--bw-1) solid rgba(255,255,255,0.35);
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: var(--r-1);
}

/* ---------- Hero — blueprint motif ---------- */
.hero {
  padding: 140px 0 110px;
  position: relative;
  overflow: hidden;
  background: var(--oo-blueprint-deep);
  color: var(--on-dark-fg-1);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero::before {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero::after {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 128px 128px;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 16em; color: var(--on-dark-fg-1); }
.hero .lede { margin: 28px 0 40px; color: var(--on-dark-fg-2); }
.hero .eyebrow { color: var(--oo-electric); }

/* ---------- Cards / Grid ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.card {
  background: var(--bg-2);
  border: var(--bw-1) solid var(--border-1);
  padding: 40px;
  border-radius: var(--r-2);
}
.card .division { font-size: var(--type-eyebrow); letter-spacing: var(--ls-wider); text-transform: uppercase; font-weight: var(--w-bold); margin-bottom: 18px; }
.card.code .division { color: var(--code-accent); }
.card.canvas .division { color: var(--canvas-accent); }
.card p:last-child { margin-bottom: 0; }

.service-row {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
  padding: 32px 0;
  border-top: var(--bw-1) solid var(--border-2);
}
.service-row:last-child { border-bottom: var(--bw-1) solid var(--border-2); }
.service-row h3 { margin: 0; color: var(--fg-1); }
.service-row p { margin: 0; }

/* ---------- Quote / Founding lines ---------- */
blockquote.line {
  margin: 0;
  padding: 0 0 0 28px;
  border-left: var(--bw-2) solid var(--oo-electric);
  font-family: var(--font-sans);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: var(--w-light);
  color: var(--fg-1);
  line-height: var(--lh-snug);
}

.panel {
  background: var(--on-dark-bg-1);
  border-top: var(--bw-1) solid var(--on-dark-border);
  border-bottom: var(--bw-1) solid var(--on-dark-border);
  color: var(--on-dark-fg-1);
}
.panel h1, .panel h2, .panel h3, .panel h4 { color: var(--on-dark-fg-1); }
.panel p, .panel .lede { color: var(--on-dark-fg-2); }
.panel blockquote.line { color: var(--on-dark-fg-1); }
.panel .eyebrow { color: var(--oo-electric); }

/* ---------- Lists ---------- */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li {
  padding: 18px 0;
  border-top: var(--bw-1) solid var(--border-2);
  color: var(--fg-2);
  display: flex;
  gap: 16px;
}
.plain-list li:last-child { border-bottom: var(--bw-1) solid var(--border-2); }
.plain-list li::before {
  content: "—";
  color: var(--oo-electric);
  flex-shrink: 0;
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.82rem; letter-spacing: var(--ls-normal); color: var(--fg-2); }
input, textarea, select {
  background: var(--bg-2);
  border: var(--bw-1) solid var(--border-1);
  color: var(--fg-1);
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  border-radius: var(--r-1);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--oo-electric);
  box-shadow: 0 0 0 3px var(--oo-electric-soft);
}
textarea { resize: vertical; min-height: 140px; }
.hp-field { position: absolute; left: -9999px; }

.form-note { font-size: 0.85rem; color: var(--fg-3); margin-top: 18px; }

.form-notice { padding: 18px 20px; border-radius: var(--r-1); margin-bottom: 24px; }
.form-notice p { margin: 0; }
.form-notice-success { background: var(--oo-electric-soft); border: var(--bw-1) solid var(--oo-electric); color: var(--oo-ink); }
.form-notice-error { background: var(--bg-3); border: var(--bw-1) solid var(--border-1); color: var(--fg-1); }
.form-notice-error a { color: var(--oo-electric); text-decoration: underline; }

/* ---------- Contact details ---------- */
.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li { padding: 20px 0; border-top: var(--bw-1) solid var(--border-2); }
.detail-list li:last-child { border-bottom: var(--bw-1) solid var(--border-2); }
.detail-list .label { font-size: var(--type-eyebrow); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px; }
.detail-list .value { font-family: var(--font-sans); font-weight: var(--w-light); font-size: 1.25rem; color: var(--fg-1); }
.detail-list a.value:hover { color: var(--oo-electric); }

/* ---------- Footer ---------- */
.site-footer { background: var(--oo-ink); color: var(--on-dark-fg-2); border-top: var(--bw-1) solid var(--on-dark-border); padding: 64px 0 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 48px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { max-width: 26em; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-sans); font-size: var(--type-eyebrow); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--on-dark-fg-3); margin-bottom: 16px; font-weight: var(--w-semibold); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--on-dark-fg-2); font-size: 0.92rem; transition: color var(--dur-base) var(--ease-out); }
.footer-col a:hover { color: var(--oo-electric); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: var(--bw-1) solid var(--on-dark-border);
  color: var(--on-dark-fg-3);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Section heads ---------- */
.section-head { max-width: 46em; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 760px) {
  section { padding: var(--s-16) 0; }
  .hero { padding: 120px 0 72px; }
  .nav-links, .nav-actions .btn.ghost { display: none; }
  .nav-toggle { display: block; }
  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 84px 0 0 0;
    background: var(--oo-ink);
    padding: 40px 32px;
    gap: 28px;
    z-index: 99;
  }
  body.nav-open .nav-links a { font-size: 1.1rem; }
}
