/* Discaddie site chrome: header (nav), footer and button shape.
   ONE stylesheet for every page on discaddie.com. Linked from each page in <head>.

   KEEP IN SYNC: products/articles/src/styles/site-chrome.css is a byte-for-byte copy of this
   file (the articles project has no cross-repo dependency). Change both, or neither.
   Header/footer MARKUP is still copied into every page (EN + DA, locked decision 2026-06-23);
   only the look lives here, so the pages cannot drift apart again.

   Canonical values: measures from the website (72 px bar, 26 px logo, 48 px wrap), AA lifts from
   the articles spec 2026-09-30 (13 px footer text, 44 px touch rows, dark text on the orange CTA).
   Button radius = ds.radius.control (company/design/2026-09-26-ds-tokens.ts): square with soft
   corners, never a pill. */

:root {
  --chrome-bone: #EDE7D7;
  --chrome-card: #FBF8F1;
  --chrome-navy: #181D29;
  --chrome-ink: #222222;
  --chrome-ink-soft: #5C5850;
  --chrome-on-orange: #161B26;
  --chrome-orange: #FB8500;
  --chrome-orange-pressed: #E07A00;
  --chrome-cream: #EDE7D7;
  --chrome-cream-soft: #B8B2A2;
  --chrome-line: rgba(23, 28, 23, 0.16);
  --chrome-line-soft: rgba(23, 28, 23, 0.08);
  --chrome-pad: 48px;
  /* Buttons: 14 px (ds control). Compact buttons (under 40 px tall) use 8 px (ds chip) so they
     still read as rectangles. Pages use var(--btn-radius) on every .btn, .btn-ghost etc. */
  --btn-radius: 14px;
  --btn-radius-sm: 8px;
}

/* Zero-specificity reset, so the chrome looks the same whatever the host page resets. */
:where(.site-nav, .site-nav *, .site-footer, .site-footer *) {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.chrome-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--chrome-pad);
}

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--chrome-bone);
  border-bottom: 1px solid var(--chrome-line);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  color: var(--chrome-ink);
}
.site-nav .chrome-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}
.site-nav .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 9px 0; /* 26 px logo + 18 = 44 px touch target, no visual change */
  text-decoration: none;
}
.site-nav .logo-img {
  display: block;
  height: 26px;
  width: auto;
  max-width: none;
}
.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-nav .nav-links > a:not(.nav-cta),
.site-nav .nav-dropdown summary {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--chrome-ink-soft);
  transition: color 0.2s;
}
.site-nav .nav-links > a:not(.nav-cta):hover,
.site-nav .nav-links > a[aria-current],
.site-nav .nav-dropdown summary:hover,
.site-nav .nav-dropdown[open] summary {
  color: var(--chrome-ink);
}
/* Current section: "Features" is marked on a feature page (the page sets aria-current on its panel link) */
.site-nav .nav-dropdown:has(a[aria-current]) summary {
  color: var(--chrome-ink);
  font-weight: 600;
}
.site-nav .nav-links > a[aria-current] {
  font-weight: 600;
}

/* Features dropdown (native <details>) */
.site-nav .nav-dropdown {
  position: relative;
}
.site-nav .nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.site-nav .nav-dropdown summary::-webkit-details-marker {
  display: none;
}
.site-nav .nav-dropdown summary::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}
.site-nav .nav-dropdown[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}
.site-nav .nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--chrome-card);
  border: 1px solid rgba(23, 28, 23, 0.1);
  border-radius: 12px;
  padding: 6px;
  min-width: 180px;
  box-shadow: 0 8px 24px -8px rgba(23, 28, 23, 0.18);
  z-index: 10;
}
.site-nav .nav-dropdown-panel a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--chrome-ink-soft);
  transition: background 0.15s, color 0.15s;
}
.site-nav .nav-dropdown-panel a:hover {
  background: var(--chrome-bone);
  color: var(--chrome-ink);
}
.site-nav .nav-dropdown-panel a.active {
  color: var(--chrome-ink);
  font-weight: 600;
}

