/* datalakes.co.uk - holding page
   single-screen, viewport-locked, photographic background with layered SVG overlays */

:root {
  --bg: #0e2030;
  --surface: #f4ede0;
  --accent: #c55f3c;
  --accent-soft: #ed8764;
  --highlight: #2a6f7e;
  --text-on-photo: #f4ede0;

  --font-serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-sans:  'Spartan', 'Helvetica Neue', Arial, sans-serif;

  --track: 0.265em;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text-on-photo);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

body {
  min-height: 100vh;
  min-height: 100svh;
}

/* shorter viewports (landscape phones, iPad split) need a softer overflow rule */
@media (max-height: 560px) {
  html, body { overflow-y: auto; }
}

/* keyboard accessibility */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--bg);
  padding: 10px 16px;
  font: 600 12px/1 var(--font-sans);
  letter-spacing: var(--track);
  text-transform: uppercase;
  text-decoration: none;
  z-index: 100;
}
.skip:focus { left: 16px; top: 16px; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

/* ------- top bar ------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(18px, 2.4vw, 30px) var(--gutter);
  z-index: 10;
  pointer-events: none;
}

.topbar__brand,
.topbar__status {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(10px, 0.78vw, 12px);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--surface);
  opacity: 0.92;
  pointer-events: auto;
  white-space: nowrap;
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.topbar__dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(197, 95, 60, 0.55);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(197, 95, 60, 0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(197, 95, 60, 0); }
}

/* ------- scene ------- */
.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.scene__photo,
.scene__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.scene__photo img {
  object-fit: cover;
  object-position: center 60%;
  filter: saturate(0.92) contrast(1.04);
}

.scene__vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(14, 32, 48, 0.35) 0%,
      rgba(14, 32, 48, 0)    22%,
      rgba(14, 32, 48, 0)    45%,
      rgba(14, 32, 48, 0.85) 100%),
    radial-gradient(ellipse at 50% 70%,
      rgba(14, 32, 48, 0)   30%,
      rgba(14, 32, 48, 0.4) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ------- overlays ------- */
.scene__overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.layer {
  position: absolute;
  display: block;
  pointer-events: auto;
  will-change: transform, opacity;
  /* hidden by default; GSAP reveals (or reduced-motion class reveals) */
  opacity: 0;
  visibility: hidden;
  transition: filter 0.4s ease;
  filter: drop-shadow(0 2px 14px rgba(14, 32, 48, 0.55));
}

/* placement (desktop) - all positions echo the brief composition */
.layer--sparkles {
  top: 8%;  left: 0;
  width: 100%;
  max-width: 100%;
}

.layer--network {
  top: 12%;
  right: 4%;
  width: clamp(220px, 28vw, 460px);
}

.layer--contours {
  bottom: 10%;
  left: 0;
  width: 100%;
}

.layer--chart {
  bottom: 17%;
  left: 5%;
  width: clamp(180px, 22vw, 360px);
}

.layer--sketcher {
  bottom: 9%;
  left: 8%;
  width: clamp(120px, 11vw, 200px);
}

/* ------- copy block (centred) ------- */
.copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--gutter);
  z-index: 5;
  gap: clamp(18px, 2.6vw, 32px);
  pointer-events: none;
}

.copy__headline {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 6.4vw, 92px);
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: var(--surface);
  text-shadow: 0 2px 28px rgba(14, 32, 48, 0.55);
}

.copy__roman {
  display: inline;
  font-style: normal;
}

.copy__italic {
  display: inline;
  font-style: italic;
  font-weight: 500;
  color: var(--accent-soft);
  margin-left: 0.18em;
}

.copy__eyebrow {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(10px, 0.95vw, 13px);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--surface);
  opacity: 0.88;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 20px 30px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--surface);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: var(--track);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  pointer-events: auto;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, color 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.cta:hover {
  border-color: var(--accent-soft);
  background: rgba(244, 237, 224, 0.06);
  transform: translateY(-1px);
  color: var(--accent-soft);
}

.cta:active { transform: translateY(0); }

.copy__fallback {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(9px, 0.78vw, 11px);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--surface);
  opacity: 0.55;
  pointer-events: auto;
  user-select: all;
}

/* ------- footline ------- */
.footline {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.6em;
  padding: clamp(18px, 2.4vw, 30px) var(--gutter);
  z-index: 6;
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(13px, 1.05vw, 16px);
  color: var(--surface);
  text-align: center;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 14px rgba(14, 32, 48, 0.7);
  pointer-events: none;
}

.footline__avail {
  font-family: var(--font-sans);
  font-weight: 600;
  font-style: normal;
  font-size: clamp(10px, 0.85vw, 12px);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--accent-soft);
}

