/* ===========================================================================
   RhineCrest Piping — Shared Enhancement Layer
   Loaded after main.css/responsive.css + tokens.css. Restyles the legacy
   shell (header, buttons, footer) and adds new components. Theme-agnostic:
   every colour/font references a token so variant files retheme it for free.
   =========================================================================== */

/* ----------------------------------------------------------------- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* clip (not hidden) kills horizontal overflow without breaking position:sticky.
     This is what makes the page fit the screen on every device — the off-canvas
     mobile drawer and any stray wide element can no longer widen the viewport. */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;   /* stop iOS/Android auto-inflating text -> "zoomed" look */
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16.5px;
  line-height: 1.7;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  transition: background .3s var(--ease), color .3s var(--ease);
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  color: var(--c-heading);
  letter-spacing: var(--display-spacing);
  line-height: 1.12;
  font-weight: var(--display-weight);
}

::selection { background: var(--c-primary); color: var(--c-on-primary); }

a { transition: color .25s var(--ease), opacity .25s var(--ease); }

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

img { max-width: 100%; height: auto; }

/* anti-spam honeypot — hidden from humans, visible to bots */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.rc-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.rc-section { padding: var(--section-pad) 0; position: relative; }
.rc-bg-surface { background: var(--c-surface); }
.rc-bg-dark { background: var(--c-dark); color: var(--c-on-dark); }
.rc-bg-dark h1,.rc-bg-dark h2,.rc-bg-dark h3,.rc-bg-dark h4 { color: var(--c-heading-dark); }

/* --------------------------------------------------------------- eyebrow --- */
.rc-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 18px;
}
.rc-eyebrow::before {
  content: ""; width: 28px; height: 2px; background: var(--c-primary); display: inline-block;
}
.rc-shead { max-width: 720px; }
.rc-shead.is-center { margin-inline: auto; text-align: center; }
.rc-shead.is-center .rc-eyebrow::before { display: none; }
.rc-shead h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  margin: 0 0 16px;
  text-transform: var(--display-transform);
}
.rc-shead p { color: var(--c-muted); font-size: 17px; margin: 0; }

/* --------------------------------------------------------------- buttons --- */
.rc-btn, a.rc-btn, button.rc-btn {
  --b: var(--c-primary);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  letter-spacing: .01em;
  padding: 15px 30px; border-radius: var(--r-pill); border: 1.5px solid var(--b);
  background: var(--b); color: var(--c-on-primary); cursor: pointer;
  text-decoration: none; line-height: 1; position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
  box-shadow: var(--shadow-primary);
}
.rc-btn i { transition: transform .3s var(--ease); }
.rc-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.rc-btn:hover i { transform: translateX(4px); }
.rc-btn:active { transform: translateY(0); }
.rc-btn--ghost {
  background: transparent; color: var(--c-heading); border-color: var(--c-border);
  box-shadow: none;
}
.rc-bg-dark .rc-btn--ghost, .rc-hero .rc-btn--ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.rc-btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary); box-shadow: none; }
.rc-bg-dark .rc-btn--ghost:hover, .rc-hero .rc-btn--ghost:hover { background: rgba(255,255,255,.08); color:#fff; border-color:#fff; }

/* legacy buttons re-skinned */
.default-btn, a.default-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--c-primary); color: var(--c-on-primary);
  font-family: var(--font-body); font-weight: 600; text-transform: none;
  letter-spacing: .01em; font-size: 15px; line-height: 1;
  padding: 15px 28px; border-radius: var(--r-pill); border: none;
  box-shadow: var(--shadow-primary);
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.default-btn:hover { background: var(--c-primary-600); color:#fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.read-more {
  font-weight: 600; color: var(--c-primary); display: inline-flex; align-items: center; gap: 7px;
  position: relative;
}
.read-more::after { content: "\2192"; transition: transform .3s var(--ease); }
.read-more:hover { color: var(--c-primary-600); }
.read-more:hover::after { transform: translateX(5px); }

