/* ORAMM TECHNOLOGIES corporate site.
   Same identity as SPEngine (frontend/src/index.css, validated 4 Dec 2026):
   near-monochrome ink on off-white, hairline rings, Figtree for display,
   Geist for text, Geist Mono for labels. All fonts SIL OFL 1.1, self-hosted. */

@font-face {
  font-family: "Figtree Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/assets/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Geist Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --ink: oklch(0.205 0.004 286);
  --ink-2: oklch(0.27 0.005 286);
  --paper: oklch(0.985 0 0);
  --card: oklch(1 0 0);
  --muted: oklch(0.967 0.001 286);
  --muted-fg: oklch(0.5 0.01 286);
  --border: oklch(0.92 0.002 286);
  --border-strong: oklch(0.62 0.006 286);
  --grid-line: oklch(0.955 0.002 286);
  --frame: oklch(0.962 0.002 286);
  --accent-blue: oklch(0.55 0.16 262);
  --ring: oklch(0.45 0.01 286);
  --shadow-soft:
    0 0 0 1px oklch(0.205 0.004 286 / 7.5%),
    0 1px 1px -0.5px oklch(0 0 0 / 2%),
    0 3px 3px -1.5px oklch(0 0 0 / 2%),
    0 6px 6px -3px oklch(0 0 0 / 1.5%);
  --shadow-lift:
    0 0 0 1px oklch(0.205 0.004 286 / 7.5%), 0 2px 4px oklch(0 0 0 / 3%),
    0 24px 56px -16px oklch(0 0 0 / 14%);
  --font-sans: "Geist Variable", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-display: "Figtree Variable", "Geist Variable", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono Variable", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --page: min(1200px, 100% - 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 8px; }
.wrap { width: var(--page); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 14px; }
.skip:focus { top: 12px; }

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklch, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.brand svg { height: 26px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--muted-fg);
  padding: 8px 14px; border-radius: 8px;
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--ink); background: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 45%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 45%, #000 30%, transparent 78%);
}
.hero .wrap {
  position: relative;
  min-height: min(calc(100svh - 72px), 860px);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 48px;
  padding-block: 96px 112px;
}
.hero-copy { position: relative; z-index: 1; }
.hero .label { display: inline-flex; align-items: center; gap: 12px; }
.hero .label::before { content: ""; width: 28px; height: 1px; background: var(--border-strong); }
.hero h1 {
  margin-top: 28px;
  font-size: clamp(44px, 6.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.hero-sub {
  margin-top: 32px; max-width: 30em;
  font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--muted-fg);
}
.hero-art { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 520px; justify-self: end; }
.hero-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chev { fill: none; stroke: var(--ink); stroke-linejoin: miter; stroke-linecap: butt; }
.chev-1 { stroke-width: 16; }
.chev-2 { stroke-width: 16; opacity: 0.45; }
.chev-3 { stroke-width: 1.5; opacity: 0.7; stroke: var(--border-strong); }
.chev-guide { stroke: var(--border-strong); stroke-width: 1; opacity: 0.5; stroke-dasharray: 3 6; fill: none; }
.node { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.tick { font-family: var(--font-mono); font-size: 11px; fill: var(--muted-fg); letter-spacing: 0.06em; }

.js .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.6s var(--ease) forwards; }
.js .draw.d2 { animation-delay: 0.25s; }
.js .draw.d3 { animation-delay: 0.5s; }
.js .fade-in { opacity: 0; animation: fade 1s var(--ease) 1.1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.hero-art .float { animation: float 9s ease-in-out infinite; transform-origin: center; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 1px; height: 48px; background: linear-gradient(var(--border-strong), transparent);
  overflow: hidden;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 0; top: -16px; width: 1px; height: 16px; background: var(--ink);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { to { top: 48px; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(96px, 13vw, 176px); }
.section-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: baseline; }
.section-head .label { padding-top: 6px; }

.vision-lead {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.12; letter-spacing: -0.035em; font-weight: 500;
  max-width: 20em;
}
.vision-lead em { font-style: normal; color: var(--muted-fg); }
.vision-body {
  margin-top: 40px; margin-left: calc(200px + 32px);
  max-width: 34em; font-size: 18px; line-height: 1.65; color: var(--muted-fg);
}
.rule { height: 1px; background: var(--border); border: 0; margin: 0 auto; }

/* ---------- Products ---------- */
.products-title { font-size: clamp(32px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.04em; }
.products {
  margin-top: 64px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px;
}
.product {
  position: relative; display: flex; flex-direction: column;
  min-height: 560px; border-radius: 28px; overflow: hidden; isolation: isolate;
  background: var(--card); box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.product-top { display: flex; align-items: center; justify-content: space-between; padding: 28px 28px 0; }
.product-id { display: inline-flex; align-items: center; gap: 12px; }
.product-name { white-space: nowrap; font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }
.tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em;
  padding: 6px 10px; border-radius: 999px; box-shadow: 0 0 0 1px currentColor inset;
  opacity: 0.72;
}
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.product-visual { position: relative; flex: 1; min-height: 280px; }
.product-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.product-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 28px 28px; }
.product-desc { font-size: 17px; line-height: 1.5; max-width: 22em; }
.product-desc span { display: block; }
.product-url { margin-top: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; opacity: 0.55; }
.arrow {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 0 0 1px currentColor inset; opacity: 0.6;
  transition: transform 0.45s var(--ease), opacity 0.3s, background-color 0.3s, color 0.3s;
}
.arrow svg { width: 16px; height: 16px; }
.product:hover .arrow { transform: translateX(4px); opacity: 1; }

/* Performance: light, measured, charts. */
.p-performance { color: var(--ink); }
.p-performance .tile { background: var(--card); box-shadow: var(--shadow-soft); }
.p-performance .product-desc { color: var(--ink-2); }
.p-performance:hover .arrow { background: var(--ink); color: var(--paper); box-shadow: none; }
.perf-grid line { stroke: var(--grid-line); stroke-width: 1; }
.perf-bar { fill: var(--muted); transition: transform 0.8s var(--ease), fill 0.5s; transform-box: fill-box; transform-origin: bottom; }
.perf-bar.hi { fill: var(--ink); }
.p-performance:hover .perf-bar { transform: scaleY(1.08); }
.p-performance:hover .perf-bar:nth-child(2n) { transform: scaleY(0.94); }
.perf-line { fill: none; stroke: var(--accent-blue); stroke-width: 2; stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 1.4s var(--ease); }
.p-performance:hover .perf-line, .in-view .perf-line { stroke-dashoffset: 0; }
.perf-dot { fill: var(--card); stroke: var(--accent-blue); stroke-width: 2; opacity: 0; transition: opacity 0.4s 0.9s; }
.p-performance:hover .perf-dot, .in-view .perf-dot { opacity: 1; }
.perf-sheet { fill: var(--card); stroke: var(--border); }
.perf-sheet-line { fill: var(--muted); }

/* SPEngine: the dark tile of the product mark, layers of agents run by one engine. */
.p-spengine { background: var(--ink); color: oklch(0.97 0 0); box-shadow: 0 0 0 1px oklch(1 0 0 / 6%); }
.p-spengine:hover { box-shadow: 0 0 0 1px oklch(1 0 0 / 8%), 0 24px 56px -16px oklch(0 0 0 / 35%); }
.p-spengine .tile { background: oklch(0.97 0 0); }
.p-spengine .product-desc { color: oklch(0.86 0.004 286); }
.p-spengine:hover .arrow { background: oklch(0.97 0 0); color: var(--ink); box-shadow: none; }
.sp-grid line { stroke: oklch(1 0 0 / 5%); stroke-width: 1; }
.sp-chev { fill: none; stroke: oklch(0.97 0 0); stroke-width: 10; stroke-linejoin: miter; transition: transform 0.9s var(--ease), opacity 0.6s; }
.sp-chev.c2 { opacity: 0.55; }
.sp-chev.c3 { opacity: 0.28; }
.sp-chev.c4 { opacity: 0.12; }
.sp-chev.c2 { transform: translateY(-16px); }
.sp-chev.c3 { transform: translateY(-32px); }
.sp-chev.c4 { transform: translateY(-48px); }
.sp-chev.inner { transform: none; }
.p-spengine:hover .sp-chev.c2 { transform: translateY(-22px); }
.p-spengine:hover .sp-chev.c3 { transform: translateY(-44px); }
.p-spengine:hover .sp-chev.c4 { transform: translateY(-66px); }
.p-spengine:hover .sp-chev.inner { transform: translateY(4px); }
.sp-orbit { fill: none; stroke: oklch(1 0 0 / 10%); stroke-width: 1; stroke-dasharray: 2 6; }
.sp-node { fill: oklch(0.97 0 0); }
.sp-spin { transform-box: view-box; transform-origin: 300px 200px; animation: spin 60s linear infinite; }
.p-spengine:hover .sp-spin { animation-duration: 18s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 72px 40px; }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-brand svg { height: 34px; width: auto; display: block; }
.footer-brand p { margin-top: 18px; }
.footer-nav { display: flex; gap: 48px; }
.footer-nav ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.footer-nav a { font-size: 14px; color: var(--muted-fg); transition: color 0.2s; }
.footer-nav a:hover { color: var(--ink); }
.footer-bottom { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted-fg); }

/* ---------- Intermediate product page and legal page ---------- */
.solo { min-height: calc(100svh - 72px); display: grid; place-items: center; position: relative; overflow: hidden; }
.solo .hero-grid { mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 20%, transparent 75%); }
.solo-inner { position: relative; text-align: center; padding: 96px 24px; max-width: 720px; }
.solo .tile { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto; }
.solo .status { margin-top: 32px; color: var(--ink); }
.solo h1 { margin-top: 20px; font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -0.045em; }
.solo p { margin-top: 24px; font-size: 19px; color: var(--muted-fg); }
.solo-note { margin-top: 12px !important; font-size: 15px !important; }
.back {
  margin-top: 40px; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 8px; background: var(--card); box-shadow: var(--shadow-soft); font-size: 15px; font-weight: 500;
  transition: background-color 0.2s, transform 0.15s;
}
.back:hover { background: var(--muted); }
.back:active { transform: scale(0.98); }
.back svg { width: 16px; height: 16px; }

.legal { padding-block: 96px 128px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.04em; }
.legal dl { margin: 56px 0 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); border-top: 1px solid var(--border); max-width: 880px; }
.legal dt, .legal dd { margin: 0; padding: 22px 0; border-bottom: 1px solid var(--border); }
.legal dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-fg); padding-top: 25px; }
.legal dd { font-size: 16px; }
.legal dd a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }

