/* RM Engineering — main stylesheet */

:root {
  --maxw: 1400px;
  --pad: clamp(20px, 4vw, 64px);
  --r: 14px;
  --r-lg: 22px;
  --r-sm: 8px;
}

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
}

.rm-mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.rm-eyebrow { color: var(--fg-dim); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; align-self: flex-start; }
.rm-eyebrow-accent { color: var(--accent); }
.rm-eyebrow-dim { color: var(--fg-mute); }
.rm-fg-dim { color: var(--fg-dim); }
.rm-accent-text { color: var(--accent); }

/* --- Type scale --- */
.rm-h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}
.rm-h1-page { font-size: clamp(40px, 5.5vw, 80px); }
.rm-h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}
.rm-lede {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 56ch;
  text-wrap: pretty;
}
.rm-lede-wide { max-width: 72ch; }

/* --- Buttons --- */
.rm-cta-btn {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.005em;
  padding: 12px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.rm-cta-btn:hover { transform: translateY(-1px); background: var(--accent); }
.rm-cta-arrow { font-size: 1.1em; transition: transform .2s ease; }
.rm-cta-btn:hover .rm-cta-arrow { transform: translateX(3px); }
.rm-cta-lg { padding: 16px 24px; font-size: 15px; }
.rm-cta-xl { padding: 22px 32px; font-size: clamp(20px, 2vw, 28px); border-radius: 999px; font-weight: 600; }
.rm-cta-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.rm-cta-ghost:hover { border-color: var(--fg-dim); }

/* --- Nav --- */
.rm-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.rm-nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  gap: 28px;
}
.rm-logo {
  appearance: none; border: 0; background: transparent; color: var(--fg);
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--font-display); font-size: 18px; letter-spacing: -0.01em;
}
.rm-logo-mark { color: var(--accent); display: inline-flex; }
.rm-logo-txt b { font-weight: 700; }
.rm-logo-txt { font-weight: 400; }

.rm-nav-links { display: flex; gap: 4px; margin-left: auto; }
.rm-nav-link {
  appearance: none; border: 0; background: transparent; color: var(--fg-dim);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 10px 14px; border-radius: 999px; cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.rm-nav-link:hover { color: var(--fg); }
.rm-nav-link.is-active { color: var(--fg); background: var(--surface); }

.rm-nav-actions { display: flex; align-items: center; gap: 12px; }
.rm-phone-pill {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fg-dim); text-decoration: none;
  font-size: 13px; font-family: var(--font-mono);
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.rm-phone-pill:hover { color: var(--fg); border-color: var(--fg-dim); }

/* --- Mobile nav --- */
.rm-mobile-menu-btn {
  display: none;
  appearance: none; border: 0; background: transparent;
  color: var(--fg); cursor: pointer; padding: 8px;
}
@media (max-width: 880px) {
  .rm-nav-links, .rm-phone-pill { display: none; }
  .rm-nav-actions { margin-left: auto; }
  .rm-mobile-menu-btn { display: block; }
  .rm-nav-actions .rm-cta-btn { display: none; }
}
.rm-mobile-nav {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: var(--pad);
  padding-top: 80px;
}
.rm-mobile-nav-close {
  position: absolute; top: 14px; right: var(--pad);
  appearance: none; border: 0; background: transparent;
  color: var(--fg); cursor: pointer; padding: 8px;
  font-size: 24px;
}
.rm-mobile-nav-links {
  display: flex; flex-direction: column; gap: 8px;
}
.rm-mobile-nav-link {
  appearance: none; border: 0; background: transparent;
  color: var(--fg); text-align: left;
  font-family: var(--font-display); font-size: 32px; font-weight: 600;
  padding: 12px 0; cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease;
}
.rm-mobile-nav-link:hover { color: var(--accent); }
.rm-mobile-nav-contact {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.rm-mobile-nav-contact a {
  color: var(--fg-dim); text-decoration: none;
  font-family: var(--font-mono); font-size: 13px;
}

/* --- Section / page-head shared --- */
.rm-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 140px) var(--pad);
}
.rm-section-head { margin-bottom: clamp(40px, 6vw, 80px); display: flex; flex-direction: column; gap: 14px; }
.rm-page-head { padding-top: clamp(60px, 8vw, 120px); padding-bottom: clamp(40px, 6vw, 80px); }
.rm-page-head-inner { display: flex; flex-direction: column; gap: 22px; max-width: 1100px; }

/* --- Real images --- */
.rm-img {
  position: relative;
  width: 100%;
  border-radius: var(--r);
  overflow: hidden;
  display: block;
  isolation: isolate;
}
.rm-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rm-img::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 30% 20%, transparent 0%, rgba(0,0,0,.15) 60%, rgba(0,0,0,.35) 100%);
  pointer-events: none;
}

