/* RC Construction Enterprises Inc. — site styles */

@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --brand: #3a6d9e;          /* logo blue */
  --brand-light: #5092ba;    /* original nav blue */
  --brand-dark: #24496e;
  --navy: #13243a;
  --navy-2: #1b2b3f;
  --ink: #23272d;
  --text: #3d434b;
  --muted: #6b7380;
  --line: #e3e7ec;
  --paper: #ffffff;
  --paper-2: #f4f6f9;
  --charcoal: #2b2f35;
  --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --header-h: 84px;
  --radius: 4px;
  --shadow: 0 18px 40px -18px rgba(10, 24, 42, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7;
  color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.05; margin: 0 0 .5em; letter-spacing: .01em; text-transform: uppercase; }
p { margin: 0 0 1.25em; }
:focus-visible { outline: 3px solid #8cc4ea; outline-offset: 3px; }

.container { width: min(1200px, 100% - 3rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }

.eyebrow {
  font-family: var(--font-display); font-weight: 500; font-size: .95rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--brand-light); margin: 0 0 1rem;
  display: flex; align-items: center; gap: .75rem;
}
.eyebrow::before { content: ""; width: 2.25rem; height: 2px; background: currentColor; flex: none; }
.section-title { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; padding: .8rem 1.6rem; border-radius: var(--radius); border: 2px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  cursor: pointer; white-space: nowrap;
}
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-outline { color: var(--brand); border-color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.text-link { font-family: var(--font-display); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff; text-decoration: none; border-bottom: 2px solid var(--brand-light); padding-bottom: 2px; }
.text-link:hover { color: #cfe4f3; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: #fff; border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), height .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -12px rgba(10,24,42,.35); border-bottom-color: var(--line); --header-h: 70px; height: 70px; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { flex: 0 1 auto; min-width: 0; }
.brand img { height: 30px; width: auto; max-width: 100%; mix-blend-mode: multiply; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.site-nav ul a {
  position: relative; font-weight: 500; font-size: .98rem; color: var(--ink); text-decoration: none; padding: .4rem 0;
}
.site-nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.site-nav ul a:hover::after, .site-nav ul a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav ul a[aria-current="true"] { color: var(--brand); }
.nav-cta { padding: .6rem 1.1rem; font-size: .95rem; letter-spacing: .08em; }
.nav-toggle { display: none; }

/* Media sections */
.media-section { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--navy) center / cover no-repeat; }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.overlay { position: absolute; inset: 0; z-index: -1; }
.media-section h1, .media-section h2, .media-section h3 { color: #fff; }

/* Hero */
.hero { min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 3rem) 0 5rem; background-image: url("../img/poster-hero.webp"); }
.overlay-hero { background: linear-gradient(90deg, rgba(10,22,38,.86) 0%, rgba(10,22,38,.55) 45%, rgba(10,22,38,.1) 100%), linear-gradient(0deg, rgba(10,22,38,.5), transparent 40%); }
.hero-content { max-width: 1200px; }
.hero .eyebrow { color: #9ccbe8; }
.hero h1 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: .95; margin-bottom: 1.5rem; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero-lede { font-size: clamp(1.1rem, 1.6vw, 1.35rem); font-weight: 300; max-width: 34rem; color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.7); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Welcome */
.welcome { padding: clamp(6rem, 12vw, 10rem) 0; }
.overlay-welcome { background: linear-gradient(180deg, rgba(12,26,44,.78), rgba(12,26,44,.62)); }
.welcome-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.display { font-size: clamp(2.6rem, 6vw, 5.25rem); line-height: .98; margin-bottom: 1.75rem; }
.display-small { display: block; font-size: .42em; letter-spacing: .2em; color: #9ccbe8; margin-bottom: .6rem; }
.welcome-main p { font-size: 1.125rem; color: rgba(255,255,255,.9); max-width: 40rem; }
.welcome-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-top: 3px solid var(--brand-light); padding: 2.25rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.welcome-card .eyebrow { color: #fff; font-size: 1.15rem; }
.welcome-card p:not(.eyebrow) { color: rgba(255,255,255,.88); }

/* About */
.about { padding: clamp(5rem, 10vw, 8rem) 0; background: linear-gradient(135deg, var(--navy) 0%, #1d3557 100%); color: rgba(255,255,255,.88); position: relative; overflow: hidden; }
.about::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 10% 100%, rgba(80,146,186,.22), transparent 70%); pointer-events: none; }
.about-grid { position: relative; display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about h2 { color: #fff; }
.about .eyebrow { color: #9ccbe8; }
.about-text > p { font-size: 1.125rem; }
.values { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .75rem; }
.values li { display: flex; align-items: center; gap: .85rem; font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.values li::before { content: ""; width: 10px; height: 10px; transform: rotate(45deg); background: var(--brand-light); flex: none; }
.about-figure { margin: 0; position: relative; }
.about-figure::before { content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem; border: 2px solid rgba(80,146,186,.55); z-index: 0; }
.about-figure img { position: relative; z-index: 1; width: 100%; aspect-ratio: 1600 / 833; object-fit: cover; box-shadow: var(--shadow); }

/* Services */
.services { padding: clamp(5rem, 10vw, 8rem) 0; }
.overlay-services { background: linear-gradient(180deg, rgba(8,12,18,.72), rgba(8,12,18,.82)); }
.section-head { text-align: center; margin-bottom: 3.5rem; }
.section-head .eyebrow { justify-content: center; color: #9ccbe8; }
.section-head .eyebrow::after { content: ""; width: 2.25rem; height: 2px; background: currentColor; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.service-card { background: #fff; color: var(--text); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -20px rgba(0,0,0,.6); }
.service-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service-card:hover .service-media img { transform: scale(1.05); }
.service-body { padding: 1.75rem 1.75rem 2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; flex: 1; border-top: 3px solid var(--brand); }
.service-num { font-family: var(--font-display); font-weight: 600; color: var(--brand-light); letter-spacing: .15em; font-size: .95rem; }
.service-card h3 { color: var(--ink); font-size: 2rem; margin: 0 0 .25rem; }

/* Interlude */
.interlude { min-height: clamp(320px, 55vh, 560px); display: grid; align-items: center; }
.overlay-interlude { background: linear-gradient(90deg, rgba(10,22,38,.8), rgba(10,22,38,.35)); }
.interlude-text { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: .95; margin: 0; color: #fff; }
.interlude-text span { display: block; color: #9ccbe8; }

/* Testimonial */
.testimonial { padding: clamp(6rem, 12vw, 10rem) 0; }
.overlay-testimonial { background: linear-gradient(180deg, rgba(10,22,38,.55), rgba(10,22,38,.7)); }
.quote-card { margin: 0 auto; max-width: 860px; background: #fff; color: var(--ink); padding: clamp(2.25rem, 5vw, 4rem); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; text-align: center; }
.quote-card .eyebrow { justify-content: center; color: var(--brand); font-size: .95rem; }
.quote-card .eyebrow::after { content: ""; width: 2.25rem; height: 2px; background: currentColor; }
.quote-mark { width: 48px; height: 36px; margin: 0 auto 1.5rem; fill: var(--brand-light); opacity: .9; }
.quote-card blockquote { margin: 0; }
.quote-card blockquote p { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 1.95rem); line-height: 1.35; color: var(--ink); margin: 0; }
.quote-card figcaption { margin-top: 1.75rem; color: var(--muted); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; }

/* Contact */
.contact { padding: clamp(5rem, 10vw, 8rem) 0; background: var(--charcoal); color: rgba(255,255,255,.85); }
.contact h2 { color: #fff; }
.contact .eyebrow { color: #9ccbe8; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 2.5rem; display: grid; gap: 1.35rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; font-size: 1.125rem; }
.contact-list svg { width: 22px; height: 22px; fill: var(--brand-light); flex: none; margin-top: .25rem; }
.contact-list a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); transition: border-color .2s, color .2s; }
.contact-list a:hover { color: #cfe4f3; border-bottom-color: var(--brand-light); }
.map-wrap { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #3a3f46; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.25); }

/* Footer */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.85); padding: 2rem 0; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer-brand { display: flex; align-items: center; gap: .85rem; font-family: var(--font-display); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.footer-mark { width: 54px; height: 18px; fill: #fff; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.copyright { margin: 0; width: 100%; color: rgba(255,255,255,.65); font-size: .875rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; }

/* No-JS fallback backgrounds for lazily-postered sections */
.no-js .welcome { background-image: url("../img/poster-welcome.webp"); }
.no-js .services { background-image: url("../img/poster-services.webp"); }
.no-js .interlude { background-image: url("../img/poster-interlude.webp"); }
.no-js .testimonial { background-image: url("../img/poster-testimonial.webp"); }

/* Hero entrance (CSS only, so the headline paints immediately) */
.hero-anim { animation: rise .9s var(--ease) both; }
.hero-content > .hero-anim:nth-child(2) { animation-delay: .08s; }
.hero-content > .hero-anim:nth-child(3) { animation-delay: .16s; }
.hero-content > .hero-anim:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: .001; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Reveal animation (only when JS is active) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1140px) {
  :root { --header-h: 70px; }
  .site-header, .site-header.is-scrolled { height: 70px; }
  .nav-toggle {
    display: inline-grid; place-items: center; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer; flex: none; margin-right: -.5rem;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), background-color .3s; position: relative; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -8px; }
  .nav-toggle-bar::after { top: 8px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-8px) rotate(-45deg); }
  .site-nav {
    position: fixed; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 1.5rem;
    background: #fff; padding: 1rem 1.5rem 2rem; border-top: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(10,24,42,.4);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .9rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .site-nav ul a::after { display: none; }
  .nav-cta { align-self: flex-start; }
  .no-js .site-nav { position: static; visibility: visible; opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  .welcome-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .about-figure::before { inset: .75rem -.75rem -.75rem .75rem; }
  .map-wrap { aspect-ratio: 16 / 11; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .container { width: min(1200px, 100% - 2rem); }
  .brand img { height: 18px; }
  .hero { padding-bottom: 6rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .welcome-card { padding: 1.6rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav { flex-wrap: wrap; gap: .75rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 404 */
.page-404 { padding-top: 4rem; }
