/*
 * RKCadTools theme styles.
 * Tokens per marketing/docs/brand-identity.md (Toolkit Blue + Signal Amber, Inter +
 * JetBrains Mono, 6px button radius, feature palette per concept).
 */

:root {
  /* Brand */
  --brand-primary: #1F6FB8;
  --brand-primary-100: #DDE9F4;
  --brand-primary-300: #6FA3D0;
  --brand-primary-700: #155080;
  --brand-primary-900: #0C3B61;
  --brand-secondary: #D08A2B;
  --brand-secondary-700: #A66816;

  /* Neutrals */
  --ink-900: #1A1F2A;
  --ink-700: #3D4655;
  --ink-500: #6B7280;
  --ink-300: #B4BAC4;
  --surface-50: #F7F8FA;
  --surface-0: #FFFFFF;
  --dark-950: #0D1117;
  --dark-900: #161B22;
  --ink-on-dark: #D8DCE3;

  /* Feature palette (matches AutoCAD ribbon concept colors) */
  --c-tag: #1F6FB8;
  --c-number: #2D8881;
  --c-connector: #C77036;
  --c-data: #6850B0;
  --c-sync: #2C9A5C;
  --c-weld: #B7472A;
  --c-energy: #D08A2B;
  --c-danger: #C53636;
  --c-neutral: #5D6B7E;

  /* Geometry */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --duration-medium: 200ms;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-50);
  color: var(--ink-900);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.wp-site-blocks { overflow-x: clip; }

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

/* Opt-in page template for tools and wide tables, without the .shell cap. */
.rk-full-width-page {
  width: calc(100% - 40px);
  max-width: none;
  margin: 32px auto 48px;
}

.rk-full-width-page > .wp-block-post-content {
  width: 100%;
  max-width: none;
}

@media (max-width: 600px) {
  .rk-full-width-page {
    width: calc(100% - 28px);
    margin-block: 24px 32px;
  }
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 250, 0.92);
  border-bottom: 1px solid var(--ink-300);
  backdrop-filter: blur(14px);
}

.topbar .wp-block-group { min-height: 64px; }

/* Keep the whole template part sticky; its inner header has no scroll range. */
.wp-site-blocks > header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 30;
}
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
.topbar { background: var(--surface-0); border-bottom-color: #e2e6eb; backdrop-filter: none; }
.topbar > .shell { min-height: 76px; flex-wrap: nowrap; gap: 24px; }
.topbar .wp-block-navigation__container { gap: 24px; }
.topbar .wp-block-navigation-item__content { display: inline-flex; align-items: center; min-height: 44px; }
.topbar .wp-block-navigation .nav-cta > .wp-block-navigation-item__content { padding: 0 16px; border-radius: 6px; background: var(--brand-primary); color: white; }
.topbar .nav-cta > a:hover { background: var(--brand-primary-700); }
.topbar .wp-block-navigation__responsive-container-open,
.topbar .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.topbar a:focus-visible, .topbar button:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 4px; }
@media (max-width: 900px) {
  .topbar > .shell { min-height: 68px; }
  .topbar .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
  .topbar .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  .topbar .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; background: var(--surface-0); color: var(--ink-900); }
  .topbar .is-menu-open .wp-block-navigation__responsive-container-content { align-items: stretch; padding-top: 64px; }
  .topbar .is-menu-open .wp-block-navigation__container { width: 100%; align-items: stretch; gap: 8px; }
  .topbar .is-menu-open .wp-block-navigation-item { width: 100%; }
  .topbar .is-menu-open .wp-block-navigation-item__content { width: 100%; padding: 12px 16px; font-size: 18px; }
}
@media (max-width: 782px) {
  .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; }
}
@media (max-width: 600px) {
  .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; }
}

.site-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.site-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--surface-0);
  background: var(--brand-primary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wordmark {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}

.wordmark em {
  color: var(--brand-primary);
  font-style: normal;
}

/* ---------- Buttons ---------- */

.button,
.wp-block-button__link,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: 500 16px/1 'Inter', sans-serif;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-medium) ease, border-color var(--duration-medium) ease, color var(--duration-medium) ease;
}

