:root {
  --font-colour: #490a54;
  --paper: #fbfbf9;
  --wordmark: url("assets/aubergine-quin.svg");
}

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

html,
body {
  height: 100%;
}

html {
  cursor: url("assets/cursor.svg") 8 3, auto;
  cursor: image-set(url("assets/cursor.svg") 1x, url("assets/cursor@2x.svg") 2x) 8 3, auto;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: var(--paper);
  background-image: url("assets/background-overlay.png");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: 2rem;
}

/* Wordmark viewBox is 1125 x 207.56, so 1cqw = 11.25 SVG units */
.wordmark {
  position: relative;
  width: min(82vw, 1100px);
  container-type: inline-size;
}

.wordmark__name {
  width: 100%;
  aspect-ratio: 1125 / 207.56;
  background-color: var(--font-colour);
  -webkit-mask: var(--wordmark) center / contain no-repeat;
  mask: var(--wordmark) center / contain no-repeat;
  transition: background-color 0.2s ease;
}

/* Full stop: rests 3cm above the baseline (y = 138.5) past the final N's tail,
   then 1cm due south-west (0.7071cm on each axis) */
.wordmark__stop {
  --size: 2.3cqw;
  --dx: 0px;
  --dy: 0px;
  --scale: 1;
  position: absolute;
  left: calc(100% + 1.1cqw - 0.7071cm - 0.6667cm);
  top: calc(12.31cqw - var(--size) - 3cm + 0.7071cm);
  width: var(--size);
  height: var(--size);
  min-width: 12px;
  min-height: 12px;
  border-radius: 50%;
  outline: 1.5px solid var(--font-colour);
  outline-offset: 4px;
  touch-action: none;
  user-select: none;
  transform: translate(var(--dx), var(--dy)) scale(var(--scale));
  transition:
    transform 0.2s ease,
    outline-offset 0.2s ease,
    outline-width 0.2s ease;
}

/* Larger invisible grab area around the small dot */
.wordmark__stop::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
}

.wordmark__stop:hover {
  --scale: 1.2;
}

.wordmark__stop:focus-within {
  outline-width: 2.5px;
  outline-offset: 5px;
}

.wordmark__stop.is-dragging {
  --scale: 1.3;
  transition: outline-offset 0.2s ease, outline-width 0.2s ease;
}

.wordmark__stop input[type="color"] {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.wordmark__stop input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.wordmark__stop input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

.wordmark__stop input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 50%;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.contact__button {
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--font-colour);
  text-decoration: none;
  background: rgba(251, 251, 249, 0.7);
  border: 1.5px solid var(--font-colour);
  border-radius: 6px;
  cursor: inherit;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.contact__button:hover {
  color: var(--paper);
  background-color: var(--font-colour);
}

.contact__button:focus-visible {
  outline: 2px solid var(--font-colour);
  outline-offset: 3px;
}

/* Early-2000s Google homepage buttons (classic Windows bevel);
   remove .contact--google in index.html to revert */
.contact--google {
  gap: 6px;
}

.contact--google .contact__button {
  position: relative;
  padding: 4px 10px 5px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: normal;
  color: #000;
  background-color: #d4d0c8;
  border: none;
  border-radius: 0;
  box-shadow:
    inset -1px -1px #404040,
    inset 1px 1px #fff,
    inset -2px -2px #808080,
    inset 2px 2px #e8e6e0;
  transition: none;
}

.contact--google .contact__button:hover {
  color: #000;
  background-color: #d4d0c8;
}

.contact--google .contact__button:active {
  padding: 5px 9px 4px 11px;
  box-shadow:
    inset 1px 1px #404040,
    inset -1px -1px #fff,
    inset 2px 2px #808080,
    inset -2px -2px #e8e6e0;
}

.contact--google .contact__button:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -5px;
}

.colour-footer {
  position: fixed;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1cm;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1rem;
  background: var(--font-colour);
}

.colour-footer__email-wrap {
  display: block;
  position: relative;
  width: clamp(150px, 20vw, 230px);
  aspect-ratio: 770.91 / 61.22;
}

.colour-footer__email {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background-color: var(--paper);
  background-image: url("assets/background-overlay.png");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  -webkit-mask: url("assets/email-address.svg") center / contain no-repeat;
  mask: url("assets/email-address.svg") center / contain no-repeat;
  cursor: pointer;
}

.colour-footer__email-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.45rem);
  right: 0;
  padding: 0.3rem 0.5rem;
  color: var(--paper);
  background: #222;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.2rem);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.colour-footer__email-wrap:hover::after,
.colour-footer__email-wrap:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.colour-footer__email:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
