/* tobihussey.com
   Dark, precise, quiet. One loud thing per screen.
   Colours and fonts live in :root - change them there. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #0b0b0b;
  --bg-2: #131313;
  --ink: #f2f0eb;
  --ink-2: #b4b2ac;
  --muted: #76746f;
  --rule: #242424;
  --accent: #e3262b;          /* one accent only: live dots, the seconds tick */

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1320px;
  --gutter: clamp(20px, 5vw, 64px);
  --sec: clamp(96px, 16vh, 180px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.display {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 300;
  text-transform: uppercase;
  line-height: .98;
  letter-spacing: .01em;
  margin: 0;
}

.label {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin: 0 0 clamp(36px, 6vh, 64px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.label > span:first-child { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.label::after { content: ""; flex: 1; height: 1px; background: var(--rule); align-self: center; }

.kicker {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn--ghost:hover { border-color: var(--ink-2); opacity: 1; }

/* ---------- Top bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  padding-top: max(18px, env(safe-area-inset-top));
  transition: background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.bar.is-solid {
  background: rgba(11, 11, 11, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-color: var(--rule);
}
.bar__mark { font-family: var(--display); font-stretch: 125%; font-weight: 300; font-size: 20px; letter-spacing: .12em; }

.icons { display: flex; gap: 6px; }
.icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--ink-2);
  transition: color .2s, background .2s;
}
.icon:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.icon svg, .chip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon svg .fill, .chip svg .fill { fill: currentColor; stroke: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}
.hero__sky { position: absolute; inset: 0; z-index: -4; }
.hero__sky::before {
  /* slow moving light, the stand-in until a photo is added */
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 55% at 30% 40%, rgba(255, 255, 255, .09), transparent 70%),
    radial-gradient(35% 45% at 75% 65%, rgba(227, 38, 43, .07), transparent 70%);
  animation: drift 18s var(--ease) infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1); }
  to   { transform: translate3d(5%, 3%, 0) scale(1.12); }
}
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -4; filter: brightness(.5) contrast(1.05) saturate(.9); }
.hero.has-photo .hero__sky { display: none; }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  opacity: .08; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,11,11,.55) 0%, rgba(11,11,11,0) 28%, rgba(11,11,11,0) 55%, rgba(11,11,11,.9) 100%);
}
.hero__inner { padding-bottom: clamp(40px, 9vh, 96px); }
.hero__name {
  margin: 0;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 200;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: .04em;
  font-size: var(--fit, clamp(56px, 15vw, 240px));
}
.hero__name span { display: block; width: max-content; }

.hero__sponsor { display: inline-flex; align-items: center; gap: 16px; margin-top: clamp(24px, 4vh, 40px); opacity: .9; transition: opacity .2s; }
.hero__sponsor:hover { opacity: 1; }
.hero__sponsor span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero__sponsor img { width: clamp(110px, 11vw, 150px); height: auto; }

.js .hero__name span { clip-path: inset(0 0 100% 0); transform: translateY(.25em); }
.js.is-ready .hero__name span {
  clip-path: inset(-5% -5% -10% -5%);
  transform: none;
  transition: clip-path 1.1s var(--ease), transform 1.1s var(--ease);
}
.js.is-ready .hero__name span + span { transition-delay: .12s; }

/* ---------- Sections ---------- */

.sec { padding-top: var(--sec); }

/* Nationals */
.countdown__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: clamp(32px, 5vh, 56px); }
.countdown__title { font-size: clamp(30px, 4.6vw, 64px); max-width: 16ch; }
.countdown__meta { margin: 0; color: var(--ink-2); font-size: 15px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

.clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.clock__cell { padding: clamp(18px, 3vw, 32px) 0; display: flex; flex-direction: column; gap: 10px; }
.clock__cell + .clock__cell { border-left: 1px solid var(--rule); padding-left: clamp(14px, 2.4vw, 32px); }
.clock__num {
  font-family: var(--display); font-stretch: 125%; font-weight: 200;
  font-size: clamp(44px, 7.6vw, 116px); line-height: .9;
  font-variant-numeric: tabular-nums;
}
.clock__unit { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.clock__cell--sec .clock__num { color: var(--ink-2); transition: color .6s var(--ease); }
.clock__cell--sec.tick .clock__num { color: var(--accent); transition: none; }

.sessions { display: flex; align-items: center; gap: 22px; padding: clamp(24px, 4vh, 40px) 0; }
.sessions__num { font-size: clamp(56px, 7.6vw, 116px); font-weight: 200; font-variant-numeric: tabular-nums; }
.sessions__text { font-size: 18px; line-height: 1.35; }
.sessions__text .muted { font-size: 14px; }
.countdown__done { font-size: clamp(44px, 7.6vw, 116px); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: clamp(40px, 7vh, 72px) 0 0; border-top: 1px solid var(--rule); }
.stat { padding: clamp(20px, 3vw, 32px) 0; }
.stat + .stat { border-left: 1px solid var(--rule); padding-left: clamp(14px, 2.4vw, 32px); }
.stat dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.stat dd { margin: 0; font-size: clamp(48px, 7.6vw, 116px); font-weight: 200; }
.stat dd small { font-size: .32em; margin-left: .12em; color: var(--ink-2); letter-spacing: .02em; }
.lifting__links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0 0; }
.mini-sponsor { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; opacity: .85; transition: opacity .2s; }
.mini-sponsor:hover { opacity: 1; }
.mini-sponsor span { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.mini-sponsor img { width: 110px; height: auto; }

.photo { margin: clamp(48px, 8vh, 88px) 0 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--rule); }
.photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }

