/* Alderkeel. Names and values follow the Alderkeel design system (tokens.json). */

@font-face {
  font-family: "Besley";
  src: url("assets/besley-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Libre Franklin";
  src: url("assets/libre-franklin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f9f8f4;
  --ink: #061f2c;
  --muted: #384e53;
  --hairline: #c8ceca;
  --deep: #061f2c;
  --on-deep: #f9f8f4;
  --on-deep-muted: #c7d4d5;
  --deep-line: #536c77;
  --deep-hover: #1b3945;
  --keel: #b03a24;
  --family-mesuravo: #0c5263;

  --font-display: Besley, Georgia, serif;
  --font-sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --wrap-max: 72rem;
  --gutter: clamp(1.35rem, 6.5vw, 6rem);
  --column-gap: clamp(2.5rem, 7vw, 7.2rem);
  --section-pad: clamp(2.8rem, 5vw, 4.6rem);
  --measure-text: 39ch;
  --target-min: 44px;
  --waterline: 2px;
  --keel-share: 20%;
  --columns: minmax(0, 1.12fr) minmax(0, 1fr);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #061f2c;
    --ink: #f9f8f4;
    --muted: #c7d4d5;
    --hairline: #2a4552;
    --deep: #092b3a;
    --deep-line: #6f8a94;
    --family-mesuravo: #63c3cf;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font-sans);
  -webkit-text-size-adjust: 100%;
}

main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 600; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
section, footer { scroll-margin-block-start: 1rem; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

.wrap {
  width: min(var(--wrap-max), calc(100% - var(--gutter) - var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 1;
  inset: var(--space-3) auto auto var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  transform: translateY(-170%);
}
.skip-link:focus { transform: none; }

/* Masthead */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: calc(var(--space-16) + var(--space-4));
  border-bottom: 1px solid var(--hairline);
}
.wordmark { width: auto; height: 20px; }
.masthead nav { display: flex; align-items: center; gap: var(--space-8); }
.masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.masthead nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.intro, .entry, .contact {
  display: grid;
  grid-template-columns: var(--columns);
  column-gap: var(--column-gap);
  align-items: center;
}

/* Intro */
.intro { padding-block: clamp(3rem, 6.35vw, 5.6rem); }
.intro h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.intro-text > p, .entry-text {
  max-width: var(--measure-text);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.5;
}
.intro-text > p { margin-top: var(--space-6); }

/* The hull as the picture of the page: deep above the waterline, keel below. */
.plate {
  display: flex;
  flex-direction: column;
  aspect-ratio: 1.56;
  background: var(--deep);
}
.plate-field {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 9%;
}
.plate-field svg {
  width: auto;
  height: 100%;
  margin-bottom: -1px;
  fill: var(--on-deep);
}
.plate-keel {
  flex: 0 0 var(--keel-share);
  border-top: clamp(4px, 0.55vw, 7px) solid var(--on-deep);
  background: var(--keel);
}

/* Brand entry */
.entry {
  border-top: 1px solid var(--hairline);
  padding-block: var(--section-pad);
}
.label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}
.label-mark { flex: none; width: 10px; height: 10px; background: var(--family-mesuravo); }
.entry h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* Hull: the contact block on deep, the waterline, the keel strip. */
.hull-field { background: var(--deep); color: var(--on-deep); }
.contact { padding-block: var(--section-pad); }
.contact h2 {
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.contact address { position: relative; min-width: 0; font-style: normal; }
.contact-name { display: block; margin-bottom: var(--space-1); color: var(--on-deep-muted); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.email-row a {
  display: inline-block;
  max-width: 100%;
  padding-block: var(--space-1);
  font-size: 1.25rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.email-row a:hover { text-decoration-thickness: 2px; }
.email-row button {
  display: grid;
  place-items: center;
  width: var(--target-min);
  height: var(--target-min);
  border: 1px solid var(--deep-line);
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--on-deep);
  cursor: pointer;
}
.email-row button:hover { background: var(--deep-hover); border-color: var(--on-deep); }
.copy-icon { position: relative; width: 17px; height: 18px; }
.copy-icon::before, .copy-icon::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.copy-icon::before { left: 0; top: 0; }
.copy-icon::after { right: 0; bottom: 0; background: var(--deep); }
.email-row button:hover .copy-icon::after { background: var(--deep-hover); }
.copy-status {
  display: block;
  color: var(--on-deep-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.copy-status:not(:empty) { margin-top: var(--space-1); }
.hull-keel {
  height: calc(var(--space-8) + var(--waterline));
  border-top: var(--waterline) solid var(--on-deep);
  background: var(--keel);
}

@media (max-width: 48rem) {
  .intro, .entry, .contact { grid-template-columns: 1fr; }
  .intro { row-gap: var(--space-8); }
  .plate { aspect-ratio: 2.2; }
  .entry { row-gap: var(--space-4); }
  .contact { row-gap: var(--space-4); }
}

@media (max-width: 29rem) {
  .masthead { gap: var(--space-3); min-height: 4.5rem; }
  .masthead nav { gap: var(--space-4); }
  .masthead nav a { font-size: 0.9375rem; }
  .wordmark { height: 14px; }
  .intro { padding-block: 2.5rem; row-gap: var(--space-6); }
  .intro-text > p, .entry-text { font-size: 1.125rem; }
  .plate { aspect-ratio: 1.9; }
  .entry { padding-block: 2.25rem; }
}

@media (forced-colors: active) {
  .plate, .hull-keel { forced-color-adjust: none; }
  .email-row button { border-color: ButtonText; }
  .copy-icon::after { background: ButtonFace; }
}
