/* ============================================
   Kohlisys — Globals
   ============================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  background: var(--ink-900);
  color: var(--paper);
  border-radius: var(--r-md);
  z-index: 9999;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* —— Typography —— */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-coral);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink-900);
  text-wrap: balance;
}

.h-display {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.h-1 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.03em; }
.h-2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.08; letter-spacing: -0.025em; }
.h-3 { font-size: 24px; line-height: 1.2; letter-spacing: -0.015em; }
.h-4 { font-size: 19px; line-height: 1.3; font-weight: 600; }

.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-600);
  max-width: 56ch;
  text-wrap: pretty;
}

.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; }
.label-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
}

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

.section { padding: var(--space-10) 0; }
.section-sm { padding: var(--space-9) 0; }

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { background: var(--ink-900); color: var(--paper); }
.btn-primary:hover { background: var(--ink-700); }
.btn-coral { background: var(--accent-coral); color: white; }
.btn-coral:hover { background: var(--accent-coral-700); }
.btn-ghost { background: transparent; border: 1px solid var(--ink-200); color: var(--ink-900); }
.btn-ghost:hover { border-color: var(--ink-900); background: var(--white); }
.btn-link { background: transparent; padding: 13px 0; color: var(--ink-900); font-weight: 500; }
.btn-link .arrow { transition: transform 0.18s ease; }
.btn-link:hover .arrow { transform: translateX(4px); }

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(11, 16, 32, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-500);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 15px;
  color: var(--ink-600);
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}
.nav-links li { position: relative; }
.nav-links a { color: inherit; padding: 6px 0; display: inline-flex; align-items: center; gap: 4px; }
.nav-links a:hover { color: var(--ink-900); }
.nav-links .menu-item-has-children > a::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.55;
}
/* Hover bridge: parents extend their hit area down so the cursor
   doesn't leave the trigger when travelling to the sub-menu. */
.nav-links .menu-item-has-children { padding-bottom: 14px; margin-bottom: -14px; }
.nav-links .sub-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  list-style: none;
  margin: 0;
  padding: 8px;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 60;
}
.nav-links .menu-item-has-children:hover > .sub-menu,
.nav-links .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}
.nav-links .sub-menu li { display: block; }
.nav-links .sub-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink-700);
}
.nav-links .sub-menu a:hover {
  background: var(--ink-50);
  color: var(--ink-900);
}
.nav-links .current-menu-item > a,
.nav-links .current-menu-parent > a { color: var(--ink-900); font-weight: 500; }

.nav-cta { display: flex; gap: 12px; align-items: center; }

/* Nav search (collapsed by default; expanded via <details>) */
.nav-search { position: relative; }
.nav-search summary {
  list-style: none;
  cursor: pointer;
  width: 38px; height: 38px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-pill);
  background: var(--white);
  display: grid;
  place-items: center;
  color: var(--ink-700);
  transition: all 0.15s ease;
}
.nav-search summary::-webkit-details-marker { display: none; }
.nav-search summary:hover { border-color: var(--ink-900); color: var(--ink-900); }
.nav-search[open] summary { background: var(--ink-900); color: var(--paper); border-color: var(--ink-900); }
.nav-search-form {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 360px;
  z-index: 70;
}
.nav-search-form input {
  flex: 1;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-pill);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.nav-search-form input:focus { border-color: var(--brand-500); }
.nav-search-form .btn { padding: 10px 16px; font-size: 13px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Footer —— */
.footer {
  background: var(--ink-900);
  color: var(--ink-300);
  padding: 96px 0 32px;
  margin-top: 96px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 80px;
}
.footer h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-400);
  font-weight: 500;
  margin: 0 0 20px;
}
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer-list a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-400);
}
.footer .brand { color: var(--paper); }
.footer .brand-sub { color: var(--ink-400); }
.footer p.lead-foot {
  color: var(--ink-300);
  font-family: var(--font-body);
  font-size: 15px;
  max-width: 36ch;
  margin: 16px 0 0;
}

