/*
Theme Name: CodaRoq
Theme URI: https://codaroq.com/
Author: Röllin Racing GmbH
Description: A lightweight block theme for the CodaRoq software brand. Full-width product pages, dark technical presentation, and a clean editorial layout for insights.
Version: 1.0.2
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: codaroq
*/

html { scroll-behavior: smooth; }
body { margin: 0; background: #07090d; color: #f4f7fb; }
.wp-site-blocks { padding: 0; }
a { text-underline-offset: 0.2em; }
.cr-theme-header a, .cr-theme-footer a { text-decoration: none; }
.cr-theme-nav a:hover { color: #f4f7fb !important; }
.cr-post-shell { width: min(820px, calc(100% - 32px)); margin: 0 auto; }
.cr-post-shell h1 { font-size: clamp(42px, 7vw, 76px); line-height: 0.98; letter-spacing: -0.055em; }
.cr-post-shell h2 { margin-top: 2.2em; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -0.035em; }
.cr-post-shell h3 { margin-top: 1.8em; font-size: 24px; letter-spacing: -0.025em; }
.cr-post-shell p, .cr-post-shell li { color: #b4bdc9; font-size: 18px; }
.cr-post-shell a { color: #ff7353; }
.cr-post-shell table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.cr-post-shell th, .cr-post-shell td { padding: 14px; border-bottom: 1px solid rgba(255,255,255,.12); text-align: left; }
.cr-post-shell th { color: #f4f7fb; }
.cr-post-shell code { background: #10141c; padding: .15em .4em; border-radius: 6px; }
.cr-archive-card { transition: transform .2s ease; }
.cr-archive-card:hover { transform: translateY(-4px); }
/* The imported CodaRoq pages contain a self-contained fallback header/footer.
   The CodaRoq theme supplies the global versions and hides the fallbacks. */
body.page .wp-block-post-content > div:first-child {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body.page .wp-block-post-content > div:first-child > header:first-child,
body.page .wp-block-post-content > div:first-child > footer:last-child {
  display: none !important;
}

/* 1.0.2 launch polish */
.cr-theme-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(7, 9, 13, 0.92) !important;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.admin-bar .cr-theme-header { top: 32px; }
.cr-theme-header .wp-block-group.alignwide { flex-wrap: nowrap !important; }
.cr-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #f4f7fb;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
.cr-wordmark-accent { color: #ff5a36; }
.cr-wordmark-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 90, 54, 0.72);
  border-radius: 9px;
  color: #ff5a36;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(255, 90, 54, 0.08);
}
.cr-theme-nav { margin-left: auto; font-size: 14px !important; }
.cr-theme-nav .wp-block-navigation-item__content { color: #a7b0bd; transition: color .18s ease; }
.cr-theme-nav .wp-block-navigation-item__content:hover { color: #f4f7fb; }
.cr-theme-nav .wp-block-navigation-item:last-child > .wp-block-navigation-item__content {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 17px;
  border-radius: 999px;
  background: #ff5a36;
  color: #170805;
  box-shadow: 0 12px 30px rgba(255, 90, 54, 0.18);
}
.cr-theme-nav .wp-block-navigation-item:last-child > .wp-block-navigation-item__content:hover {
  color: #170805 !important;
  transform: translateY(-1px);
}
.cr-theme-footer { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.cr-theme-footer a { color: #ff7353; }
.cr-theme-footer a:hover { color: #f4f7fb; }
:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid #ff5a36;
  outline-offset: 4px;
}
[id] { scroll-margin-top: 96px; }

.wp-block-navigation__responsive-container.is-menu-open {
  background: #07090d !important;
  color: #f4f7fb !important;
  padding: 28px !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  padding-top: 72px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  color: #f4f7fb !important;
  font-size: 24px;
  font-weight: 760;
  line-height: 1.2;
}
.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-container-open {
  color: #f4f7fb;
}

@media (max-width: 1080px) and (min-width: 761px) {
  .cr-theme-nav { font-size: 12px !important; }
  .cr-theme-nav .wp-block-navigation__container { gap: 12px !important; }
  .cr-theme-nav .wp-block-navigation-item:last-child > .wp-block-navigation-item__content {
    padding: 0 13px;
  }
}

@media (max-width: 782px) {
  .admin-bar .cr-theme-header { top: 46px; }
}

@media (max-width: 760px) {
  .cr-theme-header { padding-top: 12px !important; padding-bottom: 12px !important; }
  .cr-theme-header .wp-block-group.alignwide { min-height: 44px; }
  .cr-wordmark { font-size: 20px; }
  .cr-wordmark-mark { width: 28px; height: 28px; }
  .cr-theme-nav {
    width: auto;
    order: initial;
    padding-bottom: 0;
    margin-left: auto;
  }
  .cr-theme-nav .wp-block-navigation__responsive-container-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
  }
  .cr-theme-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child > .wp-block-navigation-item__content {
    min-height: 50px;
    padding: 0 20px;
    margin-top: 12px;
    color: #170805 !important;
    font-size: 18px;
  }
  body.page .wp-block-post-content > div:first-child > main > section {
    padding-top: 72px !important;
    padding-bottom: 72px !important;
  }
  body.page .wp-block-post-content p:not([style*="font-size:20px"]):not([style*="font-size:18px"]) {
    font-size: 15.5px !important;
    line-height: 1.65 !important;
  }
  body.page .wp-block-post-content p[style*="font-size:20px"] {
    font-size: 18px !important;
    line-height: 1.6 !important;
  }
  body.page .wp-block-post-content p[style*="font-size:18px"] {
    font-size: 16px !important;
    line-height: 1.65 !important;
  }
  body.page .wp-block-post-content small { line-height: 1.45; }
  .cr-theme-footer { padding-top: 32px !important; padding-bottom: 32px !important; }
  .cr-theme-footer .wp-block-group.alignwide { gap: 8px; }
  .cr-theme-footer p { margin: 0; font-size: 13px !important; line-height: 1.6; }
}

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