/* ==========================================================
   FOCOM - Coming Soon
   Change the colours and fonts in :root and everything follows.
   ========================================================== */
:root {
  --bg:        #0f120e;   /* page colour behind the photos */
  --text:      #ecebe0;
  --muted:     #b9b9a8;
  --accent:    #c8b877;   /* buttons + link hover */
  --accent-ink:#14170f;   /* text on accent buttons */
  --shade:     0.62;      /* how dark the photos are behind the text (0 = none, 1 = black) */
  --fade:      1.8s;      /* crossfade length between photos */

  --font-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* Vertical snap between the main page and the photo screen */
html {
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: none;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.screen {
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* ---------- Background slideshow ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

/* Each photo is drawn twice: a blurred, cropped copy fills the whole screen,
   and the full, uncropped photo sits on top of it. So nothing is ever cut off,
   even on a phone held upright, and there are no empty bars. */
.layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--fade) ease-in-out;
  will-change: opacity;
}
.layer.is-active { opacity: 1; }

.layer::before,
.layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-position: center;
  background-repeat: no-repeat;
}
.layer::before {                       /* blurred fill */
  background-size: cover;
  filter: blur(28px) brightness(0.7);
  transform: scale(1.15);              /* hides the soft blurred edges */
}
.layer::after {                        /* the whole photo */
  background-size: contain;            /* change to "cover" to fill the screen and crop instead */
}

/* The dark overlay eases away as you scroll down to the photos (script.js) */
.shade {
  position: absolute;
  inset: 0;
  will-change: opacity;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0, calc(var(--shade) * 0.75)) 0%, rgba(0,0,0, var(--shade)) 70%),
    linear-gradient(to top, rgba(0,0,0,.55), transparent 35%);
}

/* ---------- Screen 1: main page ---------- */
.hero {
  display: flex;
  flex-direction: column;
  will-change: opacity;   /* fades out on scroll (script.js) */
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
  text-shadow: 0 1px 12px rgba(0,0,0,.6);
}

.logo {
  display: block;
  width: min(360px, 70vw);
  height: auto;
  margin: 0 0 1.75rem;
}

.wordmark {
  margin: 0 0 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 6rem);
  line-height: 1;
  letter-spacing: 0.04em;
}

h1 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.tagline {
  margin: 0.5rem 0 1.75rem;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  color: var(--accent);
}

.blurb {
  max-width: 34rem;   /* keeps lines a comfortable length */
  margin: 0 0 2rem;
  color: var(--text);
}

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-shadow: none;
  transition: background-color .15s, color .15s, transform .15s;
}

.btn-primary   { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: rgba(0,0,0,.35); color: var(--text); }

.btn:hover,
.btn:focus-visible { transform: translateY(-2px); }
.btn-primary:hover   { background: #ddce8f; border-color: #ddce8f; }
.btn-secondary:hover { background: var(--accent); color: var(--accent-ink); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

/* "Browse screenshots" cue under the main buttons */
.cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  padding: 0.25rem 0.75rem;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  text-shadow: inherit;
  cursor: pointer;
  transition: color .15s;
}
.cue:hover { color: var(--accent); }

/* ---------- Footer ---------- */
footer {
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
}

footer a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--accent); }

/* ---------- Screen 2: photos only ---------- */
.gallery {
  position: relative;
  touch-action: pan-y;   /* up/down scrolls the page, left/right is a photo swipe */
}

/* Controls fade in as you scroll down (script.js sets --reveal from 0 to 1) */
.ctl {
  position: absolute;
  opacity: var(--reveal, 0);
  visibility: hidden;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.gallery.is-live .ctl { visibility: visible; pointer-events: auto; }

button.ctl {
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
button.ctl:hover { background: var(--accent); color: var(--accent-ink); }

.back {
  top: max(1.25rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1.1rem 0.5rem 0.8rem;
  border-radius: 999px;
}

.arrow {
  top: 50%;
  transform: translateY(-50%);
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border-radius: 50%;
}
.arrow-prev { left: max(1rem, env(safe-area-inset-left)); }
.arrow-next { right: max(1rem, env(safe-area-inset-right)); }

.meter {
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}
.status { display: none; color: var(--accent); }
.gallery.is-paused .status { display: inline; }

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .actions { flex-direction: column; width: 100%; max-width: 20rem; }
  .btn { width: 100%; }
  .arrow { width: 3rem; height: 3rem; }
  .arrow-prev { left: 0.5rem; }
  .arrow-next { right: 0.5rem; }
}

/* ---------- Respect "reduce motion" settings ---------- */
@media (prefers-reduced-motion: reduce) {
  .layer { transition-duration: 0.01s; }
  .btn, button.ctl, .cue { transition: none; }
}