.button.primary,
.is-style-primary .wp-block-button__link,
.wp-block-button .wp-block-button__link.has-toolkit-blue-background-color {
  color: var(--surface-0);
  background: var(--brand-primary);
}

.button.primary:hover,
.is-style-primary .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link.has-toolkit-blue-background-color:hover {
  background: var(--brand-primary-700);
}

.button.secondary,
.is-style-secondary .wp-block-button__link {
  color: var(--ink-700);
  background: transparent;
  border-color: var(--ink-300);
}

.button.secondary:hover,
.is-style-secondary .wp-block-button__link:hover {
  color: var(--ink-900);
  border-color: var(--ink-700);
}

.button.cta,
.is-style-cta .wp-block-button__link {
  color: var(--ink-900);
  background: var(--brand-secondary);
}

.button.cta:hover,
.is-style-cta .wp-block-button__link:hover {
  background: var(--brand-secondary-700);
  color: var(--surface-0);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  padding: 80px 0 96px;
  overflow: hidden;
  color: var(--ink-900);
  background:
    linear-gradient(180deg, var(--brand-primary-100), var(--surface-0));
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    repeating-linear-gradient(60deg,  rgba(180, 186, 196, 0.18) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(120deg, rgba(180, 186, 196, 0.18) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  content: "";
  background: linear-gradient(180deg, rgba(247, 248, 250, 0), var(--surface-50) 86%);
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0 0 0 42%;
  overflow: hidden;
}

.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img,
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  filter: saturate(0.94) contrast(1.02);
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  transform: scale(1.18);
  transform-origin: center;
  background: var(--dark-950);
  pointer-events: none;
}

.hero-media::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(90deg,
    var(--brand-primary-100) 0%,
    rgba(221, 233, 244, 0.92) 20%,
    rgba(221, 233, 244, 0.48) 56%,
    rgba(221, 233, 244, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--brand-primary-700);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  width: 32px;
  height: 2px;
  content: "";
  background: var(--brand-secondary);
}

.hero h1,
.rk-heading-xl {
  margin-bottom: 20px;
  max-width: 640px;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-900);
}

.lead {
  margin-bottom: 28px;
  max-width: 600px;
  color: var(--ink-700);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(680px, 100%);
}

.proof > * { margin-block-start: 0; }

.proof > * {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.proof strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 600;
}

.proof span {
  display: block;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.45;
}

/* ---------- Outcome strip ---------- */

.outcome-strip {
  position: relative;
  z-index: 3;
  margin-top: -32px;
}

.outcomes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  box-shadow: 0 12px 32px rgba(26, 31, 42, 0.07);
}

.outcomes > * { margin-block-start: 0; }

.outcome {
  min-height: 118px;
  padding: 22px;
  border-right: 1px solid var(--ink-300);
}

.outcome:last-child { border-right: 0; }

.outcome h3 {
  margin: 0 0 8px;
  color: var(--ink-900);
  font-size: 18px;
  font-weight: 600;
}

.outcome p {
  margin: 0;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Sections ---------- */

.rk-section { padding: 88px 0; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(260px, 0.52fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 36px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 49px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-900);
}

.section-head p,
.bullet span,
.contact-panel p,
.trust {
  color: var(--ink-700);
}

/* ---------- Feature cards ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid > * { margin-block-start: 0; }

.feature-card {
  position: relative;
  isolation: isolate;
  min-height: 268px;
  padding: 24px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  color: inherit;
  background: var(--surface-0);
  box-shadow: 0 1px 3px rgba(26, 31, 42, 0.08);
  transition: border-color var(--duration-medium) ease, box-shadow var(--duration-medium) ease;
}

.feature-card:hover {
  border-color: var(--brand-primary-300);
  box-shadow: 0 6px 18px rgba(26, 31, 42, 0.10);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
}

.feature-card h3 a {
  position: static;
  color: inherit;
  text-decoration: none;
}

.feature-card h3 a::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
}

.feature-card h3 a:hover { color: var(--brand-primary); }

.feature-card h3 a:focus-visible { outline: 0; }

.feature-card p {
  margin: 0;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.55;
}

.feature-card:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 184, 0.18);
}

/* ---------- Brand SVG icon wrapper ---------- */

.rk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
}

