/*
 * Article of Faith — the page on hjarven.com.
 *
 * The Article of Faith tab of AAR Labs, class for class: its Tailwind
 * classes and the app's tokens (style.css, tailwind.config.js) written out as
 * plain CSS. The fonts are the app's own, self-hosted (SIL OFL): Exo 2 for the
 * headline, IBM Plex Sans for everything else. Only the phone rules at the end
 * are the site's own.
 */

/* Exo 2 — italic, latin (variable 100–900) */
@font-face {
  font-family: 'Exo 2';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/exo2-italic-latin.398cd201.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;
}
/* IBM Plex Sans — normal, latin (one variable file serves the app's 300–700) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin.d8b4e62d.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;
}

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

:root {
  color-scheme: dark;
  --navy: #010409;
  --paper: #f3ead2;
  --accent-blue: #3e72ff;
  --zinc-200: #e4e4e7;
  --zinc-400: #a1a1aa;
  --zinc-500: #8a8f99;
  --cyan-400: #22d3ee;
}

html {
  background-color: var(--navy);
  color: #e6edf3;
}

body {
  margin: 0;
  color: #e6edf3;
  background: var(--navy);
  font-family:
    'IBM Plex Sans',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* The app's grain, over everything. */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.16;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='discrete' tableValues='0 0.1 0.4 0.5 0.9 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

img,
svg,
video {
  display: block;
}

button {
  font: inherit;
  color: inherit;
  margin: 0;
  background: none;
  cursor: pointer;
  line-height: inherit;
}

/* ───────────────────────────────────────────── the film */

.aof-film {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  container-type: inline-size;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  /* [site] the lens owns a finger's drag; the page does not scroll. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.aof-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}

/* The map lies a little dim under the shade; the truth carries its own grade. */
.aof-map {
  filter: brightness(0.7) saturate(0.85);
}

.aof-truth,
.aof-dip,
.aof-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Dark edges, and a pool of dark low on the left under the words. */
.aof-shade {
  background:
    radial-gradient(ellipse 72% 78% at 56% 44%, rgba(1, 4, 9, 0) 38%, rgba(1, 4, 9, 0.8) 100%),
    radial-gradient(
      ellipse 960px 500px at 0 100%,
      rgba(1, 4, 9, 0.82) 0%,
      rgba(1, 4, 9, 0.66) 35%,
      rgba(1, 4, 9, 0.34) 65%,
      rgba(1, 4, 9, 0) 100%
    );
}

/* The lens's ring and the words engraved into it. */
.aof-rim {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.aof-rim-words {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  paint-order: stroke;
}

.aof-hint {
  position: absolute;
  z-index: 3;
  white-space: nowrap;
  pointer-events: none;
  border-radius: 6px;
  background: rgba(1, 4, 9, 0.6);
  padding: 4px 10px;
  font-size: 12.5px;
  color: var(--zinc-200);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

/* The app's label: small spaced capitals. */
.aof-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--zinc-500);
}

/* ───────────────────────────────────────────── the words */

.aof-copy {
  position: absolute;
  bottom: 36px;
  left: 36px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.aof-headline {
  margin: 0;
  font-family: 'Exo 2', sans-serif;
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
}

.aof-dateline {
  margin-top: 6px;
  margin-bottom: 20px;
  color: rgba(243, 234, 210, 0.7);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.aof-logo {
  margin-top: 8px;
  width: 220px;
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.6));
}

.aof-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* The page's one call to action: the filled accent blue, its arrow saying it leaves. */
.aof-cta {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--accent-blue);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  outline: none;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.aof-cta:hover {
  background: #5583ff;
}
.aof-cta:focus-visible,
.aof-chip:focus-visible,
.aof-close:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 2px;
}
.aof-cta svg {
  width: 13px;
  height: 13px;
}

.aof-ask {
  font-size: 12px;
  line-height: 1.4;
  color: var(--zinc-400);
}

.aof-chip {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(1, 4, 9, 0.55);
  padding: 0 11px 0 9px;
  color: var(--zinc-200);
  outline: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.aof-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}
.aof-chip svg {
  width: 10px;
  height: 10px;
}
.aof-dur {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 400;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
  color: var(--zinc-400);
}

/* Whose photograph is under the lens. */
.aof-credit {
  position: absolute;
  bottom: 8px;
  right: 14px;
  z-index: 4;
  pointer-events: none;
  font-size: 10.5px;
  letter-spacing: 0.025em;
  color: rgba(138, 143, 153, 0.7);
}

@container (max-width: 1300px) {
  .aof-headline {
    font-size: 21px;
  }
  .aof-logo {
    width: 200px;
  }
}

/* ───────────────────────────────────────────── the trailer [site] */

.aof-trailer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(1, 4, 9, 0.94);
  padding: 56px 16px 24px;
}
.aof-trailer[hidden] {
  display: none;
}
.aof-trailer video {
  width: min(92vw, calc((100vh - 110px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
}
.aof-trailer[data-portrait] video {
  width: min(100%, calc((100dvh - 110px) * 4 / 5));
  aspect-ratio: 4 / 5;
}
.aof-close {
  position: absolute;
  right: 14px;
  top: 14px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(1, 4, 9, 0.55);
  color: var(--zinc-200);
  outline: none;
}
.aof-close:hover {
  background: rgba(255, 255, 255, 0.1);
}
.aof-close svg {
  width: 14px;
  height: 14px;
}

/* ───────────────────────────────────────────── phones [site]
 * Same elements, same words. Type a step up so it reads at arm's length, the
 * button a thumb's size, everything clear of the notch and the home bar.
 */

@media (max-width: 600px) {
  .aof-copy {
    left: calc(20px + env(safe-area-inset-left));
    right: calc(20px + env(safe-area-inset-right));
    bottom: calc(30px + env(safe-area-inset-bottom));
  }
  .aof-headline {
    font-size: 22px;
  }
  .aof-label {
    font-size: 11.5px;
  }
  .aof-dateline {
    margin-bottom: 16px;
  }
  .aof-logo {
    width: 190px;
  }
  .aof-row {
    gap: 10px;
  }
  .aof-cta {
    height: 46px;
    padding: 0 20px;
    font-size: 15px;
    gap: 8px;
  }
  .aof-cta svg {
    width: 15px;
    height: 15px;
  }
  .aof-ask {
    font-size: 13px;
  }
  .aof-chip {
    top: calc(12px + env(safe-area-inset-top));
    right: calc(12px + env(safe-area-inset-right));
    height: 34px;
    padding: 0 12px 0 10px;
  }
  .aof-hint {
    font-size: 13.5px;
    padding: 5px 11px;
  }
  .aof-credit {
    bottom: calc(8px + env(safe-area-inset-bottom));
    right: calc(12px + env(safe-area-inset-right));
  }
  .aof-close {
    top: calc(12px + env(safe-area-inset-top));
    width: 40px;
    height: 40px;
  }
}

/* A phone on its side: the words step down so the map shows above them. */
@media (max-height: 500px) and (orientation: landscape) {
  .aof-copy {
    left: calc(24px + env(safe-area-inset-left));
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .aof-headline {
    font-size: 18px;
  }
  .aof-dateline {
    margin-bottom: 8px;
  }
  .aof-logo {
    margin-top: 4px;
    width: 140px;
  }
  .aof-row {
    margin-top: 10px;
  }
  .aof-cta {
    height: 40px;
  }
  .aof-trailer {
    padding: 12px 64px;
  }
  .aof-trailer video {
    width: min(100%, calc((100dvh - 24px) * 16 / 9));
  }
}