/* --------------------------------------------------------------- reveals --- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

/* ---------------------------------------------------------------- topbar --- */
.rc-topbar {
  background: var(--c-dark); color: var(--c-on-dark);
  font-size: 13.5px; border-bottom: 1px solid var(--c-border-dark);
}
.rc-topbar .rc-container { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.rc-topbar a { color: var(--c-on-dark); text-decoration: none; }
.rc-topbar a:hover { color: #fff; }
.rc-topbar-left span, .rc-topbar-right a { display: inline-flex; align-items: center; gap: 7px; }
.rc-topbar-left { display: flex; gap: 26px; }
.rc-topbar-left i, .rc-topbar-right i { color: var(--c-primary); }
.rc-topbar-right { display: flex; gap: 16px; align-items: center; }
.rc-topbar-right .rc-soc { display: inline-flex; gap: 12px; }
@media (max-width: 767px){ .rc-topbar { display: none; } }

/* ---------------------------------------------------------------- header --- */
.header { position: sticky; top: 0; z-index: 200; background: var(--c-bg); transition: box-shadow .3s, padding .3s, background .3s; }
.header .primary-header { background: transparent; }
.header .primary-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; transition: min-height .3s; }
.header.is-scrolled { box-shadow: 0 8px 30px rgba(16,24,40,.08); }
.header.is-scrolled .primary-header-inner { min-height: 68px; }
.header-logo img { max-height: 46px; width: auto; transition: max-height .3s; }
.header.is-scrolled .header-logo img { max-height: 40px; }

/* brand logo (inline SVG mark + live wordmark — crisp, theme-aware) */
.rc-logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.rc-logo__mark { width: 44px; height: 44px; flex: none; display: block; transition: width .3s, height .3s; }
.header.is-scrolled .rc-logo__mark { width: 38px; height: 38px; }
.rc-logo__wm { display: flex; flex-direction: column; line-height: 1; }
.rc-logo__name {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  letter-spacing: -.02em; color: var(--c-heading);
}
.rc-logo__name b { color: var(--c-primary); font-weight: 800; }
.rc-logo__sub {
  font-family: var(--font-mono); font-weight: 600; font-size: 9px;
  letter-spacing: .26em; text-transform: uppercase; color: var(--c-muted); margin-top: 4px;
}
.rc-logo--invert .rc-logo__name { color: #fff; }
.rc-logo--invert .rc-logo__sub  { color: var(--c-on-dark); }
@media (max-width: 420px) { .rc-logo__name { font-size: 19px; } .rc-logo__sub { letter-spacing: .2em; } }

.dl-menu { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; align-items: center; }
.dl-menu > li { position: relative; }
.dl-menu > li > a {
  font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--c-heading);
  text-decoration: none; padding: 12px 16px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--r-sm);
}
.dl-menu > li:has(ul) > a::after { content: "\25be"; font-size: 10px; opacity: .5; }
.dl-menu > li > a:hover, .dl-menu > li.is-active > a { color: var(--c-primary); }
/* dropdowns */
.dl-menu ul {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px;
  background: var(--c-bg); list-style: none; margin: 0; padding: 10px;
  border: 1px solid var(--c-border); border-radius: var(--r); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  z-index: 50;
}
.dl-menu > li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.dl-menu ul li a {
  display: block; padding: 11px 14px; border-radius: var(--r-sm);
  font-size: 14.5px; font-weight: 500; color: var(--c-text); text-decoration: none;
  transition: background .2s, color .2s, padding-left .2s;
}
.dl-menu ul li a:hover { background: var(--c-primary-100); color: var(--c-primary); padding-left: 20px; }

.header-cta { display: inline-flex; align-items: center; gap: 18px; }
.burger-menu { display: none; }

/* mobile nav */
@media (max-width: 991px) {
  .header-menu-wrap {
    position: fixed; inset: 0 0 0 auto; width: min(360px, 86vw); background: var(--c-bg);
    transform: translateX(100%); transition: transform .4s var(--ease-out);
    box-shadow: var(--shadow-lg); z-index: 300; padding: 90px 26px 30px; overflow-y: auto;
  }
  body.nav-open .header-menu-wrap { transform: translateX(0); }
  /* The drawer lives inside .header (position:sticky; z-index:200), which traps it
     in the header's stacking context. Lift the whole header above the .5 overlay
     while the nav is open so the drawer paints on top and stays tappable. */
  body.nav-open .header { z-index: 400; }
  body.nav-open::after { content:""; position: fixed; inset: 0; background: rgba(8,12,18,.5); z-index: 250; }
  body.nav-open { overflow: hidden; }
  .dl-menu { flex-direction: column; align-items: stretch; gap: 2px; }
  .dl-menu > li > a { padding: 14px 12px; font-size: 17px; border-bottom: 1px solid var(--c-border); border-radius: 0; }
  .dl-menu ul {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: none; padding: 4px 0 8px 12px; min-width: 0; display: block;
  }
  .dl-menu > li:has(ul) > a::after { margin-left: auto; }
  .burger-menu { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; z-index: 320; position: relative; }
  .burger-menu .line-menu { width: 26px; height: 2px; background: var(--c-heading); border-radius: 2px; transition: transform .3s, opacity .3s; }
  .burger-menu .line-half { width: 16px; }
  body.nav-open .burger-menu .first-line { transform: translateY(7px) rotate(45deg); width: 26px; }
  body.nav-open .burger-menu .line-menu:nth-child(2) { opacity: 0; }
  body.nav-open .burger-menu .last-line { transform: translateY(-7px) rotate(-45deg); width: 26px; margin-left: 0; }
  .header-cta .rc-btn { display: none; }
}