.rk-icon svg,
.rk-icon img {
  width: 100%;
  height: 100%;
}

.feature-card .rk-icon { width: 36px; height: 36px; }
.rk-feature-detail .rk-icon { width: 40px; height: 40px; }

/* ---------- Workflow ---------- */

.workflow {
  background: var(--brand-primary-100);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--ink-300);
}

.steps > * { margin-block-start: 0; }

.step {
  min-height: 218px;
  padding: 24px;
  background: var(--surface-0);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 22px;
  border-radius: 50%;
  color: var(--surface-0);
  background: var(--brand-primary);
  font-weight: 700;
}

.step h3 {
  margin: 0 0 8px;
  color: var(--ink-900);
  font-size: 17px;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Split + bullets (licensing section) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.58fr);
  gap: 54px;
  align-items: start;
}

.bullets {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.bullet {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
}

.bullet::before {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--surface-0);
  background: var(--brand-primary);
  content: "\2713";
  font-size: 12px;
  font-weight: 700;
}

.bullet > * { margin: 0; }
.bullet strong { color: var(--ink-900); }

/* ---------- Contact panel ---------- */

.contact-panel {
  position: sticky;
  top: 88px;
  padding: 26px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  box-shadow: 0 12px 32px rgba(26, 31, 42, 0.07);
}

.contact-panel > * {
  margin-block-start: 0;
}

.contact-panel > * + * {
  margin-block-start: 14px;
}

.contact-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-900);
}

.contact-panel > p {
  margin-bottom: 4px;
}

.rk-request-form {
  display: grid;
  gap: 10px;
  margin: 0;
}

.rk-request-form > *,
.rk-request-form p,
.rk-request-form .form-row {
  margin: 0 !important;
}

.rk-request-form label {
  display: grid;
  gap: 5px;
  margin: 0 !important;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 600;
}

.rk-request-form br {
  display: none;
}

.rk-request-form label:has(input[name="website"]),
.rk-request-form label:has(input[name="url"]),
.rk-request-form label:has(input[type="url"]),
.rk-request-form .honeypot,
.rk-request-form .hp,
.rk-request-form [aria-hidden="true"] {
  display: none !important;
}

.rk-request-form input,
.rk-request-form select,
.rk-request-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-md);
  color: var(--ink-900);
  background: var(--surface-0);
  font: 400 14px 'Inter', sans-serif;
}

.rk-request-form textarea {
  min-height: 96px;
  resize: vertical;
}

.rk-request-form input:focus,
.rk-request-form select:focus,
.rk-request-form textarea:focus {
  outline: 3px solid rgba(31, 111, 184, 0.18);
  border-color: var(--brand-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trust {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-500);
}

/* ---------- Final CTA (dark) ---------- */

.final-cta {
  color: var(--ink-on-dark);
  background: var(--dark-900);
}

.final-cta h2 { color: var(--surface-0); }

.final-cta .section-head p,
.final-cta .eyebrow {
  color: var(--ink-on-dark);
}

.final-cta .eyebrow {
  color: var(--brand-primary-300);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--ink-300);
  color: var(--ink-500);
  background: var(--surface-0);
  font-size: 14px;
}

.footer-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.site-footer .footer-resource {
  margin-block: 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E6E8EC;
  font-size: 14px;
  line-height: 1.6;
}

.footer-resource p { margin: 0; }

.footer-resource .footer-resource-label {
  margin-bottom: 4px;
  font-size: 12px;
}

.footer-resource a {
  color: var(--ink-700);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--ink-300);
  text-underline-offset: 3px;
}

.footer-resource a:hover {
  color: var(--brand-primary-700);
  text-decoration-color: currentColor;
}

/* ---------- Editor reset ---------- */

.entry-content > * { margin-block-start: 0; }

/* ---------- Focus ---------- */

a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-block-navigation a:focus-visible {
  outline: 3px solid rgba(31, 111, 184, 0.24);
  outline-offset: 3px;
}

