/* ajdigitalcapital.com | one screen: the lockup at poster scale, paper field, charcoal type.
   No inline styles or scripts anywhere: the Content-Security-Policy in _headers forbids them.
   contrast: type and ink on field 15.6:1, sheet text on charcoal 15.6:1 */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url(/fonts/dm-sans-latin.woff2) format('woff2');
}

:root {
  --field: #F4F2EE;
  --type: #1C1917;
  --ink: #1C1917;
  --focus: #1C1917;
  --sheet-bg: #1C1917;
  --sheet-ink: #F4F2EE;
  --fs: min(60dvh, 36.5vw); /* size of the "AJ" mark; everything in the lockup is a share of it */
  --font: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 2.6vw, 40px);
  --edge-y: clamp(14px, 2.6vh, 28px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-std: cubic-bezier(.2, 0, 0, 1);
  --ease-exit: cubic-bezier(.3, 0, 1, 1);
  --t-quick: 140ms;
  --t-std: 260ms;
  --t-reveal: 900ms;
}

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

html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--field);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: 3px; }

/* Stage: one screen with the lockup in the middle and the edges round it */

.stage {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  overflow: hidden;
}

.lockup { position: relative; }

.poster {
  display: flex; align-items: baseline; gap: calc(var(--fs) * .06);
  margin: 0;
  color: var(--type);
  font-weight: 900;
  line-height: .8;
}

.line {
  display: block;
  white-space: nowrap;
  /* The clip box is wider than the line box so overshoot is never cut during the entrance. */
  clip-path: inset(-.14em -.6em -.3em -.6em);
}
.line > span { display: inline-block; }
.mark { font-size: var(--fs); letter-spacing: -.05em; }
.name { font-size: calc(var(--fs) * .2); letter-spacing: -.045em; }

/* The statement sits under the name and ends flush with it. */
.tag {
  position: absolute; right: 0; top: calc(100% + var(--fs) * .012);
  margin: 0;
  white-space: nowrap;
  color: var(--type);
  font-weight: 800;
  font-size: clamp(18px, calc(var(--fs) * .058), 40px);
  line-height: 1.02;
  letter-spacing: -.025em;
}

/* Portrait screens (phones, tablets held upright): the mark sits above the name. */
@media (max-aspect-ratio: 4/5) {
  :root { --fs: 62vw; }
  .poster { flex-direction: column; align-items: center; gap: calc(var(--fs) * .12); }
  .name { font-size: calc(var(--fs) * .213); }
  .tag {
    position: static;
    margin-top: calc(var(--fs) * .1);
    text-align: center;
    font-size: clamp(22px, 6vw, 46px);
  }
}

/* The 404 page uses the same stage with a single line. */
.lost { text-align: center; padding: 0 var(--gutter); }
.lost h1 { margin: 0; color: var(--type); font-weight: 900; font-size: clamp(44px, 9vw, 150px); line-height: .9; letter-spacing: -.05em; }
.lost p { margin: 1.2em 0 0; font-size: 18px; font-weight: 500; }
.lost a { text-underline-offset: .2em; }

/* Edges */

.edge {
  position: absolute; z-index: 3;
  margin: 0;
  font-size: 15px; font-weight: 500; line-height: 1.2;
  letter-spacing: -.005em;
  color: var(--ink);
}
.edge-legal { top: var(--edge-y); left: var(--gutter); padding: 12px 0; }
.edge-nav { top: var(--edge-y); right: var(--gutter); }
.edge-nav ul { display: flex; gap: clamp(14px, 2vw, 30px); margin: 0; padding: 0; list-style: none; }
.edge-foot {
  left: var(--gutter); right: var(--gutter); bottom: var(--edge-y);
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  pointer-events: none;
}
.edge-foot p { margin: 0; pointer-events: auto; }
.edge-foot .foot-mail a { padding: 12px 0; }

.edge a, .menu-btn {
  display: inline-block;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--t-quick) var(--ease-std), transform var(--t-quick) var(--ease-std);
}
.edge a:active, .menu-btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .edge a:hover, .menu-btn:hover { opacity: .62; }
}

.menu-btn {
  display: none;
  width: 48px; height: 48px;
  margin: -2px -13px 0 0; padding: 0;
  border: 0; background: none;
  align-items: center; justify-content: center;
}

@media (max-width: 899px) {
  .edge-nav ul { display: none; }
  .menu-btn { display: inline-flex; }
  .edge { font-size: 14px; }
}

/* Entrance. Hidden states apply only once JS is confirmed, so the page is complete without it. */

.js .line > span { transform: translateY(1.5em); }
.js .tag, .js .edge { opacity: 0; transform: translateY(14px); }