/* --- Hero · split --- */
.rm-hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(60px, 7vw, 110px) var(--pad) clamp(40px, 5vw, 80px); }
.rm-hero-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
.rm-hero-copy { display: flex; flex-direction: column; gap: 28px; }
.rm-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.rm-hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.rm-hero-stats dt { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.02em; }
.rm-hero-stats dd { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

.rm-hero-visual { position: relative; }
.rm-hero-pip {
  position: absolute; bottom: -32px; left: -32px;
  width: 38%; max-width: 220px;
  border: 6px solid var(--bg);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.rm-hero-tag {
  position: absolute; top: 20px; right: 20px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  backdrop-filter: blur(10px);
}
.rm-hero-tag-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

@media (max-width: 880px) {
  .rm-hero-split { grid-template-columns: 1fr; }
  .rm-hero-pip { display: none; }
  .rm-hero-stats { grid-template-columns: 1fr 1fr; }
}

/* --- Ticker --- */
.rm-ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface);
}
.rm-ticker-track {
  display: flex;
  gap: 48px;
  padding: 18px 0;
  white-space: nowrap;
  animation: rm-ticker 40s linear infinite;
  width: max-content;
}
.rm-ticker-item {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-dim);
}
.rm-ticker-dot { color: var(--accent); font-size: 8px; }
@keyframes rm-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- Capabilities --- */
.rm-caps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.rm-cap {
  appearance: none; border: 0; background: var(--bg);
  color: var(--fg); text-align: left; cursor: pointer;
  padding: 24px;
  display: flex; flex-direction: column; gap: 18px;
  transition: background .25s ease;
}
.rm-cap:hover { background: var(--surface); }
.rm-cap-top { display: flex; justify-content: space-between; align-items: center; }
.rm-cap-num { font-size: 12px; color: var(--accent); }
.rm-cap-tag { font-size: 10px; color: var(--fg-mute); }
.rm-cap-foot { display: flex; flex-direction: column; gap: 8px; }
.rm-cap-h { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.rm-cap-d { font-size: 14px; color: var(--fg-dim); line-height: 1.5; }
.rm-cap-arrow { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 6px; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.rm-cap-arrow span { transition: transform .2s ease; }
.rm-cap:hover .rm-cap-arrow span { transform: translateX(3px); }
.rm-cap-empty { background: var(--bg); }
@media (max-width: 880px) { .rm-caps-grid { grid-template-columns: 1fr; } .rm-cap-empty { display: none; } }

/* --- Process / steps --- */
.rm-steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--line); }
.rm-step { padding: 28px 22px 28px 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.rm-step:last-child { border-right: 0; }
.rm-step:not(:first-child) { padding-left: 22px; }
.rm-step-num { color: var(--accent); font-size: 12px; }
.rm-step-h { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.rm-step-d { font-size: 14px; color: var(--fg-dim); line-height: 1.5; }
@media (max-width: 880px) {
  .rm-steps { grid-template-columns: 1fr 1fr; }
  .rm-step { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 0; }
  .rm-step:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 16px; }
  .rm-step:nth-child(even) { padding-left: 16px; }
}

/* --- Featured project --- */
.rm-feat-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 5vw, 80px); align-items: center; }
.rm-feat-left { display: flex; flex-direction: column; gap: 24px; }
.rm-feat-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 32px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rm-feat-stats dt { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -0.02em; }
.rm-feat-stats dd { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.rm-feat-right { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.rm-feat-grid-small { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 880px) { .rm-feat-grid { grid-template-columns: 1fr; } }

/* --- Testimonials --- */
.rm-testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rm-quote {
  display: flex; flex-direction: column; gap: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
}
.rm-quote-mark {
  font-family: var(--font-display);
  font-size: 88px; line-height: 0.5;
  color: var(--accent);
  height: 30px;
  display: block;
}
.rm-quote blockquote { font-family: var(--font-display); font-size: 19px; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.rm-quote figcaption { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.rm-quote-avatar {
  width: 38px; height: 38px; border-radius: 999px;
  background: var(--surface-2); color: var(--fg);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--line);
}
.rm-quote figcaption b { display: block; font-size: 14px; font-weight: 600; }
.rm-quote figcaption em { display: block; font-style: normal; font-size: 12px; color: var(--fg-dim); margin-top: 2px; }
@media (max-width: 880px) { .rm-testi-grid { grid-template-columns: 1fr; } }

/* --- CTA banner --- */
.rm-cta-banner-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(40px, 6vw, 80px);
  display: flex; flex-direction: column; gap: 28px;
  align-items: flex-start;
  background-image:
    radial-gradient(50% 80% at 90% 10%, color-mix(in oklab, var(--accent) 18%, transparent) 0%, transparent 70%),
    radial-gradient(40% 60% at 0% 100%, color-mix(in oklab, var(--accent) 10%, transparent) 0%, transparent 70%);
}
.rm-cta-banner-h { max-width: 16ch; }

/* --- Services list --- */
.rm-svc-list { display: flex; flex-direction: column; gap: clamp(60px, 8vw, 120px); padding-top: 0; }
.rm-svc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.rm-svc-rev .rm-svc-media { order: 2; }
.rm-svc-copy { display: flex; flex-direction: column; gap: 18px; }
.rm-svc-meta { display: flex; gap: 14px; align-items: center; }
.rm-svc-num { color: var(--accent); }
.rm-svc-tag { color: var(--fg-mute); }
.rm-svc-h { letter-spacing: -0.02em; }
.rm-svc-bullets { list-style: none; display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.rm-svc-bullets li { display: flex; gap: 12px; align-items: baseline; font-size: 15px; color: var(--fg); }
.rm-svc-bullet-mark { width: 6px; height: 6px; border-radius: 1px; background: var(--accent); flex-shrink: 0; transform: translateY(2px); }
@media (max-width: 880px) {
  .rm-svc { grid-template-columns: 1fr; }
  .rm-svc-rev .rm-svc-media { order: 0; }
}

.rm-svc-foot-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(40px, 6vw, 80px);
  display: flex; flex-direction: column; gap: 22px; align-items: flex-start;
}

/* --- Photo Split --- */
.rm-photo-split { display: grid; gap: 8px; border-radius: var(--r); overflow: hidden; }
.rm-photo-split .rm-img { border-radius: var(--r-sm); overflow: hidden; }
.rm-photo-split-2 { grid-template-columns: 1fr 1fr; }
.rm-photo-split-3 { grid-template-columns: 1.2fr 0.8fr; }
.rm-photo-split-3 .rm-photo-main { grid-row: 1 / 3; }
.rm-photo-split-3 .rm-photo-main .rm-img { height: 100%; }
.rm-photo-split-3 .rm-photo-main img { height: 100%; object-fit: cover; }
.rm-photo-side { display: flex; flex-direction: column; gap: 8px; }
.rm-svc-phones { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .rm-photo-split-2 { grid-template-columns: 1fr; }
  .rm-photo-split-3 { grid-template-columns: 1fr; }
  .rm-photo-split-3 .rm-photo-main { grid-row: auto; }
}

/* --- Gallery --- */
.rm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(24px, 3vw, 40px);
}
.rm-gallery-grid .rm-img { border-radius: var(--r); overflow: hidden; }
@media (max-width: 880px) { .rm-gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .rm-gallery-grid { grid-template-columns: 1fr; } }

/* --- Contact --- */
.rm-contact-head { padding-bottom: 40px; }
.rm-contact-head-inner { display: flex; flex-direction: column; gap: 22px; max-width: 1100px; }
.rm-contact-grid-wrap { padding-top: 0; }
.rm-contact-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3vw, 56px); align-items: start; }
.rm-contact-split-info { display: flex; flex-direction: column; gap: 14px; }
.rm-contact-split-img .rm-img { border-radius: var(--r-lg); overflow: hidden; }
.rm-contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.rm-contact-emergency { border-color: color-mix(in oklab, var(--accent) 35%, var(--line)); }
.rm-contact-big { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 32px); font-weight: 600; letter-spacing: -0.02em; color: var(--fg); text-decoration: none; }
.rm-contact-big-2 { font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--fg); text-decoration: none; word-break: break-all; }
.rm-contact-big:hover, .rm-contact-big-2:hover { color: var(--accent); }
.rm-contact-note { color: var(--fg-mute); }
.rm-contact-addr { font-size: 14px; color: var(--fg-dim); line-height: 1.6; }