/* ---------- Code (brand §8) ---------- */

pre, code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--dark-900);
  color: var(--ink-on-dark);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Feature explorer (features page) ---------- */

.rk-feature-explorer {
  display: grid;
  gap: 22px;
}

.rk-feature-rail {
  display: flex;
  gap: 10px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  scroll-snap-type: x proximity;
}

.rk-feature-pill {
  position: relative;
  display: grid;
  flex: 0 0 min(260px, 78vw);
  gap: 4px;
  min-height: 86px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
  transition: background var(--duration-medium) ease;
}

.rk-feature-pill:hover,
.rk-feature-pill.is-active {
  background: var(--brand-primary-100);
}

.rk-feature-pill span {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rk-feature-pill strong {
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink-900);
  font-weight: 600;
}

.rk-feature-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rk-feature-detail {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto auto minmax(100px, auto) auto auto auto;
  align-content: start;
  padding: 28px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  box-shadow: 0 1px 3px rgba(26, 31, 42, 0.06);
  overflow: hidden;
  transition: border-color var(--duration-medium) ease, box-shadow var(--duration-medium) ease;
}

.rk-feature-detail > * { margin-block-start: 0; }
.rk-feature-detail > * + * { margin-block-start: 16px; }

.rk-feature-detail:hover,
.rk-feature-detail:target {
  border-color: var(--brand-primary-300);
  box-shadow: 0 8px 22px rgba(26, 31, 42, 0.10);
}

.rk-feature-detail h2 {
  margin-bottom: 12px;
  min-height: 2.25em;
  font-size: clamp(22px, 2.4vw, 31px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--ink-900);
}

.rk-feature-detail p,
.rk-feature-detail li,
.rk-feature-facts span {
  color: var(--ink-700);
}

.rk-feature-detail > p:not(.eyebrow) {
  min-height: 6.4em;
}

.rk-feature-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0;
  align-items: stretch;
}

.rk-feature-facts > * {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-block-start: 0;
  min-height: 128px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-50);
  border: 1px solid var(--ink-300);
}

.rk-feature-facts p { margin: 0; }

.rk-feature-facts strong,
.rk-feature-facts span {
  display: block;
}

.rk-feature-facts strong {
  margin-bottom: 5px;
  color: var(--ink-900);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rk-feature-facts span {
  font-size: 15px;
  line-height: 1.45;
}

.rk-feature-detail ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rk-feature-detail li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
}

.rk-feature-detail li::before {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  color: var(--surface-0);
  background: var(--brand-primary);
  content: "\2713";
  font-size: 11px;
  font-weight: 700;
}

/* Tone hook — color the top-left accent strip per feature concept */
.rk-feature-detail::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  content: "";
  background: var(--c-tag);
}

.rk-feature-detail--number::before    { background: var(--c-number); }
.rk-feature-detail--connector::before { background: var(--c-connector); }
.rk-feature-detail--data::before      { background: var(--c-data); }
.rk-feature-detail--sync::before      { background: var(--c-sync); }
.rk-feature-detail--weld::before      { background: var(--c-weld); }
.rk-feature-detail--energy::before    { background: var(--c-energy); }
.rk-feature-detail--neutral::before   { background: var(--c-neutral); }

/* ---------- Embedded YouTube preview in feature detail ---------- */

.rk-feature-video {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-md);
  background: var(--dark-900);
}

.rk-feature-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Features page hero ---------- */

.feature-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 56px;
  background: linear-gradient(180deg, var(--brand-primary-100) 0%, var(--surface-50) 100%);
}

.feature-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(60deg,  rgba(180, 186, 196, 0.16) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(120deg, rgba(180, 186, 196, 0.16) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}

.feature-hero-grid,
.feature-video-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.72fr);
  gap: 52px;
  align-items: center;
}

.feature-hero-copy h1 {
  margin-bottom: 20px;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-900);
}

/* ---------- Feature device (product preview card) ---------- */

.feature-device {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--dark-900);
  box-shadow: 0 12px 36px rgba(26, 31, 42, 0.16);
}

.feature-device-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.feature-device-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-primary-300);
}

