:root {
  --blue: #0087cb;
  --blue-dark: #006ba3;
  --ink: #0e1114;
  --text: #2b3138;
  --muted: #5d6670;
  --line: #e3e7eb;
  --bg: #ffffff;
  --bg-alt: #f3f5f7;
  --radius: 6px;
  --display: "Lexend Exa", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.12; margin: 0 0 .6em; letter-spacing: -0.03em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand img { height: 64px; width: auto; }
nav { display: flex; align-items: center; gap: 32px; }
nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
nav a:hover { color: var(--blue); }

.btn {
  display: inline-block;
  background: var(--blue); color: #fff;
  padding: 14px 24px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
  border: 2px solid var(--blue);
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
nav a.btn { color: #fff; }
.btn-small { padding: 9px 18px; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { background: transparent; border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero {
  position: relative; overflow: hidden;
  min-height: min(82vh, 760px);
  display: flex; align-items: center;
  background: var(--ink);
  color: #d5dbe0;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,13,16,.92) 0%, rgba(10,13,16,.78) 38%, rgba(10,13,16,.15) 75%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { color: #fff; max-width: 13em; }
.eyebrow { color: #5fc0f0; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.lede { font-size: 1.15rem; max-width: 32em; color: #d5dbe0; }

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--ink); color: #c9d0d6; }
.section-dark h2 { color: #fff; }
.section-dark a { color: #fff; }

.rule { position: relative; padding-bottom: 20px; margin-bottom: 40px; }
.rule::before, .rule::after { content: ""; position: absolute; bottom: 0; height: 4px; }
.rule::before { left: 0; width: 56px; background: var(--blue); }
.rule::after { left: 60px; width: 28px; background: var(--ink); }
.rule-light::after { background: #fff; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.services article { border-top: 1px solid var(--line); padding-top: 24px; }
.services .num { display: block; font-family: var(--display); color: var(--blue); font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.services p { color: var(--muted); margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; background: #dde2e6; aspect-ratio: 1; }
.gallery a.lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; position: relative; }
.gallery a.lead img { position: absolute; inset: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }

.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.details { margin: 0; display: grid; gap: 24px; justify-self: end; text-align: right; }
.details dt { color: var(--blue); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.details dd { margin: 0; color: #fff; }

.foot { background: var(--ink); color: #7d8790; border-top: 1px solid #23282d; padding: 28px 0; font-size: .85rem; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.foot-inner img { height: 48px; width: auto; }

#lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
#lightbox::backdrop { background: rgba(10,12,14,.92); }
#lightbox[open] { display: grid; place-items: center; }
#lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; border-radius: 6px; }
.lb-caption { position: fixed; bottom: 20px; left: 0; right: 0; text-align: center; color: #c9d0d6; margin: 0; font-size: .95rem; }
#lightbox button { position: fixed; background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; cursor: pointer; }
#lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; gap: 32px; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
  .details { justify-self: start; text-align: left; }
  .section { padding: 72px 0; }
  .hero::after { background: linear-gradient(180deg, rgba(10,13,16,.55) 0%, rgba(10,13,16,.88) 55%, rgba(10,13,16,.95) 100%); }
  .hero { min-height: 0; }
  .hero-inner { padding-top: 120px; padding-bottom: 56px; }
}
@media (max-width: 600px) {
  nav a:not(.btn) { display: none; }
  .top-inner { height: 68px; }
  .brand img { height: 50px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery a.lead { grid-row: auto; aspect-ratio: 4 / 3; }
  .actions .btn { flex: 1 1 100%; text-align: center; }
}

/* Logo band edges as fractions of the logo's height: CCF mark 0–56.4%, CAIRNS COAST 56.4–77%, FABRICATION 77–100%. */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: #fff;
  cursor: pointer;
  animation: intro-out .5s cubic-bezier(.65,0,.35,1) 2.1s forwards;
}
.intro-logo { position: relative; width: min(72vw, 440px); animation: intro-lift .5s cubic-bezier(.65,0,.35,1) 2.1s forwards; }
.intro-logo img { width: 100%; height: auto; }
.intro-logo img + img { position: absolute; inset: 0; }
.intro-mark { clip-path: inset(0 100% 43.6% 0); animation: intro-wipe .9s cubic-bezier(.65,0,.35,1) .2s forwards; }
.intro-line1 { clip-path: inset(56.4% 0 23% 0); opacity: 0; transform: translateY(8%); animation: intro-rise .45s cubic-bezier(.2,.7,.3,1) 1s forwards; }
.intro-line2 { clip-path: inset(77% 0 0 0); opacity: 0; transform: translateY(8%); animation: intro-rise .45s cubic-bezier(.2,.7,.3,1) 1.2s forwards; }
.intro-arc {
  position: absolute; top: 0; left: 0; width: 3px; height: 56.4%;
  background: #fff; border-radius: 2px; opacity: 0;
  box-shadow: 0 0 6px 2px #7fd3ff, 0 0 22px 6px rgba(0,135,203,.65);
  animation: intro-arc .9s cubic-bezier(.65,0,.35,1) .2s forwards;
}
.intro-skip, .intro-skip .intro-logo { animation-duration: .25s; animation-delay: 0s; }

@keyframes intro-wipe { to { clip-path: inset(0 0 43.6% 0); } }
@keyframes intro-arc {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes intro-rise { to { opacity: 1; transform: none; } }
@keyframes intro-lift { to { transform: translateY(-12px) scale(.97); } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
}
