/* Blue Lemon
   Colours taken from the logo itself: #0293C8, #FFF763, #2D9832, black linework.
   Light only, deliberately — the mark is drawn in black line on white, and there
   is no white-line variant of it to carry a dark page. */

:root {
  --paper:    #FCFBF8;
  --ink:      #111111;
  --ink-soft: #565B61;
  --blue:     #0293C8;   /* the logo blue, for graphic use */
  --blue-ink: #026B99;   /* darkened for text, so links stay readable */
  --yellow:   #FFF763;

  --gutter: clamp(1.5rem, 5vw, 5rem);

  /* direction the headline's relief is cast, driven by the light in type.js */
  --sx: 0.85px;
  --sy: 0.85px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 4px; }

/* ── header ─────────────────────────────────────────────── */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.9rem var(--gutter) 0;
  font-size: 0.92rem;
}
.wordmark { font-weight: 600; letter-spacing: -0.01em; }
.top a { color: var(--ink-soft); text-decoration: none; }
.top a:hover { color: var(--blue-ink); }

/* ── opening ────────────────────────────────────────────── */
.opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}
@media (min-width: 900px) {
  .opening { grid-template-columns: minmax(0, 1fr) minmax(0, 0.88fr); }
}

.opening__text { display: flex; flex-direction: column; gap: 1.6rem; }

h1 {
  margin: 0;
  max-width: 13ch;
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 45, "WONK" 1;
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.g { display: inline-block; }

.opening__text p {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.66;
}

/* The mark, and the liquid surface drawn over it. The canvas replaces the image
   only once WebGL is actually running, so the logo is never missing. */
.mark {
  position: relative;
  width: 100%;
  max-width: 34rem;
  justify-self: center;
  touch-action: pan-y;
}
@media (min-width: 900px) { .mark { justify-self: end; } }

.mark img { display: block; width: 100%; height: auto; transition: opacity 0.4s ease; }
.mark canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.mark[data-fx="on"] img { opacity: 0; }
.mark[data-fx="on"] canvas { opacity: 1; }

/* ── the two lists ──────────────────────────────────────── */
.lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.6rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}
@media (min-width: 780px) {
  .lists { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1fr); }
  /* nudged, so the two columns don't read as one machine-set row */
  .lists .list:last-child { margin-top: 2.4rem; }
}

.list h2 {
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.list ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.95rem; }
.list li {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: start;
  max-width: 30rem;
  line-height: 1.5;
}
.list li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.58em;
  border-radius: 50%;
  background: var(--blue);
}

/* ── contact ────────────────────────────────────────────── */
.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 0 var(--gutter) clamp(4rem, 9vw, 6.5rem);
}
.contact h2 {
  margin: 0;
  max-width: 16ch;
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 45, "WONK" 1;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.contact__mail {
  position: relative;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--blue-ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding: 0 0.15em 2px;
}
.contact__mail::before {          /* highlighter, drawn on hover */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 0.15em;
  background: var(--yellow);
  z-index: -1;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), height 0.32s ease;
}
.contact__mail:hover::before,
.contact__mail:focus-visible::before { transform: scaleX(1); height: 0.85em; }

/* The rendered sheet: real fibre tooth, lit by the same source. Sits under the
   content in multiply, so the type stays crisp and selectable on top of it. */
.paper {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Headline and closing line are pressed into that sheet. */
h1, .contact h2 {
  text-shadow:
    calc(var(--sx) * -1) calc(var(--sy) * -1) 0 rgba(255, 255, 255, 0.72),
    var(--sx) var(--sy) 1.4px rgba(17, 18, 22, 0.17);
}

/* Fallbacks, used only when the sheet cannot be rendered. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
  background: radial-gradient(680px circle at var(--lx, 30%) var(--ly, 22%),
    #FFFFFF 0%, #FCFBF7 42%, #F2F0E9 100%);
}

[data-paper="on"] body::before,
[data-paper="on"] body::after { display: none; }

/* a little tooth on the paper */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.03;
  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='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── footer ─────────────────────────────────────────────── */
.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  padding: 0 var(--gutter) 2.4rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
