/* adriandrotar.com: a film's opening title card inside a camera viewfinder.
   Colorway "Sal" (Cape Verde): deep Atlantic teal, turquoise accent, a coral light leak; sand in light mode.
   Texture: film grain (canvas, site.js), a slow light leak and a vignette, all behind the content. */
/* Fonts are served from this site (no Google request, so no visitor IPs leave it). Latin subsets, SIL Open Font License. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/instrument-sans-500.woff2") format("woff2") }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("/fonts/jetbrains-mono.woff2") format("woff2") }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap; src: url("/fonts/jost-300.woff2") format("woff2") }

:root {
  --bg: #f3efe6; --fg: #08303d; --muted: #4e6f74; --line: rgba(8,48,61,.16); --accent: #0f9a88; --leak: #f4c2a3;
  --grain: .10; --leak-blend: multiply; --leak-op: .5; --glow: transparent;
  --body: "Instrument Sans", "Helvetica Neue", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --credit: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06222e; --fg: #e8f4f3; --muted: #85a9ad; --line: rgba(232,244,243,.16); --accent: #36e0c8; --leak: #e8906a;
    --grain: .07; --leak-blend: screen; --leak-op: .42; --glow: rgba(232,244,243,.18);
    color-scheme: dark;
  }
}

* { box-sizing: border-box }
html { background: var(--bg) }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 400 18px/1.6 var(--body);
  min-height: 100vh; min-height: 100svh; overflow-x: hidden;
  padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(20px, env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto;
}

.leaks, .vignette, #grain { position: fixed; inset: 0; pointer-events: none }
.leaks { z-index: 0; overflow: hidden }
.leaks i { position: absolute; border-radius: 50%; filter: blur(100px); opacity: var(--leak-op); mix-blend-mode: var(--leak-blend) }
.leaks i:nth-child(1) { width: 52vmax; height: 30vmax; left: -16vmax; top: -16vmax; background: var(--leak) }
.leaks i:nth-child(2) { width: 42vmax; height: 26vmax; right: -16vmax; bottom: -12vmax; background: var(--accent); opacity: .22 }
.vignette { z-index: 1; background: radial-gradient(120% 90% at 50% 45%, transparent 55%, color-mix(in srgb, var(--bg) 85%, #000) 100%) }
#grain { z-index: 3; width: 100%; height: 100%; opacity: var(--grain); mix-blend-mode: overlay }
.bar, main { position: relative; z-index: 2 }
main, .finder, .finder > * { min-width: 0 }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 20px;
  font: 400 12px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted) }
.mark { display: inline-flex; line-height: 0; color: var(--fg) }
.mark svg { height: 34px; width: auto }

/* the viewfinder frame and its readouts, around a centred title card */
main { display: grid; align-content: center; padding-block: clamp(12px, 3vw, 40px) }
.finder { position: relative; padding: clamp(56px, 7vw, 88px) clamp(22px, 5vw, 76px); display: grid; grid-template-columns: minmax(0, 1fr);
  justify-items: center; align-content: center; text-align: center; gap: 30px; min-height: min(72vh, 660px) }
.corner { position: absolute; width: 26px; height: 26px; border: 0 solid var(--fg); opacity: .55 }
.corner.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px }
.corner.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px }
.corner.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px }
.readout { position: absolute; font: 500 11px/1 var(--mono); letter-spacing: .18em; color: color-mix(in srgb, var(--fg) 62%, transparent); text-transform: uppercase }
.readout.top { top: 10px; left: 40px; display: inline-flex; align-items: center; gap: 8px; color: var(--fg) }
.readout.top::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 2.4s steps(1) infinite }
.readout.right { top: 10px; right: 40px }
.readout.bottom { bottom: 10px; right: 40px; font-variant-numeric: tabular-nums }
@keyframes blink { 50% { opacity: .15 } }

h1 { margin: 0 -.34em 0 0; font: 300 clamp(30px, 6.2vw, 84px)/1.15 var(--credit); letter-spacing: .34em; text-transform: uppercase;
  display: flex; flex-wrap: wrap; justify-content: center; column-gap: .55em }
h1 span { display: inline-block; text-shadow: 0 0 30px var(--glow) }
.rule { width: 56px; height: 2px; background: var(--accent); border: 0; margin: 0 }
.lede { margin: 0; max-width: 40ch; font: 500 clamp(18px, 2vw, 23px)/1.45 var(--body); color: var(--fg); text-wrap: balance }

.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 30px }
.mail { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; min-width: 0 }
.mail a { font: 500 clamp(17px, 2vw, 21px)/1.3 var(--mono); color: var(--fg); text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 3px; overflow-wrap: anywhere }
.mail a:hover { color: var(--accent) }
button { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; cursor: pointer }
button:hover { color: var(--fg); border-color: var(--muted) }
.gh { font: 500 15px var(--body); color: var(--muted); text-decoration: none } .gh:hover { color: var(--fg) }
.gh::after { content: " ↗"; color: var(--accent) }
.soon { margin: 0; font: 400 13.5px/1.6 var(--mono); letter-spacing: .06em; color: var(--muted); max-width: 62ch; text-wrap: balance }
.soon::before { content: "▸"; color: var(--accent); margin-right: 10px }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px }

/* one orchestrated moment: the name pulls into focus like an opening title */
@media (prefers-reduced-motion: no-preference) {
  .rule, .lede, .contact, .soon { animation: up 1s cubic-bezier(.2,.7,.2,1) both }
  h1 span { animation: credit 2.2s cubic-bezier(.2,.7,.2,1) both }
  h1 span + span { animation-delay: .25s }
  .rule { animation: draw 1.2s .7s cubic-bezier(.2,.7,.2,1) both }
  .lede { animation-delay: .9s } .contact { animation-delay: 1.05s } .soon { animation-delay: 1.2s }
  .corner, .readout { animation: fade 1.4s both }
  .readout.top { animation: fade 1.4s both, blink 2.4s steps(1) 1.4s infinite }
  .leaks i:nth-child(1) { animation: drift 26s ease-in-out infinite alternate }
  .leaks i:nth-child(2) { animation: drift 34s ease-in-out infinite alternate-reverse }
  @keyframes credit { from { opacity: .001; transform: scale(1.06); filter: blur(8px) } }
  @keyframes draw { from { transform: scaleX(0) } }
  @keyframes up { from { opacity: .001; transform: translateY(16px) } }
  @keyframes fade { from { opacity: 0 } }
  @keyframes drift { to { transform: translate(14vmax, 8vmax) scale(1.15) } }
}
@media (max-width: 560px) {
  body { font-size: 17px }
  .readout.right, .readout.bottom { display: none }
  .readout.top { left: 34px }
  .finder { padding-inline: 18px }
  .mail a { font-size: 16px }
  .soon { font-size: 12.5px }
}
