/* Layout: rope-line rhythm — a fixed left "rope" rule on wide screens, content hung from it in bands */
:root {
  --bg: #f5f6f4;
  --surface: #ffffff;
  --ink: #16202a;
  --ink-soft: #4a5866;
  --line: #d6dbd9;
  --glass: #1d4a8c;      /* Hebros logo blue */
  --glass-soft: #e4ecf6;
  --hivis: #23843a;      /* Hebros logo green, darkened for text contrast */
  --hivis-ink: #ffffff;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151b; --surface: #16202a; --ink: #e9eef0; --ink-soft: #a3b1bc;
    --line: #2a3742; --glass: #9cbcec; --glass-soft: #172638; --hivis: #4cc463; --hivis-ink: #06210d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f151b; --surface: #16202a; --ink: #e9eef0; --ink-soft: #a3b1bc;
  --line: #2a3742; --glass: #9cbcec; --glass-soft: #172638; --hivis: #4cc463; --hivis-ink: #06210d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.6;
}
a { color: var(--glass); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--hivis); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; text-wrap: balance; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); text-transform: uppercase; }
h3 { font-size: 1.45rem; }
p { margin: 0; max-width: 65ch; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--hivis); font-weight: 500;
}

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand svg { flex: none; }
.brand b { font-family: var(--display); font-size: 1.5rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1; display: block; }
.brand small { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); display: block; }
.nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--hivis); }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font: 600 1rem var(--body);
  background: var(--hivis); color: var(--hivis-ink); text-decoration: none; border: 0; cursor: pointer;
  padding: .75rem 1.2rem; border-radius: 3px;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.nav .btn { padding: .5rem .9rem; color: var(--hivis-ink); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Hero */
.hero { background: var(--glass-soft); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding-block: 3.5rem 0; }
.hero-copy { display: grid; gap: 1.2rem; padding-bottom: 3.5rem; min-width: 0; }
.hero-copy p { font-size: 1.15rem; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-art { align-self: end; min-width: 0; }
.hero-art svg { display: block; width: 100%; max-width: 100%; height: auto; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 2.5rem 0; }
  .hero-copy { padding-bottom: 0; }
  .hero-art { max-width: 22rem; justify-self: center; }
}

/* Rig spec strip — the job sheet line every client asks about */
.spec { border-bottom: 1px solid var(--line); background: var(--surface); }
.spec dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.spec div { padding: 1rem 1rem 1.1rem 0; border-right: 1px solid var(--line); padding-left: 1rem; }
.spec div:first-child { padding-left: 0; }
.spec div:last-child { border-right: 0; }
.spec dt { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.spec dd { margin: .2rem 0 0; font-weight: 600; }
@media (max-width: 760px) { .spec div { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 0; } .spec div:last-child { border-bottom: 0; } }

/* Sections */
.band { padding-block: 4rem; }
.band.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: .6rem; margin-bottom: 2.2rem; }
.section-head p { color: var(--ink-soft); }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { background: var(--surface); padding: 1.6rem; display: grid; gap: .7rem; align-content: start; text-decoration: none; color: var(--ink); }
.service.lead { background: var(--glass); color: #fff; }
.service.lead p, .service.lead .more { color: #dbe7ee; }
:root[data-theme="dark"] .service.lead, .service.lead { --x: 0; }
.service p { color: var(--ink-soft); font-size: .98rem; }
.service .more { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hivis); margin-top: .3rem; }
a.service:hover h3 { text-decoration: underline; text-decoration-color: var(--hivis); text-underline-offset: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .service.lead { background: #183a6b; } }
:root[data-theme="dark"] .service.lead { background: #183a6b; }

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 2.5rem; }
.why div { display: grid; gap: .45rem; border-top: 3px solid var(--ink); padding-top: 1rem; }
.why p { color: var(--ink-soft); font-size: .98rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: .4rem; position: relative; padding-left: 3.2rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -.15rem; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  display: grid; place-items: center; font: 700 1.25rem var(--display); background: var(--hivis); color: var(--hivis-ink);
}
.steps p { color: var(--ink-soft); font-size: .98rem; }

.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; }
.project { border: 1px solid var(--line); background: var(--bg); padding: 1.3rem; display: grid; gap: .5rem; }
.project .tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.project p { font-size: .96rem; color: var(--ink-soft); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.prose { display: grid; gap: 1rem; min-width: 0; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }

.faq { display: grid; gap: .6rem; }
.faq details { border: 1px solid var(--line); background: var(--surface); padding: 1rem 1.2rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: .6rem; color: var(--ink-soft); }

/* Quote form */
.quote { background: var(--ink); color: var(--bg); }
.quote .section-head p, .quote .contact-lines { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.quote h2 { color: var(--bg); }
form { display: grid; gap: .9rem; min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 500; }
input, textarea, select {
  font: inherit; font-size: 1rem; padding: .7rem .8rem; border-radius: 3px; width: 100%;
  border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent); background: color-mix(in srgb, var(--bg) 8%, transparent); color: var(--bg);
}
select option { color: #16202a; }
textarea { min-height: 7rem; resize: vertical; }
.form-note { font-size: .88rem; min-height: 1.4em; }
.contact-lines { display: grid; gap: .9rem; font-size: 1.02rem; }
.contact-lines b { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--hivis); font-weight: 500; }
.contact-lines a { color: var(--bg); }

/* Service page hero */
.page-hero { background: var(--glass-soft); border-bottom: 1px solid var(--line); }
.page-hero .wrap { padding-block: 3rem; display: grid; gap: 1rem; }
.page-hero p { font-size: 1.12rem; color: var(--ink-soft); }
.crumbs { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.aside-box { border: 1px solid var(--line); background: var(--surface); padding: 1.5rem; display: grid; gap: .8rem; }
.aside-box ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; color: var(--ink-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: .9rem; color: var(--ink-soft); }
.site-footer .wrap { padding-block: 2.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; }
.site-footer h3 { font-size: 1.1rem; color: var(--ink); margin-bottom: .4rem; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.site-footer a { color: var(--ink-soft); }
.legal { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; }

@media (prefers-reduced-motion: no-preference) {
  .rope-tech { animation: descend 6s ease-in-out infinite alternate; }
  @keyframes descend { from { transform: translateY(0); } to { transform: translateY(46px); } }
}

/* Photos */
.hero-art { margin: 0 0 3.5rem; display: grid; gap: .5rem; }
.hero-art img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; max-height: 34rem; }
figcaption { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 760px) { .hero-art { margin-bottom: 2.5rem; } .hero-art img { aspect-ratio: 4 / 3; max-height: none; } }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.photo-pair + h2, .photo-pair + p { margin-top: .5rem; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery figure, .photo-pair figure, .page-photo { margin: 0; display: grid; gap: .45rem; align-content: start; }
.gallery img, .photo-pair img, .page-photo img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.photo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

/* Glass roof feature */
.feature { background: var(--glass); color: #fff; }
.feature .eyebrow { color: #9be3aa; }
.feature p, .feature figcaption { color: #dbe6f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .feature { background: #142d52; } }
:root[data-theme="dark"] .feature { background: #142d52; }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-video { margin: .5rem 0 0; display: grid; gap: .45rem; max-width: 20rem; }
.feature-video video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #0e1a22; }
.gallery.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photo-pair.wide img { aspect-ratio: 16 / 9; }
@media (max-width: 560px) { .photo-pair.wide { grid-template-columns: 1fr; } }
.gallery.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .gallery.three { grid-template-columns: 1fr; } .gallery.three figure:not(:first-child) img { aspect-ratio: 4 / 3; } }

/* WhatsApp button */
:root { --wa: #1f9e55; --wa-ink: #ffffff; }
.wa-fab {
  position: fixed; z-index: 20;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--wa); color: var(--wa-ink); text-decoration: none;
  font: 600 .98rem var(--body); padding: .75rem 1.1rem; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.wa-fab:hover { filter: brightness(1.08); }
.wa-fab:focus-visible { outline: 3px solid var(--hivis); outline-offset: 3px; }
@media (max-width: 480px) { .wa-fab span { display: none; } .wa-fab { padding: .85rem; } }
.contact-lines small { font-size: .82rem; opacity: .8; }
.site-footer { padding-bottom: 4.5rem; }

/* IRATA badge (kept on white so the logo stays true in dark mode) */
.irata-badge { display: block; width: 9rem; max-width: 100%; height: auto; background: #fff; padding: .4rem; border-radius: 4px; border: 1px solid var(--line); }
.irata-badge.sm { width: 5.5rem; padding: .25rem; }
.hero-trust { display: flex; align-items: center; gap: .8rem; font-size: .92rem; color: var(--ink-soft); }
.hero-trust b { color: var(--ink); }
.irata-card { display: flex; gap: 1rem; align-items: center; border: 1px solid var(--line); background: var(--surface); padding: 1rem 1.2rem; }
.irata-card p { color: var(--ink-soft); font-size: .95rem; min-width: 0; }
@media (max-width: 480px) { .irata-card { flex-direction: column; align-items: flex-start; } }
.irata-foot { display: flex; align-items: center; gap: .8rem; }

/* Logo + atrium videos */
.brand img { display: block; width: 28px; height: auto; flex: none; }
.video-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .5rem; }
.video-row .feature-video { max-width: none; margin: 0; }
@media (max-width: 480px) { .video-row { grid-template-columns: 1fr 1fr; } .video-row .feature-video:last-child { display: none; } }
.before-after { margin: 0 0 .5rem; display: grid; gap: .45rem; min-width: 0; }
.before-after img { display: block; width: 100%; max-width: 100%; height: auto; }
.night-shot { margin: 0; display: grid; gap: .45rem; max-width: 18rem; }
.night-shot img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 30%; }
.gallery .feature-video { max-width: none; margin: 0; }
.gallery .feature-video video { aspect-ratio: 3 / 4; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