/* ------------------------------------------------------------------ hero --- */
.rc-hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  color: #fff; overflow: hidden; background: var(--c-dark);
}
.rc-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.06); animation: heroZoom 16s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.rc-hero__overlay { position: absolute; inset: 0; background: var(--hero-overlay); }
.rc-hero__grid { position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 70%); }
.rc-hero .rc-container { position: relative; z-index: 3; padding-top: 70px; padding-bottom: 70px; }
.rc-hero__inner { max-width: 760px; }
.rc-hero .rc-eyebrow { color: var(--c-accent); }
.rc-hero .rc-eyebrow::before { background: var(--c-accent); }
.rc-hero h1 {
  color: #fff; font-size: clamp(38px, 5.8vw, 74px); line-height: 1.04; margin: 0 0 22px;
  text-transform: var(--display-transform); letter-spacing: var(--display-spacing);
}
.rc-hero h1 .hl { color: var(--c-primary); }
.rc-hero p.lead { font-size: clamp(17px, 2vw, 20px); color: rgba(255,255,255,.84); max-width: 600px; margin: 0 0 34px; }
.rc-hero__btns { display: flex; flex-wrap: wrap; gap: 16px; }
.rc-hero__meta { margin-top: 46px; display: flex; flex-wrap: wrap; gap: 30px 46px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.14); }
.rc-hero__meta div { line-height: 1.2; }
.rc-hero__meta b { display: block; font-family: var(--font-display); font-size: 30px; color: #fff; }
.rc-hero__meta span { font-size: 13.5px; color: rgba(255,255,255,.7); }
.rc-hero__scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rc-hero__scroll::after { content:""; width: 1px; height: 38px; background: linear-gradient(rgba(255,255,255,.7), transparent); animation: scrollLine 1.8s var(--ease) infinite; }
@keyframes scrollLine { 0%{transform: scaleY(0); transform-origin: top;} 50%{transform: scaleY(1); transform-origin: top;} 51%{transform-origin: bottom;} 100%{transform: scaleY(0); transform-origin: bottom;} }
@media (max-width: 767px){ .rc-hero { min-height: 80vh; } .rc-hero__scroll{ display:none; } }

/* ----------------------------------------------------------------- stats --- */
.rc-stats { background: var(--c-primary); position: relative; z-index: 4; }
.rc-stats .rc-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.rc-stat { padding: 46px 28px; text-align: center; color: var(--c-on-primary); position: relative; }
.rc-stat + .rc-stat::before { content:""; position: absolute; left: 0; top: 24%; height: 52%; width: 1px; background: rgba(255,255,255,.22); }
.rc-stat b { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 4vw, 50px); line-height: 1; }
.rc-stat span { display: block; margin-top: 10px; font-size: 14.5px; opacity: .9; }
@media (max-width: 767px){ .rc-stats .rc-container { grid-template-columns: 1fr 1fr; } .rc-stat:nth-child(2)::before{display:none;} .rc-stat:nth-child(3)::before{display:none;} }