.rm-contact-services { text-align: center; }
.rm-contact-services .rm-eyebrow { justify-content: center; }
.rm-contact-svc-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: clamp(24px, 3vw, 40px);
  text-align: left;
}
.rm-contact-svc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.rm-contact-svc-num { font-size: 13px; color: var(--accent); }
.rm-contact-svc-h { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.rm-contact-svc-d { font-size: 14px; color: var(--fg-dim); line-height: 1.5; }

@media (max-width: 880px) {
  .rm-contact-split { grid-template-columns: 1fr; }
  .rm-contact-split-img { order: -1; }
  .rm-contact-svc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .rm-contact-svc-grid { grid-template-columns: 1fr; }
}

/* --- Footer --- */
.rm-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.rm-footer-top {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 120px) var(--pad);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(40px, 6vw, 100px);
}
.rm-footer-cta { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.rm-footer-h { font-family: var(--font-display); font-size: clamp(34px, 4.5vw, 64px); line-height: 1.0; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
.rm-footer-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

.rm-footer-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.rm-footer-col { display: flex; flex-direction: column; gap: 8px; }
.rm-footer-col p { font-size: 13px; color: var(--fg-dim); line-height: 1.6; }
.rm-footer-col button {
  appearance: none; border: 0; background: transparent;
  color: var(--fg-dim);
  font-family: var(--font-body); font-size: 13px; text-align: left;
  padding: 0; cursor: pointer;
  transition: color .2s ease;
}
.rm-footer-col button:hover { color: var(--fg); }

.rm-footer-bot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--pad);
  border-top: 1px solid var(--line);
  display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap;
  color: var(--fg-mute);
}

@media (max-width: 880px) {
  .rm-footer-top { grid-template-columns: 1fr; }
  .rm-footer-meta { grid-template-columns: 1fr 1fr; }
}
