/* drilloffshore.com */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background: #0b1a2a;
}

/* -- Splash ---------------------------------------------------------------- */
/* The <html> element carries data-time="day" or "night" (set in index.html).
   Only the matching image is downloaded. */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: #0b1a2a;
  background-size: cover;
  background-position: 37% 50%;   /* keeps the rig in view on narrow screens */
  background-repeat: no-repeat;
}

/* Shading so white text stays readable on the bright day sky. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 45%);
  pointer-events: none;
}

html[data-time="day"] .hero {
  background-image: url("/img/splash-day-1280.jpg");
  background-image: image-set(url("/img/splash-day-1280.webp") type("image/webp"),
                              url("/img/splash-day-1280.jpg") type("image/jpeg"));
}
html[data-time="night"] .hero {
  background-image: url("/img/splash-night-1280.jpg");
  background-image: image-set(url("/img/splash-night-1280.webp") type("image/webp"),
                              url("/img/splash-night-1280.jpg") type("image/jpeg"));
}
@media (min-width: 1281px), (min-resolution: 2dppx) and (min-width: 641px) {
  html[data-time="day"] .hero {
    background-image: url("/img/splash-day-2560.jpg");
    background-image: image-set(url("/img/splash-day-2560.webp") type("image/webp"),
                                url("/img/splash-day-2560.jpg") type("image/jpeg"));
  }
  html[data-time="night"] .hero {
    background-image: url("/img/splash-night-2560.jpg");
    background-image: image-set(url("/img/splash-night-2560.webp") type("image/webp"),
                                url("/img/splash-night-2560.jpg") type("image/jpeg"));
  }
}

/* -- Top bar ---------------------------------------------------------------- */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 3vw, 40px) clamp(18px, 3.6vw, 52px);
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.75rem);
  letter-spacing: .02em;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.menu-btn {
  width: 44px;
  height: 44px;
  padding: 10px 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-btn span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.menu-btn:focus-visible, .brand:focus-visible, .menu a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.menu {
  position: absolute;
  z-index: 3;
  top: calc(clamp(16px, 3vw, 40px) + 52px);
  right: clamp(18px, 3.6vw, 52px);
  min-width: 220px;
  padding: 8px 0;
  background: rgba(8, 20, 34, .92);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.menu[hidden] { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { padding: 10px 20px; }
.menu a { color: #fff; text-decoration: none; font-weight: 600; }
.menu a:hover { text-decoration: underline; }

/* -- Headline -------------------------------------------------------------- */

.headline {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 0 20px clamp(32px, 6vh, 64px);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}

.headline h1 {
  margin: 0;
  font-family: "Arial Black", "Segoe UI Black", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5.6vw, 5rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .005em;
}

.headline p {
  margin: .6em 0 0;
  font-size: clamp(1rem, 1.9vw, 1.6rem);
}

/* -- 404 ------------------------------------------------------------------- */

.notfound {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}
.notfound h1 { margin: 0 0 .4em; font-size: 2rem; }
.notfound a { color: #9cd3ff; }
