/* =========================================================================
   MENSEN.WORK
   Editorial holding-company site. Warm neutral palette, calm European
   typography, generous whitespace. No animation. No SaaS gradients.
   ========================================================================= */

/* ---------- Tokens ------------------------------------------------------- */
:root {
  /* Palette — warm paper, deep ink, single restrained accent */
  --paper:        #F6F2EB;   /* warm off-white background */
  --paper-soft:   #EFE9DE;   /* subtle alternate band */
  --ink:          #1F1B16;   /* deep warm ink for body */
  --ink-soft:     #4A433A;   /* secondary text */
  --ink-mute:     #8A8275;   /* tertiary, labels, dividers */
  --rule:         #D8CFBE;   /* hairline divider */
  --rule-soft:    #E6DECD;   /* very faint divider */
  --accent:       #8C3A2C;   /* muted oxblood / terracotta — used sparingly */
  --container-bg: #FBF8F2;   /* portfolio logo container */

  /* Typography */
  --font-display: 'Newsreader', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container-max: 1240px;
  --container-pad: clamp(1.5rem, 5vw, 4rem);
  --gutter:        clamp(2rem, 5vw, 4rem);

  /* Type scale */
  --fs-eyebrow:    0.78rem;
  --fs-body:       1.0625rem;
  --fs-lead:       1.25rem;
  --fs-h2:         clamp(1.75rem, 3vw, 2.25rem);
  --fs-h3:         clamp(1.375rem, 2vw, 1.625rem);
  --fs-hero:       clamp(2.5rem, 6vw, 5rem);
}

/* ---------- Reset / base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "ss01";
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; padding: 0; margin: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease, opacity 200ms ease, border-color 200ms ease;
}

p { margin: 0 0 1.25rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}

/* Accessibility helpers */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 0; padding: 0.5rem 1rem;
  background: var(--ink); color: var(--paper); z-index: 100;
}
.skip-link:focus { top: 0; }

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

/* ---------- Layout primitives ------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ---------- Header ------------------------------------------------------- */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(246, 242, 235, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}

.brand-mark {
  width: 32px; height: 32px;
  color: var(--ink);
}

.brand-wordmark {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.14em;
  font-size: 0.825rem;
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- Hero --------------------------------------------------------- */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--rule-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) 1.45fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-mark {
  /* The dominant hero identity element, rendered in the warm accent tone */
  color: var(--accent);
  max-width: 320px;
  justify-self: start;
}

.hero-mark-svg {
  width: 100%;
  height: auto;
  /* Pull the mark optically into the column */
  margin-left: -3%;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  margin-bottom: 1.25rem;
}

.hero-heading {
  font-size: var(--fs-hero);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin-bottom: 2rem;
  max-width: 18ch;
}

.hero-lede {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0;
}

/* ---------- Section labels ---------------------------------------------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-label .rule {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: var(--ink);
}

.section-label h2 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
}

/* ---------- About -------------------------------------------------------- */
.about {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) 0;
  border-bottom: 1px solid var(--rule-soft);
  overflow: hidden;
}

/* Low-opacity watermark sitting behind the about section */
.watermark {
  position: absolute;
  top: 50%;
  right: -8%;
  transform: translateY(-50%);
  width: clamp(280px, 38vw, 560px);
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
}

.watermark img { width: 100%; height: auto; }

.about-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-grid .section-label { margin-bottom: 0; margin-top: 0.5rem; }

.about-body { max-width: 60ch; }

.about-lead {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.625rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 1.75rem;
}

.about-body p:not(.about-lead) {
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ---------- Portfolio ---------------------------------------------------- */
.portfolio {
  padding: clamp(4rem, 9vw, 7rem) 0;
  border-bottom: 1px solid var(--rule-soft);
}

.portfolio-list {
  border-top: 1px solid var(--rule);
}

.portfolio-row {
  display: grid;
  grid-template-columns: 56px 96px 1fr auto;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 4vw, 2.5rem) 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color 220ms ease;
}

.portfolio-row:hover { background: rgba(216, 207, 190, 0.18); }

.portfolio-index {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* Restrained container holding the venture logo */
.portfolio-logo {
  width: 72px;
  height: 72px;
  background: var(--container-bg);
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
}

.portfolio-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.portfolio-content { min-width: 0; }

.portfolio-name {
  font-size: var(--fs-h3);
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.portfolio-desc {
  color: var(--ink-soft);
  font-size: 0.9875rem;
  line-height: 1.6;
  max-width: 62ch;
  margin: 0;
}

.portfolio-link {
  font-family: var(--font-body);
  font-size: 0.825rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: lowercase;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

.portfolio-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Contact ------------------------------------------------------ */
.contact {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(5rem, 10vw, 8rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact-grid .section-label { margin-bottom: 0; margin-top: 0.5rem; }

.contact-body { max-width: 60ch; }

.contact-lead {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.625rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.cta {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  min-width: 240px;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.cta:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.cta-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.cta:hover .cta-label { color: rgba(246, 242, 235, 0.65); }

.cta-value {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 400;
}

.contact-meta {
  font-size: 0.8125rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin: 0;
}

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-mark { max-width: 180px; }
  .hero-heading { max-width: none; }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .portfolio-row {
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "logo  index"
      "logo  name"
      "logo  desc"
      ".     link";
    row-gap: 0.5rem;
    column-gap: 1.25rem;
    padding: 2rem 0;
  }
  .portfolio-row > .portfolio-logo  { grid-area: logo; width: 64px; height: 64px; align-self: start; }
  .portfolio-row > .portfolio-index { grid-area: index; }
  .portfolio-row > .portfolio-content { grid-area: name / name / desc / desc; }
  .portfolio-row > .portfolio-link  { grid-area: link; justify-self: start; margin-top: 0.5rem; }

  .watermark { right: -25%; opacity: 0.04; }
}

@media (max-width: 520px) {
  .site-nav ul { gap: 1.25rem; }
  .brand-wordmark { font-size: 0.75rem; }

  .cta { min-width: 0; width: 100%; }
}

/* ---------- Print -------------------------------------------------------- */
@media print {
  .site-header { position: static; border-bottom: 1px solid #000; }
  .watermark, .hero-mark { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ---------- Reduced motion (defensive — no animation in design anyway) -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