/* ----------------------------------------------------------------- about --- */
.rc-about .rc-container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.rc-about__media { position: relative; }
.rc-about__media img { border-radius: var(--r-lg); width: 100%; box-shadow: var(--shadow-lg); display: block; }
.rc-about__badge {
  position: absolute; right: -18px; bottom: -18px; background: var(--c-dark); color: #fff;
  border-radius: var(--r); padding: 20px 24px; box-shadow: var(--shadow-lg); text-align: center;
}
.rc-about__badge b { font-family: var(--font-display); font-size: 36px; color: var(--c-primary); display: block; line-height: 1; }
.rc-about__badge span { font-size: 13px; color: rgba(255,255,255,.8); }
.rc-about h2 { font-size: clamp(26px, 3vw, 38px); margin: 8px 0 18px; }
.rc-about p { margin: 0 0 16px; }
.rc-fey { list-style: none; margin: 22px 0 30px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.rc-fey li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--c-heading); }
.rc-fey li i { color: var(--c-primary); margin-top: 3px; }
@media (max-width: 900px){ .rc-about .rc-container { grid-template-columns: 1fr; gap: 44px; } .rc-fey { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- services --- */
.rc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.rc-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 991px){ .rc-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px){ .rc-grid-3, .rc-grid-2 { grid-template-columns: 1fr; } }

.rc-card {
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  padding: 38px 32px; position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.rc-card::before {
  content:""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--grad-primary); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.rc-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.rc-card:hover::before { transform: scaleX(1); }
.rc-card__icon {
  width: 64px; height: 64px; border-radius: var(--r); display: grid; place-items: center;
  background: var(--c-primary-100); color: var(--c-primary); font-size: 30px; margin-bottom: 22px;
  transition: background .4s var(--ease), color .4s var(--ease), transform .4s var(--ease);
}
.rc-card:hover .rc-card__icon { background: var(--c-primary); color: var(--c-on-primary); transform: rotate(-6deg) scale(1.05); }
.rc-card h3 { font-size: 21px; margin: 0 0 12px; }
.rc-card p { margin: 0 0 18px; color: var(--c-muted); font-size: 15.5px; }
.rc-card__num { position: absolute; right: 22px; top: 18px; font-family: var(--font-display); font-weight: 800; font-size: 46px; color: var(--c-surface-2); line-height: 1; z-index: 0; }
.rc-card > * { position: relative; z-index: 1; }

/* ----------------------------------------------------------------- certs --- */
.rc-certs { border-block: 1px solid var(--c-border); background: var(--c-surface); }
.rc-certs .rc-container { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; justify-content: space-between; padding-block: 30px; }
.rc-certs__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--c-muted); max-width: 150px; }
.rc-certs__list { display: flex; flex-wrap: wrap; gap: 14px; }
.rc-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px;
  border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--c-bg);
  font-weight: 600; font-size: 14px; color: var(--c-heading);
  transition: border-color .3s, color .3s, transform .3s;
}
.rc-chip i { color: var(--c-primary); }
.rc-chip:hover { border-color: var(--c-primary); color: var(--c-primary); transform: translateY(-2px); }