.yt { position: relative; margin-top: clamp(48px, 8vh, 88px); aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--rule); background: var(--bg-2); }
.yt button { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; }
.yt button img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt button span { box-shadow: 0 10px 40px rgba(0, 0, 0, .5); transition: transform .3s var(--ease); }
.yt button:hover span { transform: scale(1.06); }
.yt button span { position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.yt button span::after { content: ""; border-left: 22px solid var(--bg); border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Sponsor: the one light band on the page */
.sponsor {
  margin-top: var(--sec);
  padding: clamp(72px, 12vh, 140px) 0;
  background: var(--ink);
  color: var(--bg);
}
.sponsor .label { color: #8a877f; }
.sponsor .label > span:first-child { color: #4a4843; }
.sponsor .label::after { background: rgba(0, 0, 0, .14); }
.sponsor__kicker { margin: 0 0 18px; text-align: center; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: #6b6862; }
.sponsor__logo { display: block; width: min(100%, 720px); margin-inline: auto; }
.sponsor__logo img { width: 100%; height: auto; }
.sponsor__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; margin-top: clamp(32px, 5vh, 56px); padding-top: 22px; border-top: 1px solid rgba(0, 0, 0, .14); }
.sponsor__foot p { margin: 0; font-size: clamp(17px, 1.5vw, 20px); color: #3d3b37; }
.sponsor__links { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.sponsor .btn { background: var(--bg); color: var(--ink); }
.sponsor .btn--ghost { background: transparent; color: var(--bg); border-color: rgba(0, 0, 0, .25); }
.sponsor .btn--ghost:hover { border-color: var(--bg); }

/* Businesses */
.projects { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(72px, 12vh, 140px); }
.project { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; scroll-margin-top: 100px; }
.project--compact { grid-template-columns: 1fr; }
.project__index { font-size: 12px; letter-spacing: .18em; color: var(--muted); font-variant-numeric: tabular-nums; }
.project__name { font-size: clamp(30px, 3.6vw, 56px); margin: 14px 0 18px; }
.project__line { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.35; margin: 0 0 10px; max-width: 28ch; }
.project__detail { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.project__foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.status { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); padding: 8px 14px 8px 12px; border: 1px solid var(--rule); border-radius: 999px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); }
.status--live::before, .status--early::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(227, 38, 43, .16); animation: pulse 2.4s ease-in-out infinite; }
.status--closed { color: var(--muted); }
.status--closed::before { background: transparent; border: 1px solid var(--muted); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(227, 38, 43, 0); } }

/* Live mini window */
.frame {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9);
  transition: border-color .3s var(--ease);
}
.frame:hover { border-color: #3a3a3a; }
.frame__bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.frame__dots { display: flex; gap: 6px; }
.frame__dots i { width: 8px; height: 8px; border-radius: 50%; background: #2c2c2c; }
.frame__url { flex: 1; text-align: center; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame__open { color: var(--ink-2); }
.frame__open:hover { color: var(--ink); }
.frame__view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0f0f0f; }
.frame__view iframe {
  position: absolute; top: 0; left: 0;
  width: 1440px; height: 900px;
  border: 0;
  transform: scale(var(--s, .5));
  transform-origin: 0 0;
  background: #fff;
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.frame__view iframe.is-loaded { opacity: 1; }
.frame__view img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* The preview is for looking; clicking anywhere opens the real site */
.frame__view iframe { pointer-events: none; }
.frame__link {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 22px;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 11, 11, .55));
  opacity: 0; transition: opacity .35s var(--ease);
}
.frame__link span {
  font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  transform: translateY(8px); transition: transform .35s var(--ease);
}
.frame:hover .frame__link, .frame__link:focus-visible { opacity: 1; }
.frame:hover .frame__link span, .frame__link:focus-visible span { transform: none; }
@media (hover: none) {
  .frame__link { opacity: 1; background: linear-gradient(180deg, transparent 70%, rgba(11, 11, 11, .45)); }
  .frame__link span { transform: none; font-size: 13px; padding: 8px 14px; }
}
.frame__empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg-2);
}
.frame__empty span { font-family: var(--display); font-stretch: 125%; font-weight: 200; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(22px, 3vw, 44px); color: rgba(255, 255, 255, .14); }

/* St Michael's: lit by its own window */
.church {
  position: relative;
  margin-top: var(--sec);
  padding: var(--sec) 0;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.church__glow {
  position: absolute; inset: -10%; z-index: -2;
  background: url("/media/st-michael-window.webp") 70% 50% / cover no-repeat;
  filter: blur(90px) saturate(1.7);
  opacity: .34;
  transform: scale(1.15);
}
.church::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 80% at 75% 50%, transparent 0%, rgba(11, 11, 11, .55) 60%, var(--bg) 100%);
}
.church__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.church__title { font-size: clamp(40px, 6.4vw, 104px); margin-bottom: clamp(28px, 5vh, 48px); }
.church__copy p { margin: 0 0 16px; color: var(--ink-2); max-width: 40ch; }
.church__copy .big { font-size: clamp(20px, 1.9vw, 25px); line-height: 1.35; color: var(--ink); }
.church__links { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 12px; }

