/* ===========================================================
   Eidos Logic Inc. — shared stylesheet
   Design language: "proof sheet" — research-paper rigor
   applied to a product site, softened into rounded panels
   with quiet depth instead of hairline boxes. Ink on bone
   paper, a single brass accent, a geometric grotesk for
   structure paired with a text serif for reading.
   =========================================================== */

:root {
  --paper: #faf9f6;
  --panel: #f3f1eb;
  --ink: #16181d;
  --ink-soft: #52555d;
  --line: #e3e0d6;
  --brass: #a8791f;
  --brass-soft: #d9b571;
  --brass-ink: #6e4f14;
  --focus: #1f2a44;

  --sans: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Source Serif 4", Georgia, "Noto Serif SC", "Songti SC", serif;

  --maxw: 1120px;
  --pad: clamp(20px, 4vw, 56px);

  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(30, 24, 8, 0.05);
  --shadow: 0 1px 2px rgba(30, 24, 8, 0.04), 0 14px 32px -18px rgba(30, 24, 8, 0.22);
  --shadow-lg: 0 2px 4px rgba(30, 24, 8, 0.05), 0 28px 56px -24px rgba(30, 24, 8, 0.28);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand, nav a, button, .btn {
  font-family: var(--sans);
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; max-width: 66ch; }
a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- header ---------- */

.site-header {
  background: rgba(250, 249, 246, 0.86);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand .logo {
  display: block;
  width: auto;
  height: 26px;
  flex: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
}

.main-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--brass);
}

.lang-switch {
  display: flex;
  gap: 2px;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--panel);
}

.lang-switch a {
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: none !important;
}

.lang-switch a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 36px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 1px;
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(48px, 9vw, 108px) 0 clamp(36px, 6vw, 72px);
}

.hero .kicker {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--brass-ink);
  margin-bottom: 1em;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(240px, 1.4fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: stretch;
}

.hero-side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 30px);
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.hero-side dl { margin: 0; }
.hero-side dt {
  color: var(--ink);
  font-weight: 600;
  margin-top: 1.1em;
}
.hero-side dt:first-child { margin-top: 0; }
.hero-side dd { margin: 0.15em 0 0; }

/* ---------- sections ---------- */

section { padding: clamp(40px, 7vw, 84px) 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(24px, 4vw, 44px);
  flex-wrap: wrap;
}

.section-head p { margin: 0; color: var(--ink-soft); }

/* what-we-do list — a proof-like sequence, rendered as
   softly rounded panels rather than boxed grid cells */

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.work-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(12px, 3vw, 32px);
  align-items: start;
  padding: clamp(20px, 3vw, 30px) clamp(20px, 3vw, 28px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.work-list .glyph {
  font-family: var(--sans);
  color: var(--brass);
  font-size: 1.5rem;
  line-height: 1;
}

.work-list h3 { margin: 0; }
.work-list p { margin: 0; color: var(--ink-soft); font-family: var(--sans); font-size: 0.95rem; }

/* values / principles */

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.principle-grid > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 28px);
  box-shadow: var(--shadow-sm);
}

.principle-grid h3 {
  font-family: var(--sans);
  font-size: 1rem;
  margin-bottom: 0.5em;
}

.principle-grid p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 0;
}

/* cta panel */

.cta-panel {
  background: linear-gradient(155deg, #1c2233 0%, var(--ink) 62%);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}

.cta-panel h2 { color: var(--paper); margin: 0; }
.cta-panel p { color: #c9c9c2; margin: 0.4em 0 0; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 13px 24px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--brass);
  border-color: var(--brass);
  color: #1a1305;
  box-shadow: 0 10px 22px -12px rgba(168, 121, 31, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-ghost {
  background: rgba(250, 249, 246, 0.06);
  color: var(--paper);
  border-color: rgba(250, 249, 246, 0.4);
}
.btn-ghost:hover { background: rgba(250, 249, 246, 0.12); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(32px, 5vw, 52px) 0 28px;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

.footer-grid h4 {
  font-size: 0.82rem;
  color: var(--ink);
  margin-bottom: 0.8em;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5em; }
.footer-grid a { text-decoration: none; color: var(--ink-soft); }
.footer-grid a:hover { color: var(--ink); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- docs layout ---------- */

.docs-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--pad) 80px;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.docs-side {
  position: sticky;
  top: 100px;
  font-family: var(--sans);
  font-size: 0.92rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.docs-side .docs-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 0.6em;
  padding-left: 14px;
}

.docs-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-side a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink-soft);
}

.docs-side a:hover { color: var(--ink); background: rgba(22, 24, 29, 0.05); }

.docs-side a[aria-current="page"] {
  color: var(--ink);
  background: var(--paper);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.docs-content {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow-sm);
}

.docs-content h1 { margin-bottom: 0.3em; }
.docs-content .updated {
  font-family: var(--sans);
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-bottom: 2em;
}

.docs-content h2 {
  font-size: 1.25rem;
  margin-top: 1.8em;
  padding-top: 0.9em;
  border-top: 1px solid var(--line);
}
.docs-content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0.4em; }

.docs-content ul, .docs-content ol { max-width: 66ch; }
.docs-content li { margin-bottom: 0.4em; }

.note {
  font-family: var(--sans);
  font-size: 0.9rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 1.6em 0;
  color: var(--ink-soft);
}

/* corporate entity information — label / value rows */

.entity-info {
  margin: 0 0 1.6em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--sans);
  font-size: 0.94rem;
}

.entity-info > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 1.6fr);
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.entity-info > div:first-child { border-top: none; }
.entity-info dt { color: var(--ink-soft); }
.entity-info dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* ---------- contact / 404 ---------- */

.simple-page {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) var(--pad) 96px;
}

.contact-meta {
  font-family: var(--sans);
  font-size: 0.94rem;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 2em;
  padding: 1.4em 1.6em;
}
.contact-meta dt { color: var(--ink); font-weight: 600; }
.contact-meta dd { margin: 0.1em 0 1em; }
.contact-meta dd:last-child { margin-bottom: 0; }
.contact-email { font-size: 1.2rem; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .docs-shell { grid-template-columns: 1fr; }
  .docs-side { position: static; margin-bottom: 8px; }
  .docs-side ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-side .docs-label { padding-left: 4px; }
  .work-list li { grid-template-columns: 40px 1fr; }
  .work-list li p { grid-column: 2 / -1; }
}

@media (max-width: 640px) {
  .entity-info > div { grid-template-columns: 1fr; gap: 2px; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px var(--pad) 24px;
    gap: 14px;
  }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-panel { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary:hover { transform: none; }
}
