/* Alloy Software — dark modular system with a lime accent. System fonts only. */
:root {
  --bg: #0c0d0f;
  --surface: #141517;
  --surface-2: #1a1b1e;
  --text: #f2f2ef;
  --text-muted: #9a9da3;
  --line: #26282c;
  --accent: #e2ff3f;
  --accent-strong: #f0ff7a;
  --ink: #0c0d0f;
  --radius: 6px;
  --max: 1200px;
  --font: ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Times New Roman", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg); }
h1, h2, h3 { line-height: 1.05; margin: 0 0 0.5em; }
h1 { font-size: clamp(3rem, 9vw, 7rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 300; letter-spacing: -0.03em; }
h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--ink); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .container { padding: 0 32px; } }
.container-narrow { max-width: 760px; }
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head h2 { margin: 0; max-width: 14ch; }
.index-link { font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); text-decoration: none; padding-bottom: 8px; border-bottom: 1px solid var(--accent); white-space: nowrap; flex-shrink: 0; }
.index-link::after { content: " ↘"; }
@media (max-width: 640px) { .section-head { flex-direction: column; align-items: flex-start; gap: 16px; } .index-link { order: -1; } }
.eyebrow { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.eyebrow-wide { letter-spacing: 0.3em; font-size: 0.7rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-muted); max-width: 58ch; }
.muted { color: var(--text-muted); }
.link-arrow { color: var(--text); text-decoration: none; font-family: var(--serif); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; }
.link-arrow::after { content: " →"; color: var(--accent); }
.link-arrow:hover { color: var(--accent); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { text-decoration: none; font-weight: 800; letter-spacing: -0.02em; font-size: 1.1rem; }
.brand-dot { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.button) { text-decoration: none; font-size: 0.95rem; color: var(--text-muted); }
.site-nav a:not(.button):hover { color: var(--text); }
.lang-switch { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; border: 1px solid var(--line); padding: 5px 9px; border-radius: 4px; }
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; width: 44px; height: 44px; cursor: pointer; color: var(--text); position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 12px; width: 20px; height: 2px; background: currentColor; transition: transform .2s, background .2s; }
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -6px; left: 0; }
.nav-toggle-bar::after { top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav:not(.site-nav-static) { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .site-nav:not(.site-nav-static).is-open { display: flex; }
  .site-nav:not(.site-nav-static) a:not(.button) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--text); }
  .site-nav:not(.site-nav-static) a.button { margin-top: 12px; border-bottom: 0; text-align: center; }
  .site-nav-static a:not(.button) { display: none; }
}

/* Buttons */
.button { font-family: var(--font); font-size: 1rem; line-height: 1.4; display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 4px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: transparent; color: var(--text); transition: background .15s, border-color .15s, color .15s; }
.button:hover { border-color: var(--text-muted); }
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.button-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.button-small { padding: 8px 16px; font-size: 0.9rem; }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: min(92vh, 900px); display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-inner { position: relative; z-index: 1; width: 100%; padding-top: 96px; padding-bottom: 72px; }
.hero h1 { margin: 0 0 40px; max-width: 12ch; text-shadow: 0 2px 40px rgba(12,13,15,.6); }
.hero-foot { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start; max-width: 760px; }
.hero-sub { color: var(--text-muted); max-width: 44ch; font-size: 1.05rem; margin: 0; }
.hero-side { position: absolute; right: 24px; top: 50%; transform: rotate(90deg) translateX(-50%); transform-origin: right top; z-index: 1; margin: 0; font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 860px) {
  .hero { min-height: 0; align-items: flex-end; }
  .hero-canvas { height: 100%; }
  .hero-inner { padding-top: min(62vw, 420px); }
  .hero h1 { text-shadow: 0 2px 30px rgba(12,13,15,.9); }
  .hero-foot { grid-template-columns: 1fr; gap: 16px; }
  .hero-side { display: none; }
}