/* EN . DA switcher */
.site-nav .nav-lang {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.site-nav .nav-lang .cur {
  color: var(--chrome-ink);
  font-weight: 600;
}
.site-nav .nav-lang a {
  padding: 10px 13px; /* touch target 45 x 44, same look: the negative margin cancels the padding */
  margin: -10px -13px;
  color: var(--chrome-ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav .nav-lang a:hover {
  color: var(--chrome-ink);
}
.site-nav .nav-lang .sep {
  color: rgba(34, 34, 34, 0.3);
}

/* CTA button. 44 px tall (10 + 24 + 10), dark text on orange (AA, articles spec 2026-09-30). */
.site-nav .nav-cta {
  background: var(--chrome-orange);
  color: var(--chrome-on-orange);
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: var(--btn-radius);
  transition: background 0.2s;
}
.site-nav .nav-cta:hover {
  background: var(--chrome-orange-pressed);
}

.site-nav .nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.site-nav .nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--chrome-ink);
  transition: transform 0.25s, opacity 0.2s;
}
.site-nav.open .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-nav.open .nav-burger span:nth-child(2) {
  opacity: 0;
}
.site-nav.open .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile: burger menu. Same breakpoint for header, footer padding and menu. */
@media (max-width: 880px) {
  :root {
    --chrome-pad: 24px;
  }
  .site-nav .nav-burger {
    display: flex;
  }
  .site-nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--chrome-bone);
    border-bottom: 1px solid var(--chrome-line);
    padding: 4px var(--chrome-pad) 20px;
    max-height: calc(100vh - 73px);
    max-height: calc(100dvh - 73px);
    overflow-y: auto;
  }
  .site-nav.open .nav-links {
    display: flex;
  }
  .site-footer {
    padding: 40px 0;
  }
  .site-nav .nav-links > a:not(.nav-cta),
  .site-nav .nav-dropdown summary {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 0;
  }
  .site-nav .nav-links > a:not(.nav-cta),
  .site-nav .nav-lang {
    border-top: 1px solid var(--chrome-line-soft);
  }
  .site-nav .nav-lang {
    min-height: 48px;
    padding: 12px 0;
  }
  .site-nav .nav-dropdown-panel {
    position: static;
    transform: none;
    min-width: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 4px 12px;
  }
  .site-nav .nav-dropdown-panel a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 8px 0;
    border-radius: 0;
  }
  .site-nav .nav-dropdown-panel a + a {
    border-top: 1px solid var(--chrome-line-soft);
  }
  .site-nav .nav-cta {
    align-self: flex-start;
    margin-top: 8px;
  }
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
  margin-top: auto; /* pins the footer to the bottom on short flex-column pages (reset-password, 404) */
  background: var(--chrome-navy);
  color: var(--chrome-cream-soft);
  padding: 56px 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: normal;
  text-align: left;
}
.site-footer .chrome-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.site-footer .foot-brand {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--chrome-cream);
}
.site-footer .foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-footer .foot-links a,
.site-footer .foot-meta a {
  display: inline-block;
  padding: 10px 0;
  color: var(--chrome-cream-soft);
  text-decoration: none;
}
.site-footer .foot-links a:hover,
.site-footer .foot-meta a:hover {
  color: var(--chrome-cream);
  text-decoration: underline;
}
.site-footer .foot-meta {
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid rgba(237, 231, 215, 0.12);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────
   BUTTONS injected by assets/cookie-consent.js (its own radius is 999 px, and that file is
   not touched here). Remove these two rules once cookie-consent.js uses 8 px itself.
───────────────────────────────────────── */
.dc-cookie-banner .dc-cookie-btn,
button.dc-cookie-manage {
  border-radius: var(--btn-radius-sm);
}