.feature-device img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  opacity: 0.92;
}

.feature-device-data {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  gap: 8px;
}

.feature-device-data span {
  width: fit-content;
  max-width: 100%;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--surface-0);
  background: var(--brand-primary);
  font-size: 13px;
  font-weight: 600;
}

.feature-device-data span:nth-child(2) {
  justify-self: end;
  background: var(--brand-secondary);
  color: var(--ink-900);
}

.feature-device-data span:nth-child(3) {
  margin-left: 12%;
  background: var(--c-sync);
}

.feature-video-band {
  background: var(--brand-primary-100);
}

.feature-video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--dark-900);
  box-shadow: 0 12px 36px rgba(26, 31, 42, 0.16);
}

.feature-video-frame .hero-poster,
.feature-video-frame .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-video-frame .hero-video { border: 0; }

.feature-faq {
  background: var(--surface-0);
}

.feature-faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-faq-grid > * { margin-block-start: 0; }

.feature-faq-item {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-50);
}

.feature-faq-item h3 {
  margin: 0 0 10px;
  color: var(--ink-900);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 600;
}

.feature-faq-item p {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.55;
}

/* ---------- About page ---------- */

.about-hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--brand-primary-100) 0%, var(--surface-50) 100%);
}

.about-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(60deg,  rgba(180, 186, 196, 0.16) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(120deg, rgba(180, 186, 196, 0.16) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}

.about-hero-grid,
.about-content-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(340px, 0.48fr);
  gap: 58px;
  align-items: start;
}

.about-hero-grid {
  gap: 64px;
  align-items: end;
}

.about-hero h1 {
  margin-bottom: 22px;
  max-width: 790px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-900);
}

.identity-card,
.about-note,
.about-value {
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  box-shadow: 0 1px 3px rgba(26, 31, 42, 0.06);
}

.identity-card,
.about-note { padding: 28px; }

.identity-card-photo {
  width: 112px;
  height: 112px;
  margin: 0 0 20px;
}

.identity-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--ink-300);
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1);
}

.identity-card > *,
.about-note > *,
.about-value > * { margin-block-start: 0; }

.identity-card > * + *,
.about-note > * + *,
.about-value > * + * { margin-block-start: 10px; }

.identity-card h2,
.about-note h3 {
  margin: 0 0 4px;
  color: var(--ink-900);
  font-weight: 600;
}

.identity-card p,
.about-note p,
.about-copy p,
.about-value p {
  color: var(--ink-700);
}

.identity-card a { color: var(--brand-primary); }

.identity-card .identity-actions {
  margin-top: 18px;
}

.identity-card .identity-actions .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.identity-card .identity-actions .wp-block-button__link::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  color: currentColor;
  content: "in";
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.identity-card .identity-actions a {
  color: var(--surface-0);
}

.about-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-900);
}

.about-copy p { font-size: 17px; }

.about-note { background: var(--surface-50); }

.about-values {
  background: var(--brand-primary-100);
}

.about-value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.about-value-grid > * { margin-block-start: 0; }

.about-value {
  min-height: 220px;
  padding: 24px;
  transition: border-color var(--duration-medium) ease, box-shadow var(--duration-medium) ease;
}

.about-value:hover {
  border-color: var(--brand-primary-300);
  box-shadow: 0 6px 18px rgba(26, 31, 42, 0.10);
}

.about-value > p:first-child {
  display: inline-block;
  margin: 0 0 18px;
}

.about-value > p:first-child span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  color: var(--surface-0);
  background: var(--brand-primary);
  font-weight: 700;
  font-size: 14px;
}

.about-value h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink-900);
}

/* ---------- Install page ---------- */

.install-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 56px;
  background: linear-gradient(180deg, var(--brand-primary-100) 0%, var(--surface-50) 100%);
}

.install-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(60deg,  rgba(180, 186, 196, 0.16) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(120deg, rgba(180, 186, 196, 0.16) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}

.install-hero-grid,
.install-body-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.56fr);
  gap: 48px;
  align-items: start;
}

.install-hero-grid { align-items: center; }