/* Bento services */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(300px, auto); gap: 16px; }
.tile { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; justify-content: space-between; min-height: 300px; }
.tile-wide { grid-column: span 8; }
.tile-lime, .tile-tall { grid-column: span 4; }
.tile-lime { background: var(--accent); color: var(--ink); border-color: var(--accent); min-height: 360px; }
.tile-lime .eyebrow, .tile-lime h3, .tile-lime p { color: var(--ink); }
.tile-lime .tile-icon { border-color: var(--ink); color: var(--ink); }
.tile-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.tile-texture { background: var(--surface) radial-gradient(ellipse at 70% 40%, rgba(226,255,63,.08), transparent 55%); }
.tile-icon { position: relative; z-index: 1; width: 56px; height: 56px; border: 1px solid var(--accent); display: inline-flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 48px; }
.tile-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tile-text { position: relative; z-index: 1; }
.tile-text p:last-child { margin: 0; color: var(--text-muted); max-width: 52ch; }
.tile-text .eyebrow { color: var(--text-muted); }
.tile-lime .tile-text p:last-child { color: rgba(12,13,15,.75); max-width: 30ch; }
@media (max-width: 960px) { .tile-wide, .tile-lime, .tile-tall { grid-column: span 6; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; grid-auto-rows: auto; } .tile-wide, .tile-lime, .tile-tall { grid-column: auto; } .tile { min-height: 0; padding: 24px; } .tile-lime { min-height: 420px; } .tile-icon { margin-bottom: 32px; } }

/* Steps & principles */
.steps { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.step-num { font-family: var(--serif); color: var(--accent); display: block; margin-bottom: 40px; letter-spacing: 0.1em; }
.step h3 { font-size: 1.3rem; }
.step p { color: var(--text-muted); margin: 0; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.principles li { padding-left: 20px; border-left: 2px solid var(--accent); color: var(--text-muted); }
.principles strong { color: var(--text); display: block; }
@media (max-width: 760px) { .steps, .principles { grid-template-columns: 1fr; } }

/* Case studies */
.case { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; margin-bottom: 16px; }
.case-tags { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); }
.case-body p { color: var(--text-muted); }
.case-body h3 { color: var(--text); }
.case-body p:last-child { margin-bottom: 0; }
.case-status { display: inline-block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line); margin: 0 0 14px; }
.case-status::before { content: "● "; }
.case-status-live { color: var(--accent); border-color: var(--accent); }
.case-status-pilot { color: var(--text); }
.case-status-soon { color: var(--text-muted); }
.case-link { margin-top: 20px; }
@media (max-width: 760px) { .case { grid-template-columns: 1fr; padding: 24px; } }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 48px; align-items: start; }
.about-copy { color: var(--text-muted); font-size: 1.1rem; max-width: 62ch; }
.about-copy p:last-child { margin-bottom: 0; }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 28px; }
.facts > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); padding-top: 3px; }
.facts dd { margin: 0; color: var(--text); font-size: 0.98rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .facts > div { grid-template-columns: 1fr; gap: 4px; } }

/* Contact */
.contact { background: var(--surface); }
.contact-inner { text-align: center; max-width: 760px; }
.contact h2 { font-weight: 800; letter-spacing: -0.035em; font-size: clamp(2.6rem, 7vw, 5.5rem); }
.contact .lead { margin: 0 auto 36px; }

/* Prose pages */
.prose h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.prose h2 { font-size: 1.3rem; font-weight: 700; margin-top: 2.2em; letter-spacing: -0.01em; }
.prose a { color: var(--accent); }
.notfound { min-height: 70vh; display: flex; align-items: center; }
.notfound h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 0.9rem; color: var(--text-muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; gap: 24px; }
.footer-row a { color: var(--text-muted); text-decoration: none; }
.footer-row a:hover { color: var(--accent); }

/* Frosted-glass privacy overlay */
.glass { border: 0; padding: 0; margin: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; background: transparent; color: var(--text); overflow: hidden; }
.glass::backdrop { background: rgba(12, 13, 15, .55); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.glass[open] { display: grid; place-items: center; padding: 16px; }
.glass-panel { outline: none; position: relative; width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: rgba(20, 21, 23, .62); border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08); backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3); padding: clamp(28px, 5vw, 56px); -webkit-overflow-scrolling: touch; }
.glass-body h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.glass-body h2 { font-size: 1.15rem; font-weight: 700; margin-top: 2em; }
.glass-body p { color: var(--text-muted); }
.glass-body p:last-child { margin-bottom: 0; }
.glass-close { position: sticky; top: 0; float: right; margin: -8px -8px 0 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); background: rgba(12, 13, 15, .6); color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer; z-index: 1; }
.glass-close:hover { border-color: var(--accent); color: var(--accent); }
html.has-dialog { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .glass[open] .glass-panel { animation: glass-in .25s ease-out; }
  @keyframes glass-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
}

/* Contact form */
.contact-form { text-align: left; max-width: 640px; margin: 0 auto; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; transition: border-color .15s; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: #ff6b6b; }
.field-error { display: block; margin-top: 6px; font-size: 0.85rem; color: #ff8a8a; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.form-status { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.contact-form button[disabled] { opacity: .6; cursor: wait; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