/* --------------------------------------------------------------- process --- */
.rc-process { counter-reset: step; }
.rc-process__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-top: 50px; }
.rc-step { position: relative; padding-top: 18px; }
.rc-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--c-primary);
  display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  border: 1.5px solid var(--c-border); background: var(--c-bg); margin-bottom: 20px;
  transition: background .3s, color .3s, border-color .3s;
}
.rc-step:hover::before { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }
.rc-step::after { content:""; position: absolute; left: 54px; top: 45px; right: -14px; height: 1.5px; background: repeating-linear-gradient(90deg, var(--c-border) 0 8px, transparent 8px 16px); }
.rc-step:last-child::after { display: none; }
.rc-step h3 { font-size: 18px; margin: 0 0 8px; }
.rc-step p { font-size: 14.5px; color: var(--c-muted); margin: 0; }
@media (max-width: 991px){ .rc-process__grid { grid-template-columns: 1fr 1fr; } .rc-step::after{ display: none; } }
@media (max-width: 560px){ .rc-process__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ industries --- */
.rc-ind { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rc-ind__item {
  display: flex; align-items: center; gap: 16px; padding: 22px 24px;
  border: 1px solid var(--c-border-dark); border-radius: var(--r); background: rgba(255,255,255,.03);
  transition: background .3s, transform .3s, border-color .3s;
}
.rc-bg-dark .rc-ind__item:hover { background: rgba(255,255,255,.07); transform: translateX(6px); border-color: var(--c-primary); }
.rc-ind__item i { font-size: 26px; color: var(--c-primary); }
.rc-ind__item b { font-family: var(--font-display); font-size: 17px; color: var(--c-heading-dark); display: block; }
.rc-ind__item span { font-size: 13.5px; color: var(--c-on-dark); }
@media (max-width: 860px){ .rc-ind { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .rc-ind { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- projects --- */
.rc-proj { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.rc-proj__item { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/3.4; }
.rc-proj__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.rc-proj__item:hover img { transform: scale(1.08); }
.rc-proj__item::after { content:""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(10,13,18,.86)); }
.rc-proj__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; z-index: 2; transform: translateY(8px); transition: transform .4s var(--ease); }
.rc-proj__item:hover .rc-proj__cap { transform: translateY(0); }
.rc-proj__cap .tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 8px; }
.rc-proj__cap h3 { color: #fff; font-size: 19px; margin: 0; }
.rc-proj__cap .loc { color: rgba(255,255,255,.72); font-size: 13.5px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
@media (max-width: 991px){ .rc-proj { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .rc-proj { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------- cta --- */
.rc-cta { position: relative; overflow: hidden; background: var(--c-dark); color: #fff; text-align: center; }
.rc-cta__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .18; }
.rc-cta .rc-container { position: relative; z-index: 2; }
.rc-cta h2 { color: #fff; font-size: clamp(28px, 4vw, 46px); margin: 0 0 16px; text-transform: var(--display-transform); }
.rc-cta p { color: rgba(255,255,255,.8); max-width: 620px; margin: 0 auto 32px; font-size: 17px; }
.rc-cta__btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------- testi ----- */
.rc-testi__card {
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  padding: 34px 32px; position: relative; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.rc-testi__card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.rc-testi__stars { color: var(--c-accent); margin-bottom: 14px; letter-spacing: 2px; }
.rc-testi__card p { font-size: 16px; color: var(--c-heading); margin: 0 0 22px; }
.rc-testi__by { display: flex; align-items: center; gap: 14px; }
.rc-testi__by img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.rc-testi__by b { display: block; font-family: var(--font-display); color: var(--c-heading); }
.rc-testi__by span { font-size: 13.5px; color: var(--c-muted); }
.rc-testi__quote { position: absolute; right: 26px; top: 22px; font-size: 46px; color: var(--c-primary-100); font-family: Georgia, serif; line-height: 1; }

/* ------------------------------------------------------------------- faq --- */
.rc-faq { max-width: 820px; margin: 0 auto; }
.rc-faq__item { border: 1px solid var(--c-border); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; background: var(--c-bg); }
.rc-faq__q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 20px 24px; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--c-heading); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.rc-faq__q::after { content: "+"; font-size: 24px; color: var(--c-primary); transition: transform .3s; flex-shrink: 0; }
.rc-faq__item.is-open .rc-faq__q::after { transform: rotate(45deg); }
.rc-faq__a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.rc-faq__a p { padding: 0 24px 22px; margin: 0; color: var(--c-muted); }

/* ---------------------------------------------------------------- footer --- */
.widget-section { background: var(--c-dark); color: var(--c-on-dark); border-top: 3px solid var(--c-primary); }
.widget-section h4 { color: #fff; font-size: 17px; margin-bottom: 22px; position: relative; padding-bottom: 12px; }
.widget-section h4::after { content:""; position: absolute; left: 0; bottom: 0; width: 32px; height: 2px; background: var(--c-primary); }
.widget-content > a img { max-height: 44px; margin-bottom: 18px; }
.widget-content p { color: var(--c-on-dark); font-size: 14.5px; }
.widget-links { list-style: none; padding: 0; margin: 0; }
.widget-links li { margin-bottom: 11px; }
.widget-links a { color: var(--c-on-dark); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: color .25s, padding-left .25s; }
.widget-links a::before { content: "\203A"; color: var(--c-primary); }
.widget-links a:hover { color: #fff; padding-left: 5px; }
.widget-content span { display: block; color: var(--c-on-dark); margin-bottom: 6px; }
.subscribe-form { display: flex; gap: 8px; margin-top: 8px; }
.subscribe-form .form-input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid var(--c-border-dark); color: #fff; border-radius: var(--r-sm); padding: 13px 15px; font-family: var(--font-body); }
.subscribe-form .form-input::placeholder { color: rgba(255,255,255,.5); }
.subscribe-form .form-input:focus { outline: none; border-color: var(--c-primary); }
.subscribe-form .submit-btn { background: var(--c-primary); color: #fff; border: none; border-radius: var(--r-sm); padding: 0 20px; font-weight: 600; cursor: pointer; transition: background .3s; }
.subscribe-form .submit-btn:hover { background: var(--c-primary-600); }
.subscribe-form .submit-btn:disabled { opacity: .7; cursor: default; }
.subscribe-status { margin: 9px 0 0; font-size: 13px; min-height: 1em; }
.subscribe-status.is-ok { color: #7ee0a6; }
.subscribe-status.is-error { color: #ff9b8a; }
.footer-section { background: var(--c-dark-2); color: var(--c-on-dark); padding: 26px 0; text-align: center; border-top: 1px solid var(--c-border-dark); }
.footer-section p { margin: 0; font-size: 14px; }

/* ----------------------------------------------------------- scroll-top --- */
#scroll-to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 120; width: 48px; height: 48px;
  border-radius: 50%; background: var(--c-primary); color: #fff; display: grid; place-items: center;
  text-decoration: none; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s, visibility .3s, transform .3s, background .3s;
}
#scroll-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
#scroll-to-top:hover { background: var(--c-primary-600); transform: translateY(-3px); }

/* ----------------------------------------------------------- preloader ---- */
.site-preloader-wrap { background: var(--c-bg); }

/* ===========================================================================
   INTERIOR PAGE COMPONENTS (about, services, projects, blog, contact, 404)
   =========================================================================== */

/* ---- page hero / breadcrumb ------------------------------------ */
.rc-pagehero { position: relative; padding: 132px 0 104px; color: #fff; overflow: hidden; background: var(--c-dark); }
.rc-pagehero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.04); }
.rc-pagehero__overlay { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(10,13,18,.92), rgba(10,13,18,.6)); }
.rc-pagehero__grid { position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%); }
.rc-pagehero .rc-container { position: relative; z-index: 2; }
.rc-pagehero h1 { color: #fff; font-size: clamp(34px, 5vw, 58px); margin: 0 0 14px; text-transform: var(--display-transform); }
.rc-pagehero p { color: rgba(255,255,255,.82); font-size: 18px; max-width: 620px; margin: 0; }
.rc-breadcrumb { display: flex; gap: 10px; align-items: center; font-size: 14px; font-family: var(--font-mono); letter-spacing: .04em; margin-bottom: 22px; color: rgba(255,255,255,.6); text-transform: uppercase; }
.rc-breadcrumb a { color: var(--c-accent); text-decoration: none; }
.rc-breadcrumb a:hover { color: #fff; }
.rc-breadcrumb span.sep { opacity: .5; }

/* ---- prose / rich text ----------------------------------------- */
.rc-prose > * { margin: 0 0 18px; }
.rc-prose h2 { font-size: clamp(24px, 2.6vw, 34px); margin: 36px 0 16px; }
.rc-prose h3 { font-size: 21px; margin: 28px 0 12px; }
.rc-prose p { color: var(--c-text); }
.rc-prose strong { color: var(--c-heading); }
.rc-prose ul { padding-left: 0; list-style: none; margin: 0 0 22px; }
.rc-prose ul li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--c-text); }
.rc-prose ul li::before { content: "\f058"; font-family: "Font Awesome 5 Free"; font-weight: 900; color: var(--c-primary); position: absolute; left: 0; top: 1px; }

/* ---- split media + text ---------------------------------------- */
.rc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.rc-split.is-narrow-media { grid-template-columns: .9fr 1.1fr; }
.rc-split__media img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: block; }
.rc-split--reverse .rc-split__media { order: 2; }
@media (max-width: 900px){ .rc-split, .rc-split.is-narrow-media { grid-template-columns: 1fr; gap: 40px; } .rc-split--reverse .rc-split__media { order: 0; } }

/* ---- framed media w/ accent corner ----------------------------- */
.rc-framed { position: relative; }
.rc-framed::before { content: ""; position: absolute; inset: -14px -14px auto auto; width: 90px; height: 90px; border-top: 3px solid var(--c-primary); border-right: 3px solid var(--c-primary); border-radius: 0 var(--r-lg) 0 0; z-index: 0; }
.rc-framed img { position: relative; z-index: 1; }

/* ---- spec table ------------------------------------------------ */
.rc-spec { width: 100%; border-collapse: collapse; border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; }
.rc-spec th, .rc-spec td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--c-border); font-size: 15px; }
.rc-spec tr:last-child th, .rc-spec tr:last-child td { border-bottom: none; }
.rc-spec th { font-family: var(--font-display); font-weight: 600; color: var(--c-heading); width: 40%; background: var(--c-surface); }
.rc-spec td { color: var(--c-text); }

/* ---- info / value cards (reuse rc-card grid) ------------------- */
.rc-mini { display: flex; gap: 16px; align-items: flex-start; padding: 26px; border: 1px solid var(--c-border); border-radius: var(--r-lg); background: var(--c-bg); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.rc-mini:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.rc-mini__icon { flex-shrink: 0; width: 52px; height: 52px; border-radius: var(--r); background: var(--c-primary-100); color: var(--c-primary); display: grid; place-items: center; font-size: 24px; }
.rc-mini h3 { font-size: 18px; margin: 0 0 8px; }
.rc-mini p { margin: 0; font-size: 14.5px; color: var(--c-muted); }

/* ---- team cards ------------------------------------------------ */
.rc-team__card { text-align: center; }
.rc-team__photo { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/4.4; margin-bottom: 18px; }
.rc-team__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.rc-team__card:hover .rc-team__photo img { transform: scale(1.06); }
.rc-team__card h3 { font-size: 19px; margin: 0 0 4px; }
.rc-team__card span { color: var(--c-primary); font-size: 14px; font-weight: 600; }

/* ---- vertical timeline (CEO career) ---------------------------- */
.rc-timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 38px; }
.rc-timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--c-border); }
.rc-tl { position: relative; padding-bottom: 36px; }
.rc-tl:last-child { padding-bottom: 0; }
.rc-tl::before { content: ""; position: absolute; left: -34px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--c-bg); border: 3px solid var(--c-primary); }
.rc-tl .yr { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--c-primary); letter-spacing: .06em; }
.rc-tl h3 { font-size: 19px; margin: 6px 0 8px; }
.rc-tl p { margin: 0; color: var(--c-muted); font-size: 15px; }

/* ---- pull quote ------------------------------------------------ */
.rc-pullquote { border-left: 4px solid var(--c-primary); padding: 8px 0 8px 28px; margin: 30px 0; }
.rc-pullquote p { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 27px); line-height: 1.4; color: var(--c-heading); font-weight: 500; font-style: italic; margin: 0 0 12px; }
.rc-pullquote cite { font-style: normal; font-size: 14.5px; color: var(--c-muted); }
.rc-pullquote cite b { color: var(--c-primary); font-weight: 600; }

/* ---- contact form / fields ------------------------------------- */
.rc-field { margin-bottom: 18px; }
.rc-field label { display: block; font-weight: 600; font-size: 14px; color: var(--c-heading); margin-bottom: 8px; }
.rc-input, .rc-textarea, .rc-select {
  width: 100%; font-family: var(--font-body); font-size: 15.5px; color: var(--c-heading);
  background: var(--c-bg); border: 1.5px solid var(--c-border); border-radius: var(--r);
  padding: 14px 16px; transition: border-color .25s, box-shadow .25s;
}
.rc-textarea { min-height: 150px; resize: vertical; }
.rc-input:focus, .rc-textarea:focus, .rc-select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-100); }
.rc-field.has-error .rc-input, .rc-field.has-error .rc-textarea { border-color: #e23b3b; }
.rc-field .err { display: none; color: #e23b3b; font-size: 13px; margin-top: 6px; }
.rc-field.has-error .err { display: block; }
.rc-form__note { padding: 16px 18px; border-radius: var(--r); background: var(--c-primary-100); color: var(--c-primary-600); font-weight: 600; font-size: 14.5px; display: none; }
.rc-form__note.is-on { display: block; }
.rc-form__note.is-error { background: #fdecea; color: #b3261e; }
.rc-contactinfo { display: grid; gap: 14px; }
.rc-contactinfo .rc-mini { background: var(--c-surface); }

/* ---- blog list + sidebar --------------------------------------- */
.rc-blog { display: grid; grid-template-columns: 1fr 340px; gap: 50px; align-items: start; }
@media (max-width: 980px){ .rc-blog { grid-template-columns: 1fr; } }
.rc-postcard { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: center; border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 26px; background: var(--c-bg); transition: box-shadow .35s, transform .35s; }
.rc-postcard:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.rc-postcard__thumb { position: relative; align-self: stretch; min-height: 180px; overflow: hidden; }
.rc-postcard__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.rc-postcard:hover .rc-postcard__thumb img { transform: scale(1.06); }
.rc-postcard__body { padding: 24px 26px 24px 0; }
.rc-postcard__meta { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--c-primary); margin-bottom: 10px; }
.rc-postcard h3 { font-size: 20px; margin: 0 0 10px; line-height: 1.25; }
.rc-postcard h3 a { color: var(--c-heading); text-decoration: none; }
.rc-postcard h3 a:hover { color: var(--c-primary); }
.rc-postcard p { margin: 0 0 14px; color: var(--c-muted); font-size: 15px; }
@media (max-width: 560px){ .rc-postcard { grid-template-columns: 1fr; } .rc-postcard__thumb { min-height: 200px; } .rc-postcard__body { padding: 0 24px 24px; } }
.rc-widget { border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 26px; margin-bottom: 24px; background: var(--c-bg); }
.rc-widget h4 { font-size: 17px; margin: 0 0 18px; position: relative; padding-bottom: 12px; }
.rc-widget h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: var(--c-primary); }
.rc-searchbox { display: flex; }
.rc-searchbox input { flex: 1; border: 1.5px solid var(--c-border); border-right: none; border-radius: var(--r) 0 0 var(--r); padding: 12px 14px; font-family: var(--font-body); }
.rc-searchbox button { border: none; background: var(--c-primary); color: #fff; padding: 0 16px; border-radius: 0 var(--r) var(--r) 0; cursor: pointer; }
.rc-catlist { list-style: none; margin: 0; padding: 0; }
.rc-catlist li { margin-bottom: 4px; }
.rc-catlist a { display: flex; justify-content: space-between; padding: 10px 0; color: var(--c-text); text-decoration: none; border-bottom: 1px solid var(--c-border); transition: color .2s, padding-left .2s; }
.rc-catlist a:hover { color: var(--c-primary); padding-left: 6px; }
.rc-catlist a span { color: var(--c-muted); }
.rc-recent { display: flex; gap: 14px; margin-bottom: 16px; align-items: center; }
.rc-recent img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); }
.rc-recent a { color: var(--c-heading); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.rc-recent a:hover { color: var(--c-primary); }
.rc-recent small { display: block; color: var(--c-muted); font-weight: 400; margin-top: 4px; }

/* ---- projects filter + grid ------------------------------------ */
.rc-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 44px; }
.rc-filter button { font-family: var(--font-body); font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: var(--r-pill); border: 1.5px solid var(--c-border); background: var(--c-bg); color: var(--c-text); cursor: pointer; transition: all .25s; }
.rc-filter button:hover { border-color: var(--c-primary); color: var(--c-primary); }
.rc-filter button.is-active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.rc-proj__item.is-hidden { display: none; }
.rc-proj__zoom { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.16); backdrop-filter: blur(4px); display: grid; place-items: center; color: #fff; opacity: 0; transform: scale(.8); transition: opacity .3s, transform .3s; z-index: 3; }
.rc-proj__item:hover .rc-proj__zoom { opacity: 1; transform: scale(1); }