.js.is-ready .line > span {
  transform: none;
  transition: transform var(--t-reveal) var(--ease-out);
}
.js.is-ready .name > span { transition-delay: 110ms; }
.js.is-ready .tag, .js.is-ready .edge {
  opacity: 1; transform: none;
  transition: opacity 520ms var(--ease-std) 560ms, transform 620ms var(--ease-out) 560ms;
}
.js.is-ready .edge-foot { transition-delay: 660ms; }

/* Panels (same content and behaviour as the live site, restyled per variant) */

dialog.sheet {
  position: fixed; inset: 0 0 0 auto;
  width: min(560px, 100vw); height: 100dvh; max-height: none; max-width: none;
  margin: 0; padding: 0; border: 0;
  background: var(--sheet-bg); color: var(--sheet-ink);
  overflow: hidden;
  -webkit-user-select: text; user-select: text;
}
dialog.sheet::backdrop { background: rgb(0 0 0 / .46); }
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in 380ms var(--ease-out); }
dialog.sheet[open]::backdrop { animation: fade-in 260ms var(--ease-std); }
dialog.sheet.is-swap[open] { animation: none; }
dialog.sheet.is-closing { animation: sheet-out 200ms var(--ease-exit) forwards; }
dialog.sheet.is-closing::backdrop { animation: fade-out 200ms var(--ease-exit) forwards; }

@keyframes sheet-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes sheet-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

.sheet-grab { display: none; }
.sheet-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(20px, 4vw, 36px) 0;
  font-size: 15px; font-weight: 500;
}
.sheet-bar .label { opacity: .7; }
.sheet-bar .label b { font-weight: 500; }
.sheet-bar button {
  min-width: 48px; height: 48px; padding: 0;
  border: 0; background: none; color: inherit;
  font: inherit; cursor: pointer;
  transition: opacity var(--t-quick) var(--ease-std), transform var(--t-quick) var(--ease-std);
}
.sheet-bar button:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .sheet-bar button:hover { opacity: .62; } }
.sheet-bar .back { text-align: left; }
.sheet-bar .close { text-align: right; margin-left: auto; }

.sheet-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(20px, 5vh, 56px) clamp(20px, 4vw, 36px) 48px;
}
.sheet-body h2 {
  margin: 0 0 .5em;
  font-size: clamp(40px, 5.2vw, 68px); font-weight: 900; line-height: .9; letter-spacing: -.045em;
}
.sheet-body h3 { margin: 1.6em 0 .4em; font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.sheet-body p { margin: 0 0 1em; font-size: 17px; line-height: 1.55; max-width: 34em; }
.sheet-body strong { font-weight: 700; }
.sheet-body a { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: .08em; }
.contact-mail { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; }

.menu-list { margin: 0; padding: 0; list-style: none; }
.menu-list a {
  display: block; padding: .12em 0;
  font-size: clamp(44px, 13vw, 76px); font-weight: 900; line-height: .98; letter-spacing: -.045em;
  text-decoration: none;
}

@media (max-width: 899px) {
  dialog.sheet {
    inset: auto 0 0 0;
    width: 100%; height: auto; max-height: 88dvh;
    border-radius: 24px 24px 0 0;
  }
  dialog.sheet[open] { animation-name: sheet-up; }
  dialog.sheet.is-closing { animation-name: sheet-down; }
  .sheet-grab {
    display: block; flex: none;
    width: 44px; height: 5px; margin: 10px auto 0;
    border-radius: 3px; background: currentColor; opacity: .28;
  }
  .sheet-bar { padding-top: 2px; }
}

/* On wide screens the four links are always visible, so a panel needs no way back to the menu. */
@media (min-width: 900px) { .sheet-bar .back { display: none; } }

@media (max-width: 899px) {
  .edge-foot { flex-direction: column; align-items: flex-start; gap: 0; }
  .edge-foot .foot-mail a { padding: 10px 0 2px; }
}

/* Without JavaScript the links still work: the panel that the address points at is shown. */
.no-js dialog.sheet:target { display: flex; flex-direction: column; }
.no-js dialog.sheet:target .sheet-bar button { display: none; }

@media (prefers-reduced-motion: reduce) {
  .js .line > span, .js .tag, .js .edge { transform: none; opacity: 1; }
  .js.is-ready .line > span, .js.is-ready .tag, .js.is-ready .edge { transition: none; }
  dialog.sheet[open], dialog.sheet.is-closing,
  dialog.sheet[open]::backdrop, dialog.sheet.is-closing::backdrop { animation: none; }
  .edge a, .menu-btn, .sheet-bar button { transition: none; }
}