.install-hero h1 {
  margin-bottom: 20px;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-900);
}

.install-package-card,
.install-step,
.install-panel,
.install-check-card {
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  box-shadow: 0 1px 3px rgba(26, 31, 42, 0.06);
}

.install-package-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.install-package-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(31, 111, 184, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(31, 111, 184, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(135deg, #000, transparent 76%);
  opacity: 0.45;
  pointer-events: none;
}

.install-package-card > * {
  position: relative;
  z-index: 1;
}

.install-card-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--ink-900);
  font-weight: 700;
}

.install-card-label img {
  width: 28px;
  height: 28px;
}

.install-path,
.wp-site-blocks .install-path {
  margin: 0;
  padding: 18px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.install-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.install-meta-item {
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(180, 186, 196, 0.72);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
}

.install-meta-item p,
.install-check-card p {
  margin: 0;
}

.install-meta-item strong,
.install-meta-item span,
.install-check-card p > strong,
.install-check-card span {
  display: block;
}

.install-meta-item strong,
.install-check-card strong {
  color: var(--ink-900);
  font-weight: 700;
}

.install-meta-item span,
.install-check-card span {
  margin-top: 6px;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.45;
}

.install-steps {
  display: grid;
  gap: 14px;
}

.install-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.install-step > * {
  margin-block-start: 0;
}

.install-step .install-step-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: var(--radius-md);
  color: var(--surface-0);
  background: var(--brand-primary);
  font-size: 18px;
  font-weight: 700;
}

.install-step--data .install-step-number { background: var(--c-data); }
.install-step--energy .install-step-number {
  color: var(--surface-0);
  background: var(--brand-secondary);
}
.install-step--sync .install-step-number { background: var(--c-sync); }

.install-step h2,
.install-panel h2 {
  margin: 0 0 8px;
  color: var(--ink-900);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
}

.install-step p,
.install-step li,
.install-panel p,
.install-check-band p {
  color: var(--ink-700);
}

.install-step ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.install-step li {
  margin: 7px 0;
}

.rk-install-page code {
  display: inline-block;
  padding: 2px 6px;
  overflow-wrap: anywhere;
  color: var(--brand-primary-700);
  background: var(--brand-primary-100);
  border-radius: var(--radius-sm);
}

.rk-install-page .install-folder-figure {
  margin: 22px 0 0;
}

.install-folder-figure a {
  display: block;
  border-radius: var(--radius-sm);
}

.install-folder-figure a:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 4px;
}

.install-folder-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
}

.install-folder-figure figcaption {
  margin-top: 12px;
  color: var(--ink-700);
  font-size: 13px;
  line-height: 1.6;
}

.rk-install-page .install-body-grid > *,
.rk-install-page .install-steps > *,
.rk-install-page .install-side > * {
  margin-block-start: 0;
}

.install-side {
  display: grid;
  gap: 16px;
}

.install-panel {
  padding: 22px;
}

.install-panel > * {
  margin-block-start: 0;
}

.install-panel > * + * {
  margin-block-start: 12px;
}

.install-callout {
  padding: 14px;
  border-left: 4px solid var(--brand-secondary);
  border-radius: var(--radius-md);
  background: rgba(208, 138, 43, 0.1);
}

.install-check-band {
  background: var(--brand-primary-100);
}

.install-check-band h2 {
  margin: 0 0 10px;
  color: var(--ink-900);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.install-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.install-check-card {
  min-height: 132px;
  padding: 18px;
}

/* ---------- Cookie policy page ---------- */

.cookie-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 56px;
  background: linear-gradient(180deg, var(--brand-primary-100) 0%, var(--surface-50) 100%);
}

.cookie-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(60deg,  rgba(180, 186, 196, 0.16) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(120deg, rgba(180, 186, 196, 0.16) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}

.cookie-hero-grid,
.cookie-content-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.56fr);
  gap: 48px;
  align-items: start;
}

.cookie-hero-grid { align-items: center; }

.cookie-hero h1 {
  margin-bottom: 20px;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-900);
}

.cookie-summary-card,
.cookie-panel {
  padding: 24px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  box-shadow: 0 1px 3px rgba(26, 31, 42, 0.06);
}