.window {
  margin: 0;
  justify-self: end;
  width: min(100%, 400px);
  border-radius: 50% 50% 14px 14px / 24% 24% 14px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 0 140px rgba(90, 150, 255, .16), 0 0 60px rgba(255, 190, 90, .1), 0 50px 90px -40px #000;
}
.window img { width: 100%; height: auto; }

/* University */
.uni__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: clamp(32px, 5vh, 56px); }
.uni__title { font-size: clamp(30px, 4.6vw, 64px); }
.clock--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.unis { list-style: none; margin: clamp(32px, 6vh, 64px) 0 0; padding: 0; counter-reset: u; }
.unis li {
  counter-increment: u;
  display: flex; align-items: baseline; gap: 20px;
  padding: clamp(14px, 2.4vh, 22px) 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display); font-stretch: 125%; font-weight: 300;
  text-transform: uppercase; letter-spacing: .02em;
  font-size: clamp(26px, 3.6vw, 52px); line-height: 1;
}
.unis li::before { content: counter(u, decimal-leading-zero); font-family: var(--body); font-stretch: 100%; font-size: 12px; letter-spacing: .18em; color: var(--muted); }
.uni__course { margin: 18px 0 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Contact */
.contact { padding-bottom: clamp(80px, 14vh, 160px); }
.contact__title { font-size: clamp(40px, 7vw, 112px); margin-bottom: 28px; }
.contact__email {
  display: inline-block;
  font-size: 18px;
  color: var(--ink-2);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
  transition: color .2s, border-color .2s;
}
.contact__email:hover { color: var(--ink); border-color: var(--ink); }
.contact__icons { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 36px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border: 1px solid var(--rule); border-radius: 999px; font-size: 15px; color: var(--ink-2); transition: color .2s, border-color .2s; }
.chip:hover { color: var(--ink); border-color: var(--ink-2); }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; padding-bottom: max(32px, env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.foot a:hover { color: var(--ink); }

/* ---------- Reveal on scroll ---------- */

.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js .hero__name span, .js.is-ready .hero__name span { clip-path: none; transform: none; transition: none; }
  .hero__sky::before, .status::before { animation: none; }
}

/* ---------- Phones ---------- */

@media (max-width: 820px) {
  body { font-size: 16px; }
  .project { grid-template-columns: 1fr; }
  .project .frame { order: -1; }
  .church__grid { grid-template-columns: 1fr; }
  .window { justify-self: center; width: min(78%, 340px); }
}
@media (max-width: 560px) {
  .mini-sponsor { margin-left: 0; width: 100%; padding-top: 8px; }
  .clock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock__cell:nth-child(3) { border-left: 0; padding-left: 0; }
  .clock__cell:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .icon { width: 38px; height: 38px; }
  .kicker { font-size: 11px; letter-spacing: .14em; }
  .clock--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clock--3 .clock__cell:nth-child(3) { border-left: 1px solid var(--rule); padding-left: clamp(14px, 2.4vw, 32px); }
  .clock--3 .clock__cell:nth-child(n+3) { border-top: 0; }
}
