/* =========================================================
   Clymene — shared styles
   ---------------------------------------------------------
   1. Tokens & base
   2. Header & navigation
   3. Page openings (home hero, inner-page header)
   4. Sections & components
   5. Footer
   6. Prose pages (privacy)
   7. Responsive
   ========================================================= */


/* ---------- 1. Tokens & base ---------- */

:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --white: #fbfaf7;
  --ink: #15191d;
  --ink-2: #3b4249;
  --muted: #6b7178;
  --rule: #d9d4c8;
  --rule-strong: #b9b2a3;
  --accent: #1d3b4f;      /* deep ink blue */
  --accent-2: #8a6a3a;    /* muted bronze, used sparingly */

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1120px;
  --gutter: 48px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--wrap), calc(100% - var(--gutter)));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Small uppercase label in monospace: the "analytical" voice of the site */
.label {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}


/* ---------- 2. Header & navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 160ms ease;
}

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

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ---------- 3. Page openings ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

/* Fine contour lines: a quiet analytical texture, static by design */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/contours.svg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 22%, black 70%);
  mask-image: linear-gradient(90deg, transparent 22%, black 70%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding: 120px 0 112px;
}

.hero h1 {
  max-width: 820px;
  margin-top: 26px;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7.4vw, 6.4rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero .lede {
  max-width: 600px;
  margin-top: 30px;
  font-size: 1.16rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.actions {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button.primary {
  background: var(--ink);
  color: var(--white);
}

.button.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button.secondary:hover {
  background: var(--paper-2);
}

/* Inner-page header */
.page-head {
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}

.page-head-inner {
  padding: 88px 0 64px;
}

.page-head h1 {
  max-width: 820px;
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.page-head .lede {
  max-width: 640px;
  margin-top: 22px;
  font-size: 1.1rem;
  color: var(--ink-2);
}


/* ---------- 4. Sections & components ---------- */

.section {
  padding: 96px 0;
}

.section + .section {
  border-top: 1px solid var(--rule);
}

.section.tint {
  background: var(--paper-2);
}

.section-head {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 56px;
  align-items: start;
}

.section-head h2,
.h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.prose {
  max-width: 680px;
  color: var(--ink-2);
  font-size: 1.06rem;
}

.prose p + p {
  margin-top: 18px;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

/* Three areas: Research | Labs | Advisory */
.areas {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
}

.area {
  padding: 30px 30px 34px 0;
  display: flex;
  flex-direction: column;
}

.area + .area {
  padding-left: 30px;
  border-left: 1px solid var(--rule);
}

.area .index {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.area h3 {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.area p {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.area .more {
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

.more::after {
  content: " →";
}

a.area:hover h3 {
  color: var(--accent);
}

/* Work page: one block per division */
.division {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 56px;
}

.division h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.topics {
  margin-top: 28px;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.topics li {
  display: flex;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.topics li::before {
  content: attr(data-n);
  min-width: 28px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 3px;
}

/* Key–value table (company details, contact) */
.details {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-top: 1px solid var(--rule);
}

.details dt,
.details dd {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.details dt {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 19px;
}

.details dd {
  color: var(--ink);
}

.details a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

/* Contact block */
.contact-card {
  margin-top: 8px;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--rule);
}

.contact-card .email {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  letter-spacing: -0.015em;
  border-bottom: 1px solid var(--rule-strong);
}

.contact-card .email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-card p {
  margin-top: 16px;
  color: var(--ink-2);
}

.checklist {
  margin-top: 18px;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--ink-2);
}

.checklist li {
  padding-left: 22px;
  position: relative;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

/* Closing band */
.closing {
  padding: 84px 0;
  background: var(--ink);
  color: var(--white);
}

.closing .container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}

.closing .label {
  color: #9db7c8;
}

.closing h2 {
  margin-top: 14px;
  max-width: 640px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.closing .button {
  border-color: var(--white);
  background: var(--white);
  color: var(--ink);
}

.closing .button:hover {
  background: transparent;
  color: var(--white);
}


/* ---------- 5. Footer ---------- */

.site-footer {
  padding: 64px 0 36px;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  color: var(--ink-2);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
}

.footer-brand svg {
  width: 22px;
  height: 22px;
}

.footer-tagline {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-legal {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.footer-legal strong {
  color: var(--ink);
  font-weight: 500;
}


/* ---------- 6. Prose pages ---------- */

.legal {
  max-width: 720px;
  color: var(--ink-2);
}

.legal .updated {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 30px;
}

.legal h2 {
  margin: 42px 0 12px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--ink);
}

.legal p + p {
  margin-top: 14px;
}

.legal ul {
  margin: 12px 0 0 20px;
  display: grid;
  gap: 6px;
}

.legal a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}


/* ---------- 7. Responsive ---------- */

@media (max-width: 860px) {
  :root {
    --gutter: 32px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    padding: 8px 16px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }

  .menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--rule);
    font-size: 1rem;
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-links a[aria-current="page"]::after {
    display: none;
  }

  .hero-inner {
    padding: 80px 0 76px;
  }

  .hero::before {
    -webkit-mask-image: linear-gradient(180deg, transparent 10%, black 75%);
    mask-image: linear-gradient(180deg, transparent 10%, black 75%);
    opacity: 0.6;
  }

  .page-head-inner {
    padding: 64px 0 48px;
  }

  .section {
    padding: 72px 0;
  }

  .section-head,
  .division {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .areas {
    grid-template-columns: 1fr;
  }

  .area,
  .area + .area {
    padding: 26px 0 28px;
    border-left: 0;
  }

  .area + .area {
    border-top: 1px solid var(--rule);
  }

  .details {
    grid-template-columns: 1fr;
  }

  .details dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .details dd {
    padding-top: 4px;
  }

  .contact-card {
    padding: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