/* ------- responsive ladder ------- */

/* tablet landscape and below: pull overlays into safer corners */
@media (max-width: 1024px) {
  .layer--network  { top: 9%;  right: 2%; width: clamp(180px, 32vw, 320px); }
  .layer--chart    { bottom: 22%; left: 4%; width: clamp(150px, 28vw, 280px); }
  .layer--sketcher { bottom: 12%; left: 6%; width: clamp(110px, 14vw, 180px); }
  .layer--contours { bottom: 6%; }
}

/* tablet portrait: shrink overlays further, strengthen lower vignette so copy keeps contrast */
@media (max-width: 820px) {
  .scene__vignette {
    background:
      linear-gradient(to bottom,
        rgba(14, 32, 48, 0.45) 0%,
        rgba(14, 32, 48, 0.08) 24%,
        rgba(14, 32, 48, 0.18) 50%,
        rgba(14, 32, 48, 0.92) 100%),
      radial-gradient(ellipse at 50% 70%,
        rgba(14, 32, 48, 0)   28%,
        rgba(14, 32, 48, 0.55) 100%);
  }
  .layer--sparkles { top: 4%;  width: 92%; left: 4%; }
  .layer--network  { top: 8%;  right: 0; width: 38vw; }
  .layer--chart    { bottom: 24%; left: 2%; width: 36vw; --final-opacity: 0.8; }
  .layer--sketcher { bottom: 14%; left: 4%; width: 22vw; }
  .layer--contours { bottom: 4%; --final-opacity: 0.85; }
}

/* phone: drop the busiest overlays, two minimal accents remain, type holds the page */
@media (max-width: 600px) {
  .scene__photo img { object-position: 60% 50%; }

  .scene__vignette {
    background:
      linear-gradient(to bottom,
        rgba(14, 32, 48, 0.55) 0%,
        rgba(14, 32, 48, 0.18) 18%,
        rgba(14, 32, 48, 0.35) 42%,
        rgba(14, 32, 48, 0.95) 100%),
      radial-gradient(ellipse at 50% 65%,
        rgba(14, 32, 48, 0.05) 22%,
        rgba(14, 32, 48, 0.7)  100%);
  }

  /* keep two accents only: a faint sparkle band up top and the top-right network arc.
     --final-opacity is read by GSAP at end-of-timeline so the entrance still plays cleanly */
  .layer--sparkles { top: 5%;  width: 100%; left: 0; --final-opacity: 0.55; }
  .layer--network  { top: 6%;  right: -8%; width: 58vw; --final-opacity: 0.85; }
  .layer--contours { display: none; }
  .layer--chart    { display: none; }
  .layer--sketcher { display: none; }

  .topbar { padding: 14px 18px; }
  .topbar__brand,
  .topbar__status { font-size: 10px; letter-spacing: 0.22em; }
  .topbar__status { gap: 8px; }

  .copy {
    gap: 18px;
    padding: 0 22px;
    justify-content: flex-end;
    padding-bottom: clamp(96px, 22vh, 160px);
  }
  .copy__headline {
    font-size: clamp(30px, 9.2vw, 56px);
    line-height: 1.06;
  }
  .copy__italic { display: block; margin-left: 0; margin-top: 0.04em; }
  .copy__eyebrow { font-size: 11px; }

  .cta {
    width: 100%;
    max-width: 320px;
    padding: 16px 22px;
    font-size: 15px;
    min-height: 52px;
  }
  .copy__fallback { font-size: 10px; }

  .footline {
    flex-direction: column;
    gap: 4px;
    padding: 0 22px 18px;
    font-size: 13px;
  }
  .footline__avail { font-size: 10px; }
}

/* very narrow (iPhone SE width 375 and under): even tighter */
@media (max-width: 380px) {
  .copy__headline { font-size: 28px; }
  .topbar__brand,
  .topbar__status { font-size: 9px; letter-spacing: 0.2em; }
}

/* landscape phone (short height): collapse footline + lift copy so nothing clips */
@media (max-height: 480px) and (orientation: landscape) {
  .copy {
    justify-content: center;
    padding: 60px 24px 60px;
    gap: 12px;
  }
  .copy__headline { font-size: clamp(24px, 5vw, 40px); }
  .layer--contours,
  .layer--chart,
  .layer--sketcher { display: none; }
  .footline { display: none; }
}

/* ------- reduced motion: jump to final state ------- */
@media (prefers-reduced-motion: reduce) {
  .layer { opacity: 1 !important; visibility: visible !important; transform: none !important; }
  .topbar__dot { animation: none; }
}

/* state added by JS once GSAP hands off */
.scene.is-ready .layer { /* opacity is handled inline by GSAP */ }
