@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Erica+One&family=Oswald:wght@500;600&display=swap");

:root {
  --ink: #17100c;
  --cream: #f8e7c0;
  --paper: #f3c96b;
  --red: #d93d29;
  --orange: #f28a2e;
  --turquoise: #168f90;
  --gold: #efb63f;
  --line: rgba(23, 16, 12, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 238, 171, 0.72), transparent 24rem),
    linear-gradient(135deg, var(--paper) 0%, #f29b40 54%, #e75c35 100%);
  font-family: "DM Mono", monospace;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  pointer-events: none;
  content: "";
}

a,
button {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 4px;
}

main {
  min-height: calc(100vh - 78px);
  padding: 28px clamp(20px, 4vw, 72px) 36px;
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--line);
}

.wordmark {
  font-family: "Erica One", serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
}

.nav-links a {
  position: relative;
  font-family: "Oswald", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 180ms ease;
  content: "";
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  align-items: center;
  gap: clamp(36px, 6vw, 100px);
  width: 100%;
  max-width: 1440px;
  min-height: calc(100vh - 196px);
  margin: 0 auto;
  padding: clamp(52px, 6vw, 94px) 0 48px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  width: 38px;
  height: 2px;
  background: currentColor;
  content: "";
}

h1 {
  max-width: 7ch;
  margin: 0;
  font-family: "Erica One", serif;
  font-size: clamp(4.3rem, 9.5vw, 9.2rem);
  font-weight: 400;
  line-height: 0.79;
  letter-spacing: -0.045em;
  text-shadow: 4px 4px 0 var(--cream);
}

.ticker {
  display: inline-block;
  margin: 24px 0 28px;
  padding: 8px 13px 7px;
  color: var(--cream);
  background: var(--ink);
  font-family: "Oswald", sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: 0.13em;
  transform: rotate(-2deg);
}

.tagline {
  margin: 0 0 36px;
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
}

.contract {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 470px);
  padding: 14px 14px 14px 18px;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: rgba(248, 231, 192, 0.72);
}

.contract > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.contract span {
  font-size: 0.62rem;
  letter-spacing: 0.13em;
}

.contract strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract button {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  padding: 12px 14px;
  border: 0;
  color: var(--cream);
  background: var(--red);
  font: 500 0.75rem "DM Mono", monospace;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.contract button:hover {
  background: var(--turquoise);
  transform: translateY(-2px);
}

.contract svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 2;
}

.portrait-wrap {
  position: relative;
  width: min(100%, 690px);
  justify-self: end;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 48% 48% 12px 12px;
  box-shadow: 14px 14px 0 var(--ink);
  background: var(--ink);
}

.portrait-frame::after {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(248, 231, 192, 0.75);
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portrait-frame:hover img {
  transform: scale(1.025);
}

.stamp {
  position: absolute;
  right: -24px;
  bottom: -26px;
  display: grid;
  width: 128px;
  aspect-ratio: 1;
  place-content: center;
  border: 2px solid var(--cream);
  border-radius: 50%;
  color: var(--cream);
  background: var(--red);
  box-shadow: 0 0 0 5px var(--red), 0 0 0 7px var(--ink);
  text-align: center;
  transform: rotate(-9deg);
}

.stamp span {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.stamp strong {
  font-family: "Oswald", sans-serif;
  font-size: 1.1rem;
}

.link-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1440px;
  margin: 10px auto 0;
  border: 2px solid var(--ink);
  background: var(--cream);
}

.link-strip a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px;
  font-family: "Oswald", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.link-strip a + a {
  border-left: 2px solid var(--ink);
}

.link-strip a:hover {
  color: var(--cream);
  background: var(--ink);
}

.link-strip span {
  opacity: 0.55;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 22px clamp(20px, 4vw, 72px);
  color: var(--cream);
  background: var(--ink);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  padding: 13px 18px;
  color: var(--cream);
  background: var(--turquoise);
  font: 600 0.8rem "Oswald", sans-serif;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.confetti {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: flex;
  width: 100%;
  height: 26px;
  overflow: hidden;
}

.confetti span {
  flex: 1;
  min-width: 70px;
  height: 26px;
  clip-path: polygon(0 0, 100% 0, 92% 72%, 78% 54%, 64% 85%, 50% 55%, 35% 85%, 22% 54%, 8% 72%);
}

.confetti span:nth-child(3n + 1) { background: var(--turquoise); }
.confetti span:nth-child(3n + 2) { background: var(--red); }
.confetti span:nth-child(3n) { background: var(--orange); }

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    max-width: 620px;
  }

  h1 {
    max-width: none;
    font-size: clamp(4rem, 17vw, 8rem);
  }

  .portrait-wrap {
    width: min(92%, 650px);
    justify-self: center;
  }
}

@media (max-width: 560px) {
  main {
    padding: 26px 16px 24px;
  }

  .topbar {
    align-items: flex-start;
  }

  .nav-links {
    gap: 14px;
  }

  .hero {
    gap: 48px;
    padding: 48px 0 38px;
  }

  h1 {
    font-size: clamp(3.65rem, 19vw, 6rem);
    text-shadow: 3px 3px 0 var(--cream);
  }

  .contract {
    padding-left: 14px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .contract button {
    padding: 12px;
  }

  .copy-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .portrait-wrap {
    width: calc(100% - 16px);
    margin-right: 16px;
  }

  .portrait-frame {
    box-shadow: 9px 9px 0 var(--ink);
  }

  .stamp {
    right: -11px;
    bottom: -24px;
    width: 96px;
  }

  .stamp strong {
    font-size: 0.85rem;
  }

  .link-strip {
    grid-template-columns: 1fr;
  }

  .link-strip a + a {
    border-top: 2px solid var(--ink);
    border-left: 0;
  }

  footer {
    gap: 18px;
    padding: 22px 16px;
  }
}

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