/* —— Cards & surfaces —— */
.card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all 0.2s ease;
}
.card:hover {
  border-color: var(--ink-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* —— Photography —— */
.photo {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      var(--paper-2) 0,
      var(--paper-2) 12px,
      var(--ink-100) 12px,
      var(--ink-100) 13px);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.photo.dark {
  background:
    repeating-linear-gradient(135deg,
      var(--ink-800) 0,
      var(--ink-800) 12px,
      var(--ink-700) 12px,
      var(--ink-700) 13px);
  border-color: var(--ink-700);
}
.photo-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  background: var(--paper);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--ink-200);
  text-transform: uppercase;
}
.photo.dark .photo-label { background: var(--ink-800); color: var(--ink-300); border-color: var(--ink-700); }
.photo[style*="url("] .photo-label { display: none; }

.photo-warm::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 16, 32, 0.0) 50%, rgba(11, 16, 32, 0.25));
  pointer-events: none;
}
.photo-tint::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(27, 42, 111, 0.15);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* —— Tag / chip —— */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--ink-100);
  color: var(--ink-600);
}
.tag-coral { background: var(--accent-coral-100); color: var(--accent-coral-700); }
.tag-brand { background: var(--brand-100); color: var(--brand-700); }
.tag-dark { background: var(--ink-800); color: var(--ink-200); }

/* —— Divider —— */
hr.rule {
  border: none;
  border-top: 1px solid var(--ink-200);
  margin: 0;
}

/* —— Number markers —— */
.num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-400);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* —— Reusable hero subhead box —— */
.callout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  padding: 7px 14px 7px 9px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  box-shadow: var(--shadow-sm);
}
.callout-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal-green);
  box-shadow: 0 0 0 4px rgba(14, 138, 74, 0.15);
}

/* —— Visible focus —— */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* —— Hamburger button (hidden on desktop, shown via @media below) —— */
.nav-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink-900);
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}
body.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-cta-mobile { display: none; }

/* ============================================================================
   Mobile overrides (max-width: 720px)
   Single breakpoint for phone-only adjustments. Wider tablets keep the
   desktop layout; the existing fluid type/clamp() handles in-between widths.
   ============================================================================ */
@media (max-width: 720px) {

  :root {
    --gutter: 20px;
  }

  /* Tighter section spacing — desktop uses 128px (--space-10). */
  .section    { padding: var(--space-8) 0; }      /* 64px */
  .section-sm { padding: var(--space-7) 0; }      /* 48px */

  /* Touch-target floor for primary CTAs. */
  .btn { min-height: 44px; padding: 13px 20px; }

  /* —— Nav: collapse to hamburger ——————————————————————————————————— */
  .nav-inner { height: 64px; gap: 12px; }
  .brand { font-size: 18px; gap: 10px; }
  .brand-mark { width: 40px; height: 40px; }

  .nav-hamburger { display: inline-flex; order: 3; }
  .nav-cta { display: none; }

  .nav-primary {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--ink-100);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  }
  body.nav-open .nav-primary {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 8px;
    font-size: 17px;
  }
  .nav-links li { width: 100%; }
  .nav-links li.menu-item-has-children {
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .nav-links a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--ink-100);
  }
  .nav-links .menu-item-has-children > a::after { display: none; }
  /* Sub-menu rendered inline (no hover panel on touch). */
  .nav-links .sub-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 8px 16px;
    min-width: 0;
  }
  .nav-links .sub-menu a {
    padding: 10px 0;
    font-size: 15px;
    color: var(--ink-600);
    border-bottom: 0;
  }
  .nav-cta-mobile {
    display: inline-flex;
    margin: 16px 20px 20px;
    justify-content: center;
  }
  /* Hide nav search on mobile (the form is wider than the viewport). */
  .nav-search { display: none; }

  /* —— Footer: stack 4 columns —————————————————————————————————————— */
  .footer { padding: 64px 0 24px; margin-top: 64px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 48px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}
