/* Devin Cardona: shared styles for every page (colors, type, content column, corners, footer).
 Page-specific styles live in each page's own <style> block. */

:root {
  --bg: #fff;      /* page background, also the intro's backdrop */
  --ink: #111;     /* text and the final wordmark color */
  --fill: #e5e5e5;    /* the grey the letters pass through in the intro */
  --guide: #bbb;   /* intro construction lines and letter outlines */
  --mute: #888;    /* the active item in a list */
  --rule: var(--guide);    /* dividers and thin lines */
  --tile: #f0f0f0;    /* client logo tiles */
  --largeph: #434343; /* image placeholders */
  --ph: #434343;      /* image placeholders */

  --wrap: 1000px;     /* content width */
  --gutter: 24px;     /* side padding once the screen is narrower than the content */
  --corner: 40px;     /* distance of the Scroll cue and menu from the screen edges */

  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-display: clamp(44px, 9.4vw, 94px);   /* headline */
  --t-list: clamp(36px, 6.2vw, 62px);      /* What I do and work filter lists */
  --t-body: clamp(20px, 3vw, 30px);        /* paragraphs, descriptions, project names */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }   /* locking scroll during the intro won't shift the layout */
html, body { background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;}
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* Small text */
.mono { font-family: var(--mono); font-size: 16px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; }
.mono--s { font-size: 14px; }
.mono--xs { font-size: 12px; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }

/* Content column: 1000px wide, centered */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Spacer: <div class="spacer"></div> adds 40px of space wherever you need it.
   For a different amount: <div class="spacer" style="--space: 80px"></div>. It shrinks a little on phones. */
.spacer { height: var(--space, 40px); }
@media (max-width: 640px) { .spacer { height: calc(var(--space, 40px) * 0.6); } }
/* ---------- Corners: Scroll cue and menu, pinned to the screen edges ---------- */
.corner { position: fixed; z-index: 65; color: #fff; mix-blend-mode: difference; }   /* reads black on white, white on dark images */
.corner--scroll { top: 36px; left: calc(var(--corner) - 10px); pointer-events: none; }
.corner--menu { top: 26px; right: var(--corner); }
.cue { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cue__text { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; line-height: 1; }
.cue__line { position: relative; width: 1px; height: 111px; background: #444; overflow: hidden; }
.cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(-100%);
  animation: cue 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes cue { 0% { transform: translateY(-100%); } 55%, 100% { transform: translateY(100%); } }
.menu { display: flex; align-items: flex-start;    flex-direction: column; }
.menu a { text-decoration: none; padding: 6px 0; text-decoration:underline;text-underline-offset: 3px;}
.menu a:hover { text-decoration: underline; }
.menu span { margin: 0 14px; }
.menu a.nos{ position: fixed; bottom: 30px;right: 30px;}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 22px 0 19px; text-align: center; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) { :root { --corner: 24px; } }
@media (max-width: 640px) {
  :root { --corner: 16px; --gutter: 20px; }
  .mono { font-size: 14px; }
  .mono--s { font-size: 12px; }
  .mono--xs {font-size: 11px;}
  .corner--menu { top: 16px; }
  .menu span { margin: 0 8px; }
  .corner--scroll { top: 24px; left: 12px; }
  .cue__line { height: 64px; }
  .menu {padding-right: 0;}
  .menu a.nos {display:none;}
}
@media (prefers-reduced-motion: reduce) {
  .cue__line::after { animation: none; transform: none; opacity: 0; }
}

/* ---------- Page transition: a wipe between pages ----------
   Nothing moves: an edge in the wipe color sweeps up over the old page, then sweeps on up to uncover
   the new one, like a single panel passing. Browsers with View Transitions between pages (Chrome,
   Edge, Safari) do it here; others get the same look from a panel (see site.js). */
:root {
  --wipe: #000000;                                    /* color revealed between pages */
  --wipe-out: 600ms cubic-bezier(0.75, 0, 0.25, 1);   /* covering the old page */
  --wipe-in: 600ms cubic-bezier(0.27, 0, 0.51, 1);    /* uncovering the new page */
  --wipe-gap: 500ms;                                  /* the uncovering starts this long after the covering begins */
}
@view-transition { navigation: auto; }
::view-transition { background: var(--wipe); }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-old(root) { animation: page-cover var(--wipe-out) both; }
::view-transition-new(root) { animation: page-uncover var(--wipe-in) var(--wipe-gap) both; }
@keyframes page-cover { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }     /* old page's bottom edge sweeps up */
@keyframes page-uncover { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }  /* new page uncovered from the bottom up */
/* Going back (a Back link, or the browser's back button) plays it in reverse: top to bottom. */
html.wipe-back::view-transition-old(root) { animation-name: page-cover-back; }
html.wipe-back::view-transition-new(root) { animation-name: page-uncover-back; }
@keyframes page-cover-back { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(100% 0 0 0); } }   /* old page's top edge sweeps down */
@keyframes page-uncover-back { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } } /* new page uncovered from the top down */

/* Fallback panel */
html.wipe-cover::before, html.wipe-reveal::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--wipe);
  pointer-events: none;
}
html.wipe-cover::before { animation: panel-cover var(--wipe-out) both; }
html.wipe-reveal::before { animation: panel-reveal var(--wipe-in) 120ms both; }
html.wipe-hold::before { animation-play-state: paused; }   /* held while the page lands on a section */
@keyframes panel-cover { from { transform: translateY(100%); } }
@keyframes panel-reveal { to { transform: translateY(-100%); } }
html.wipe-back.wipe-cover::before { animation-name: panel-cover-back; }
html.wipe-back.wipe-reveal::before { animation-name: panel-reveal-back; }
@keyframes panel-cover-back { from { transform: translateY(-100%); } }
@keyframes panel-reveal-back { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html.wipe-cover::before, html.wipe-reveal::before { display: none; }
}
