/* HAO Tofu Bar
   Colours sampled from the brand board (brand/brand-board.png). */

:root {
  --cream: #f8f3ea;
  --paper: #fcf7ee; /* a touch lighter, so with the grain on top it reads as --cream */
  --ink: #1c1b16;
  --ink-soft: #57534a;
  --lime: #c8dc3d; /* text selection */
  --orange: #f99a3d;

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1160px;
  --font: "Outfit", ui-rounded, "Helvetica Neue", Arial, sans-serif;
  --bounce: cubic-bezier(.2, .9, .3, 1.25);

  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* A little paper tooth, like the board it came from. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .09 0 0 0 0 .07 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

h1, p { margin: 0; }

::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* ---------- Page ---------- */

main {
  flex: 1;
  display: flex;
  align-items: center;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(48px, 10vh, 120px) clamp(32px, 6vh, 64px);
}

.lockup {
  width: min(640px, 88%);
  line-height: 0;
  color: var(--ink);
  cursor: default;
}
.lockup svg { width: 100%; height: auto; overflow: visible; fill: currentColor; }

.lockup .l {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.lockup .l:nth-child(2) { animation-delay: .12s; }
.lockup .l:nth-child(3) { animation-delay: .24s; }

.lockup .drop { animation: drop .95s var(--bounce) both; }
.lockup .bob  { animation: bob .7s ease-in-out both; }

.lockup .tb { animation: fade .6s .55s ease-out both; }

@keyframes drop {
  0%   { transform: translateY(-60%) scale(.92, 1.08); opacity: 0; }
  45%  { opacity: 1; }
  60%  { transform: translateY(0) scale(1.07, .9); }
  80%  { transform: scale(.98, 1.03); }
  100% { transform: none; opacity: 1; }
}

@keyframes bob {
  0%, 100% { transform: none; }
  35%      { transform: translateY(-7%) scale(.97, 1.04); }
  70%      { transform: translateY(0) scale(1.04, .96); }
}

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.intro {
  margin-top: clamp(28px, 5vh, 48px);
  max-width: 26ch;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.3;
  font-weight: 500;
  text-wrap: balance;
}

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(56px, 10vh, 110px);
}

.email {
  margin-top: 14px;
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  text-decoration: underline wavy var(--orange);
  text-decoration-thickness: clamp(2px, .3vw, 4px);
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
  transition: text-decoration-color .3s;
}
.email:hover { text-decoration-color: var(--ink); }

.copy {
  margin-top: 26px;
  padding: .7em 1.3em;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 55% 45% 50% 50% / 60% 50% 50% 40%;
  cursor: pointer;
  transition: background .2s, color .2s, transform .3s var(--bounce);
}
.copy:hover { background: var(--ink); color: var(--cream); transform: rotate(-2deg); }

/* ---------- Footer ---------- */

.foot {
  padding-block: 24px 28px;
  text-align: center;
  font-size: .85rem;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