/* ---------- Scroll reveal (progressive: visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in-view { opacity: 1; transform: none; }
.js .reveal.r2 { transition-delay: 0.12s; }
.js .reveal.r3 { transition-delay: 0.24s; }
.js .product.reveal { transition: opacity 0.9s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.js .product.reveal.in-view { transition-delay: 0s; }
.js .product.reveal.in-view:hover { transform: translateY(-4px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; padding-block: 72px 96px; min-height: 0; }
  .hero-art { order: -1; max-width: 240px; justify-self: start; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .vision-body { margin-left: 0; }
  .product { min-height: 480px; border-radius: 24px; }
  .scroll-cue { display: none; }
}
@media (max-width: 560px) {
  :root { --page: min(1200px, 100% - 40px); }
  .site-header .wrap { height: 64px; }
  .brand svg { height: 22px; }
  .nav a { padding: 8px 10px; }
  .hero .wrap { padding-block: 48px 80px; }
  .hero-art { max-width: 180px; }
  .hero h1 { margin-top: 20px; }
  .hero-sub { margin-top: 24px; }
  .product-top { padding: 22px 22px 0; }
  .product-foot { padding: 0 22px 22px; }
  .product { min-height: 440px; }
  .product-name { font-size: 17px; }
  .product-id { gap: 10px; }
  .tile { width: 32px; height: 32px; }
  .status { font-size: 10px; padding: 5px 8px; }
  .legal dl { grid-template-columns: 1fr; }
  .legal dt { padding-bottom: 0; border-bottom: 0; }
  .legal dd { padding-top: 6px; }
  .footer-nav { gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .draw { stroke-dashoffset: 0; }
}

.tile-light { background: var(--card); box-shadow: var(--shadow-soft); color: var(--ink); }
.tile-ink { background: var(--ink); }
.footer-solo { margin-top: 0; border-top: 0; padding-top: 0; }
.site-footer:has(.footer-solo) { padding-block: 28px; }
.footer-solo a:hover { color: var(--ink); }
