/* haraujo.com holding page */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/manrope-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jost-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #f4efe6;    /* warm ivory */
  --night: #0b0f14;
  --system: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hold: 8s;        /* how long each photo is fully shown */
  --fade: 2s;        /* cross-fade between photos */
  --drift: 12s;      /* zoom-and-pan length; outlasts hold + fade so it never stops on screen */
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--system);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  /* Nothing on the page is selectable, and iOS shows no save or copy callout. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Photos */

.slides { position: fixed; inset: 0; overflow: hidden; }

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity var(--fade) ease-in-out;
  will-change: opacity, transform;
}
.slide.is-active { opacity: 1; z-index: 1; }

.slide[data-photo="alpine-bench"] { object-position: 80% center; }
.slide[data-photo="douro-river"]  { object-position: center 70%; }

/* Four zoom-and-pan paths; each photo takes the next one in turn. */
.slide.drift-0 { animation: drift-0 var(--drift) linear both; }
.slide.drift-1 { animation: drift-1 var(--drift) linear both; }
.slide.drift-2 { animation: drift-2 var(--drift) linear both; }
.slide.drift-3 { animation: drift-3 var(--drift) linear both; }

@keyframes drift-0 { from { transform: scale(1.04) translate(0, 0); }      to { transform: scale(1.16) translate(-2%, -1.5%); } }
@keyframes drift-1 { from { transform: scale(1.16) translate(2%, 1%); }    to { transform: scale(1.04) translate(0, 0); } }
@keyframes drift-2 { from { transform: scale(1.06) translate(2%, -1%); }   to { transform: scale(1.15) translate(-1.5%, 1%); } }
@keyframes drift-3 { from { transform: scale(1.15) translate(-2%, 1.5%); } to { transform: scale(1.05) translate(1%, -0.5%); } }

/* Darkens the lower left so the text reads on bright snow. It also covers the
   whole screen above the photos, so right-click, long-press and drag reach
   this layer rather than a photo. */
.shade {
  position: fixed;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to top, rgba(5, 8, 12, 0.72) 0%, rgba(5, 8, 12, 0.25) 38%, rgba(5, 8, 12, 0) 60%),
    linear-gradient(to right, rgba(5, 8, 12, 0.35) 0%, rgba(5, 8, 12, 0) 55%);
}

/* Name and note */

main {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 3;
  padding: clamp(1.75rem, 6vw, 5rem);
  max-width: 52rem;
  animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) 0.3s both;
}

h1 {
  font-family: "Manrope", var(--system);
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  line-height: 1.05;
  color: var(--ink);
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.18);
}

/* A short hairline between name and note. */
p::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 1px;
  margin-bottom: clamp(0.9rem, 1.6vw, 1.25rem);
  background: var(--ink);
  opacity: 0.7;
}

p {
  margin-top: clamp(1.1rem, 2vw, 1.75rem);
  font-family: "Jost", var(--system);
  font-size: clamp(0.7rem, 0.95vw, 0.85rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--ink);
  opacity: 0.85;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Pause/play: a hairline glyph, no fill or border, level with the note line. */
.pause {
  position: fixed;
  right: clamp(1rem, 5vw, 4.25rem);
  bottom: calc(clamp(1.75rem, 6vw, 5rem) - 0.95rem);
  z-index: 4;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.4s ease;
  -webkit-tap-highlight-color: transparent;
}
.pause[hidden] { display: none; }
.pause:hover { opacity: 0.85; }
.pause:focus { outline: none; }
.pause:focus-visible { opacity: 0.85; outline: 1px solid currentColor; outline-offset: -4px; border-radius: 50%; }
.pause svg { width: 11px; height: 11px; overflow: visible; }
.pause .icon-play { display: none; }
.pause[aria-pressed="true"] .icon-pause { display: none; }
.pause[aria-pressed="true"] .icon-play { display: inline; }

/* Reduced motion: one still photo, no drift, no slideshow (the script also stops advancing). */
@media (prefers-reduced-motion: reduce) {
  .slide, main { animation: none !important; }
  .slide { transition: none; }
  .pause { display: none; }
}