.cookie-summary-card h2,
.cookie-panel h2,
.cookie-main h2 {
  margin: 0 0 10px;
  color: var(--ink-900);
  font-weight: 700;
}

.cookie-summary-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.cookie-summary-card li,
.cookie-main p,
.cookie-main li,
.cookie-panel p {
  color: var(--ink-700);
}

.cookie-main {
  display: grid;
  gap: 16px;
}

.cookie-main > * {
  margin-block-start: 0;
}

.cookie-main h2 {
  margin-top: 18px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.08;
}

.cookie-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
}

.cookie-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.cookie-table th,
.cookie-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-300);
  color: var(--ink-700);
  text-align: left;
  vertical-align: top;
}

.cookie-table th {
  color: var(--ink-900);
  background: var(--brand-primary-100);
  font-weight: 700;
}

.cookie-table tr:last-child td {
  border-bottom: 0;
}

.cookie-table code {
  display: inline-block;
  padding: 2px 6px;
  color: var(--brand-primary-700);
  background: var(--brand-primary-100);
}

.cookie-side {
  display: grid;
  gap: 16px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero { padding-top: 56px; padding-bottom: 80px; }

  .hero-media {
    inset: 48% 0 0;
    opacity: 0.85;
  }

  .hero-media::before {
    background: linear-gradient(180deg, var(--brand-primary-100) 0%, rgba(221, 233, 244, 0.66) 38%, rgba(221, 233, 244, 0.12) 100%);
  }

  .hero-content { width: 100%; }

  .proof,
  .outcomes,
  .feature-grid,
  .steps,
  .section-head,
  .split,
  .feature-hero-grid,
  .feature-video-grid,
  .rk-feature-detail-grid,
  .about-hero-grid,
  .about-content-grid,
  .about-value-grid,
  .feature-faq-grid,
  .install-hero-grid,
  .install-body-grid,
  .install-check-grid,
  .cookie-hero-grid,
  .cookie-content-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .step,
  .outcome {
    min-height: 0;
  }

  .outcome {
    border-right: 0;
    border-bottom: 1px solid var(--ink-300);
  }

  .outcome:last-child { border-bottom: 0; }

  .contact-panel { position: static; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 28px, 1180px); }

  .hero {
    min-height: auto;
    padding-bottom: 260px;
  }

  .hero-media {
    inset: auto 0 0;
    height: 280px;
  }

  .hero h1,
  .rk-heading-xl { font-size: 40px; }

  .rk-section { padding: 64px 0; }

  .form-row { grid-template-columns: 1fr; }

  .footer-line { flex-direction: column; }

  .rk-feature-facts { grid-template-columns: 1fr; }

  .rk-feature-facts > * { min-height: 0; }

  .feature-hero { padding: 56px 0 36px; }
  .about-hero { padding: 64px 0; }
  .install-hero { padding: 64px 0 36px; }
  .cookie-hero { padding: 64px 0 36px; }

  .install-meta-grid { grid-template-columns: 1fr; }

  .install-step { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* ---------- Block editor margin reset (keep) ---------- */

.wp-site-blocks .proof > *,
.wp-site-blocks .outcomes > *,
.wp-site-blocks .feature-grid > *,
.wp-site-blocks .steps > *,
.wp-site-blocks .rk-feature-detail-grid > *,
.wp-site-blocks .about-value-grid > *,
.wp-site-blocks .feature-faq-grid > *,
.wp-site-blocks .install-meta-grid > *,
.wp-site-blocks .install-check-grid > *,
.editor-styles-wrapper .proof > *,
.editor-styles-wrapper .outcomes > *,
.editor-styles-wrapper .feature-grid > *,
.editor-styles-wrapper .steps > *,
.editor-styles-wrapper .rk-feature-detail-grid > *,
.editor-styles-wrapper .about-value-grid > *,
.editor-styles-wrapper .feature-faq-grid > *,
.editor-styles-wrapper .install-meta-grid > *,
.editor-styles-wrapper .install-check-grid > * {
  margin-block-start: 0 !important;
}
