/* Anyware Ventures. Plain-CSS port of the original Tailwind design.
   Breakpoints: sm 640px, md 768px, lg 1024px, xl 1280px. */

:root {
  --bg: #fff;
  --fg: #000;
  --muted: #737373;
  --border: #e5e5e5;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Inter is listed but not loaded, matching the original site: visitors get system-ui. */
  --font: 'Inter', system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: 700; letter-spacing: -0.025em; }
a { color: inherit; text-decoration: inherit; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; background: transparent; line-height: inherit; }
button { cursor: pointer; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-lg { padding: 6rem 0; }
.rule-top { border-top-width: 1px; }
.page { padding-top: 5rem; }
@media (min-width: 768px) {
  .container { padding: 0 2rem; }
  .section { padding: 6rem 0; }
  .section-lg { padding: 7rem 0; }
  .page { padding-top: 6rem; }
}
@media (min-width: 1024px) {
  .section { padding: 7rem 0; }
  .section-lg { padding: 8rem 0; }
}

/* ---------- Type ---------- */
.display-xl { font-size: 3rem; line-height: 0.95; letter-spacing: -0.03em; font-weight: 700; }
.display-lg { font-size: 1.875rem; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
.display-md { font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }
.body-lg { font-size: 1.125rem; line-height: 1.7; }
.body { font-size: 1rem; line-height: 1.7; }
.body-sm { font-size: 0.875rem; line-height: 1.6; }
.lead { font-size: 1.125rem; line-height: 1.625; }
@media (min-width: 768px) {
  .display-xl { font-size: 3.75rem; line-height: 1; }
  .display-lg { font-size: 2.25rem; line-height: 2.5rem; }
  .display-md { font-size: 1.5rem; line-height: 2rem; }
  .body-lg { font-size: 1.25rem; line-height: 1.75rem; }
  .body { font-size: 1.125rem; line-height: 1.75rem; }
  .body-sm { font-size: 1rem; line-height: 1.5rem; }
  .lead { font-size: 1.25rem; line-height: 1.75rem; }
}
@media (min-width: 1024px) {
  .display-xl { font-size: 4.5rem; }
  .display-lg { font-size: 3rem; line-height: 1; }
}
@media (min-width: 1280px) {
  .display-xl { font-size: 6rem; }
}

.muted { color: var(--muted); }
.soft { color: rgb(0 0 0 / 0.8); }
.soft-70 { color: rgb(0 0 0 / 0.7); }
.black-60 { color: rgb(0 0 0 / 0.6); }
.medium { font-weight: 500; }
.italic { font-style: italic; }
.relaxed { line-height: 1.625 !important; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.eyebrow { display: block; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--muted); margin-bottom: 1rem; }
.eyebrow-50 { color: rgb(0 0 0 / 0.5); }
.eyebrow-tight { margin-bottom: 0.75rem; }

.text-link { font-size: 0.875rem; line-height: 1.25rem; transition: all 0.2s; }
.text-link:hover { text-decoration: underline; }
.center-link { margin-top: 3.5rem; text-align: center; }
.center-link .text-link { display: inline-flex; align-items: center; gap: 0.25rem; }

.stack-6 > * + * { margin-top: 1.5rem; }

/* ---------- Buttons ---------- */
.btn-black {
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600;
  padding: 0.625rem 1.5rem; background: #000; color: #fff;
  transition: opacity 0.2s;
}
.btn-black:hover { opacity: 0.9; }

.btn-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 1.125rem; line-height: 1.75rem; font-weight: 500;
  padding: 1rem 2rem; background: #000; color: #fff;
  transition: background-color 0.3s;
}
.btn-cta:hover { background: rgb(0 0 0 / 0.9); }
.btn-cta svg { width: 1.25rem; height: 1.25rem; }

.btn-white {
  width: 100%; background: #fff; color: #000; font-weight: 500;
  padding: 1rem 1.5rem; font-size: 1rem; line-height: 1.5rem;
  transition: background-color 0.15s;
}
.btn-white:hover { background: rgb(255 255 255 / 0.9); }
.btn-white:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: #fff; transition: all 0.3s;
}
.site-header.is-scrolled { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 2rem; width: auto; }
.nav-links { display: none; align-items: center; gap: 2.5rem; }
.nav-links > a { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; color: #000; transition: opacity 0.2s; }
.nav-links > a:hover { opacity: 0.7; }
.nav-burger { padding: 0.5rem; color: #000; transition: opacity 0.2s; }
.nav-burger:hover { opacity: 0.7; }
.nav-burger svg { width: 1.5rem; height: 1.5rem; }
@media (min-width: 768px) {
  .nav { height: 6rem; }
  .nav-logo img { height: 2.5rem; }
  .nav-links { display: flex; }
  .nav-burger { display: none; }
}

/* ---------- Dialogs (mobile menu + contact form) ---------- */
dialog { color: inherit; }
dialog::backdrop { background: rgb(0 0 0 / 0.8); animation: fade-in 0.2s ease-out; }
body:has(dialog[open]) { overflow: hidden; }

.dialog-close {
  position: absolute; top: 1rem; right: 1rem;
  opacity: 0.7; transition: opacity 0.15s;
}
.dialog-close:hover { opacity: 1; }
.dialog-close svg { width: 1rem; height: 1rem; }

.sheet {
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: 100%; max-width: 20rem; height: 100%; max-height: 100%;
  background: #fff; color: #000; border-left: 1px solid rgb(0 0 0 / 0.1);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.sheet[open] { animation: slide-in-from-right 0.5s ease-in-out; }
.sheet-inner { position: relative; height: 100%; padding: 1.5rem; }
.sheet-links { display: flex; flex-direction: column; gap: 2rem; margin-top: 3rem; }
.sheet-links > a { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; transition: opacity 0.2s; }
.sheet-links > a:hover { opacity: 0.7; }
.sheet-links .btn-black { font-size: 1.125rem; line-height: 1.75rem; padding: 0.75rem 1.5rem; text-align: center; }

.modal {
  width: 100%; max-width: 32rem; max-height: 100dvh; margin: auto;
  background: #000; color: #fff; border: 1px solid rgb(255 255 255 / 0.2);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.modal[open] { animation: zoom-in 0.2s ease-out; }
.modal-inner { position: relative; padding: 2rem; }
.modal-header { margin-bottom: 2rem; }
.modal-title { font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.025em; }
.modal-desc { margin-top: 0.75rem; color: rgb(255 255 255 / 0.7); font-size: 1rem; line-height: 1.625; }
.modal-form > * + * { margin-top: 1.5rem; }
.modal-form label { display: block; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: rgb(255 255 255 / 0.8); margin-bottom: 0.5rem; }
.modal-form input[type="text"],
.modal-form input[type="email"],
.modal-form select,
.modal-form textarea {
  width: 100%; background: #000; color: #fff;
  border: 1px solid rgb(255 255 255 / 0.3);
  padding: 0.75rem 1rem; font-size: 1rem; line-height: 1.5rem;
  border-radius: 0; outline: none; transition: border-color 0.15s;
}
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus { border-color: #fff; }
.modal-form ::placeholder { color: rgb(255 255 255 / 0.4); }
.modal-form textarea { resize: none; }
.modal-form select {
  appearance: none; padding-right: 2.5rem; cursor: pointer;
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1rem center / 1rem;
}
.modal-form option { color: #fff; background: #000; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.modal-check { display: flex; align-items: flex-start; gap: 0.75rem; }
.modal-check input {
  appearance: none; flex-shrink: 0; width: 1rem; height: 1rem; margin-top: 0.125rem;
  border: 1px solid rgb(255 255 255 / 0.3); cursor: pointer;
}
.modal-check input:checked {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 0.75rem;
  border-color: #fff;
}
.modal-check input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.modal-check label { margin: 0; color: rgb(255 255 255 / 0.7); line-height: 1.625; cursor: pointer; }
@media (min-width: 768px) {
  .modal-inner { padding: 2.5rem; }
  .modal-title { font-size: 1.875rem; line-height: 2.25rem; }
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; top: 0; right: 0; z-index: 100;
  display: flex; flex-direction: column-reverse; gap: 0.5rem;
  width: 100%; max-height: 100vh; padding: 1rem; pointer-events: none;
}
@media (min-width: 640px) {
  .toasts { top: auto; bottom: 0; flex-direction: column; max-width: 420px; }
}
.toast {
  position: relative; pointer-events: auto;
  padding: 1.5rem 2rem 1.5rem 1.5rem;
  background: #fff; color: #000; border: 1px solid var(--border);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  animation: toast-in 0.3s var(--ease);
}
.toast-destructive { background: #ef4444; color: #fff; border-color: #ef4444; }
.toast-title { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.toast-desc { font-size: 0.875rem; line-height: 1.25rem; opacity: 0.9; }
.toast .dialog-close { top: 0.5rem; right: 0.5rem; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 8rem 0 6rem; }
.hero-inner { text-align: center; }
.hero-title { margin-bottom: 2rem; }
.hero-lines { max-width: 750px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero-lines p { font-size: 1.125rem; line-height: 1.8; color: rgb(0 0 0 / 0.8); margin-bottom: 1.5rem; }
.hero-lines .hero-last { font-weight: 500; color: #000; margin-bottom: 0; }
.hero-scroll { margin-top: 4rem; }
.hero-scroll a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--muted);
  transition: color 0.3s;
}
.hero-scroll a:hover { color: var(--fg); }
.hero-scroll svg { width: 1rem; height: 1rem; }
.bob { animation: bob 1.5s ease-in-out infinite; }
@media (min-width: 768px) {
  .hero { padding-bottom: 7rem; }
  .hero-lines p { font-size: 1.25rem; }
}
@media (min-width: 1024px) {
  .hero { padding-bottom: 8rem; }
  .hero-title { margin-bottom: 3rem; }
  .hero-lines p { margin-bottom: 1rem; }
}

/* ---------- Philosophy ---------- */
.philosophy { max-width: 42rem; }
.philosophy-title { margin-bottom: 2rem; }
.philosophy-close { padding-top: 1.5rem; border-top-width: 1px; }

/* ---------- Logic Layer ---------- */
.services { max-width: 64rem; margin: 0 auto; }
.services-head { margin-bottom: 4rem; }
.services-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.service {
  display: flex; flex-direction: column; height: 100%;
  border-top: 1px solid rgb(0 0 0 / 0.1); padding-top: 2rem;
}
.service-number { display: block; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: rgb(0 0 0 / 0.5); margin-bottom: 1.5rem; }
.service-title { margin-bottom: 0.5rem; }
.service-subtitle { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: rgb(0 0 0 / 0.6); margin-bottom: 1.5rem; }
.service-desc { color: rgb(0 0 0 / 0.7); line-height: 1.625 !important; margin-bottom: 2rem; flex-grow: 1; }
.service-tagline { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
@media (min-width: 768px) {
  .services-head { margin-bottom: 5rem; }
  .services-grid { grid-template-columns: 1fr 1fr; gap: 4rem 3rem; }
}

/* ---------- Horizons ---------- */
.horizons-head { margin-bottom: 3rem; }
.horizons-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.horizon { border-top-width: 1px; padding-top: 1.5rem; }
.horizon h3 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
.horizon p { font-size: 0.875rem; line-height: 1.625; color: var(--muted); }
@media (min-width: 640px) { .horizons-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .horizons-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }

/* ---------- Filter ---------- */
.filter-head { max-width: 56rem; }
.filter-head .eyebrow { color: rgb(0 0 0 / 0.7); }
.filter-head h2 { margin-bottom: 4rem; }
.filter-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.filter-col { border-top: 1px solid rgb(0 0 0 / 0.2); padding-top: 1.5rem; }
.filter-col h3 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; margin-bottom: 0.75rem; }
.filter-intro { color: rgb(0 0 0 / 0.7); margin-bottom: 1.5rem; }
.filter-col li { color: rgb(0 0 0 / 0.9); padding-left: 1rem; border-left: 1px solid rgb(0 0 0 / 0.3); }
.filter-col li + li { margin-top: 1rem; }
.filter-link { margin-top: 4rem; }
@media (min-width: 768px) { .filter-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- Footer ---------- */
.footer-cta { max-width: 36rem; margin: 0 auto; text-align: center; }
.footer-logo { height: 2rem; width: auto; margin: 0 auto 1rem; }
.footer-company { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--muted); margin-bottom: 2rem; }
.footer-question { margin-bottom: 1.5rem; }
.footer-base {
  margin-top: 6rem; padding-top: 2rem; border-top-width: 1px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: 0.75rem; line-height: 1rem; color: #888;
}
@media (min-width: 768px) {
  .footer-logo { height: 2.5rem; }
  .footer-base { flex-direction: row; }
}

/* ---------- Article pages (Architecture, Principles) ---------- */
.article { max-width: 700px; margin: 0 auto; }
.article-header { margin-bottom: 4rem; }
.arch-intro { margin-bottom: 2.5rem; }
.principles-intro { padding-bottom: 3rem; }
.article-block { border-top-width: 1px; padding: 3rem 0; }
.article-block-last { padding-bottom: 0; }
.step-meta { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.5rem; font-size: 0.875rem; line-height: 1.25rem; }
.step-note { margin-top: 2rem; font-size: 0.875rem; line-height: 1.25rem; font-style: italic; color: var(--muted); }
.dash-list li { position: relative; padding-left: 1rem; color: var(--muted); }
.dash-list li + li { margin-top: 0.75rem; }
.dash-list li::before { content: '—'; position: absolute; left: 0; color: rgb(115 115 115 / 0.5); }
.artifact { border-left: 2px solid var(--border); padding-left: 1rem; }
.artifact + .artifact { margin-top: 1.5rem; }
.artifact h3 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; }
.artifact p { font-size: 0.875rem; line-height: 1.25rem; color: var(--muted); }
.sign-off { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
.return-link { padding: 2.5rem 0; text-align: center; }
.return-link-lg { padding-top: 4rem; }
@media (min-width: 768px) {
  .arch-intro { margin-bottom: 3rem; }
  .principles-intro { padding-bottom: 4rem; }
  .article-block { padding: 4rem 0; }
  .article-block-last { padding-bottom: 0; }
  .return-link { padding-top: 3rem; }
  .return-link-lg { padding-top: 5rem; }
}

/* ---------- 404 ---------- */
.not-found { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: #f5f5f5; text-align: center; }
.not-found h1 { font-size: 2.25rem; line-height: 2.5rem; margin-bottom: 1rem; }
.not-found p { font-size: 1.25rem; line-height: 1.75rem; color: var(--muted); margin-bottom: 1rem; }
.not-found a { text-decoration: underline; }

/* ---------- Scroll reveal (driven by site.js) ---------- */
.js .reveal {
  opacity: 0;
  transform: translate3d(var(--rx, 0), var(--ry, 0), 0);
  transition:
    opacity var(--rd, 0.8s) var(--ease) var(--rdelay, 0s),
    transform var(--rd, 0.8s) var(--ease) var(--rdelay, 0s);
}
.js .is-in .reveal, .js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .bob, dialog[open], dialog::backdrop, .toast { animation: none; }
}

/* ---------- Custom cursor (desktop with a mouse) ---------- */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  *, html, body, a, button { cursor: none; }
  body::after {
    content: '';
    position: fixed; top: var(--cursor-y, -100px); left: var(--cursor-x, -100px); z-index: 99999;
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff; mix-blend-mode: difference; pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.15s ease-out, height 0.15s ease-out, opacity 0.15s ease-out;
  }
  body.cursor-hover::after { width: 12px; height: 12px; opacity: 0.5; }

  /* Dialogs sit above the custom cursor, so use the normal cursor inside them. */
  body:has(dialog[open])::after { display: none; }
  dialog, dialog * { cursor: auto; }
  dialog :is(a, button, select, label, input[type="checkbox"]) { cursor: pointer; }
  dialog :is(input[type="text"], input[type="email"], textarea) { cursor: text; }
  dialog button:disabled { cursor: not-allowed; }
}

/* ---------- Keyframes ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slide-in-from-right { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