/* ---- lightbox -------------------------------------------------- */
.rc-lb { position: fixed; inset: 0; background: rgba(8,10,14,.92); display: none; align-items: center; justify-content: center; z-index: 999; padding: 30px; }
.rc-lb.is-open { display: flex; }
.rc-lb img { max-width: 92vw; max-height: 88vh; border-radius: var(--r); box-shadow: var(--shadow-lg); }
.rc-lb__close { position: absolute; top: 22px; right: 26px; color: #fff; font-size: 32px; cursor: pointer; line-height: 1; background: none; border: none; }

/* ---- 404 ------------------------------------------------------- */
.rc-404 { text-align: center; padding: var(--section-pad) 0; }
.rc-404 .big { font-family: var(--font-display); font-weight: 800; font-size: clamp(110px, 22vw, 240px); line-height: .9; color: var(--c-heading); letter-spacing: -.04em; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rc-404 h2 { font-size: clamp(24px, 3vw, 36px); margin: 10px 0 14px; }
.rc-404 p { color: var(--c-muted); max-width: 480px; margin: 0 auto 28px; font-size: 17px; }

/* ---- map ------------------------------------------------------- */
.rc-map { width: 100%; height: 420px; border: 0; filter: grayscale(.2) contrast(1.05); display: block; }

/* ---- section intro spacing helper ------------------------------ */
.mt-50 { margin-top: 50px; } .mt-40 { margin-top: 40px; } .mt-30 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; }

/* ===========================================================================
   DARK MODE
   Activated by data-theme="dark" on <html> (set by the no-flash bootstrap
   script in each page's <head> and toggled by the header button). The site
   defaults to LIGHT — dark only applies when the attribute is present.
   =========================================================================== */
html[data-theme="dark"] {
  --c-bg:            #0f141b;
  --c-surface:       #161d27;
  --c-surface-2:     #1d2733;
  --c-dark:          #0b0f15;   /* keep dark sections a touch deeper than page bg */
  --c-dark-2:        #11161e;

  --c-text:          #b7c2ce;
  --c-muted:         #7f8c9a;
  --c-heading:       #f3f6f9;
  --c-on-dark:       #c8d2dd;
  --c-heading-dark:  #ffffff;

  --c-primary-100:   rgba(239, 91, 37, .16);

  --c-border:        #28323e;
  --c-border-dark:   rgba(255,255,255,.10);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.45);
  --shadow:    0 6px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.60);
  --hero-overlay: linear-gradient(110deg, rgba(5,8,12,.94) 0%, rgba(5,8,12,.62) 55%, rgba(5,8,12,.38) 100%);
}
/* form fields read correctly on dark surfaces */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: var(--c-surface-2); color: var(--c-heading); border-color: var(--c-border);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--c-muted); }
/* the .rc-btn--ghost on a now-dark page should use light text */
html[data-theme="dark"] .rc-btn--ghost { color: var(--c-heading); border-color: var(--c-border); }

/* ---------------------------------------------------- theme toggle button --- */
.rc-theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--c-border); background: var(--c-surface);
  color: var(--c-heading); cursor: pointer; display: inline-grid; place-items: center;
  font-size: 16px; line-height: 1;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.rc-theme-toggle:hover { color: var(--c-primary); border-color: var(--c-primary); transform: translateY(-2px); }
.rc-theme-toggle .fa-sun  { display: none; }
.rc-theme-toggle .fa-moon { display: inline-block; }
html[data-theme="dark"] .rc-theme-toggle .fa-moon { display: none; }
html[data-theme="dark"] .rc-theme-toggle .fa-sun  { display: inline-block; }
