@font-face {
  font-family: "Kalihan";
  src: url("../fonts/Kalihan.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Gaian";
  src: url("../fonts/GaianRegular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  /* Brand Core Palette */
  --ink: #3d2f36;
  --cream: #fcf8f4;
  --surface: #faf2ea;
  --muted: #7d6967;
  --border: #ebdcd3;
  --accent: #436257;
  --accent-hover: #354e45;
  --plum: #4c3d4c;

  /* Light Mode Semantic Bindings */
  --page-background: #fcf8f4;
  --page-foreground: #3d2f36;
  --control-background: #ffffff;
  --field-background: #ffffff;
  --control-foreground: #3d2f36;
  --control-border: #ebdcd3;
  --control-placeholder: #9c827f;
  --eyebrow-color: #436257;
  --button-background: #4c3d4c;
  --button-foreground: #faf5ef;
  --button-hover: #3b2e3b;
  --button-shadow: #ebdcd3;
}

html[data-theme="dark"] {
  /* Dark Mode Semantic Bindings */
  --page-background: #231c20;
  --page-foreground: #f7f0e8;
  --muted: #c2aca8;
  --surface: #2d2429;
  --control-background: #2d2429;
  --field-background: #1c1619;
  --control-foreground: #f7f0e8;
  --control-border: #483a42;
  --control-placeholder: #8c767e;
  --eyebrow-color: #7ea395;
  --accent: #7ea395;
  --accent-hover: #93b7aa;
  --button-background: #f0e4db;
  --button-foreground: #231c20;
  --button-hover: #ffffff;
  --button-shadow: #483a42;
}

* { box-sizing: border-box; }
html {
  background-color: var(--page-background);
  transition: background-color .25s ease;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--page-foreground);
  background-color: var(--page-background);
  font-family: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1.125rem, 1.7vw, 1.2rem);
  transition: color .25s ease, background-color .25s ease;
}

.dots {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .36;
  background-image: radial-gradient(var(--border) .8px, transparent .8px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 94%);
}

.cursor-glitter {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}
.cursor-glitter__particle {
  position: fixed;
  width: var(--particle-size, 8px);
  height: var(--particle-size, 8px);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.4) rotate(0deg);
  animation: glitter-pop 1.45s cubic-bezier(.2,.8,.25,1) forwards;
  box-shadow: 0 0 0 2px var(--particle-color), 0 0 14px var(--particle-color);
  background: var(--particle-color);
  will-change: transform, opacity;
}
.cursor-glitter__particle--diamond {
  border-radius: 1px;
  transform: translate(-50%, -50%) scale(.4) rotate(45deg);
}
.cursor-glitter__particle--star {
  border-radius: 0;
  clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 63%, 50% 100%, 38% 63%, 0 50%, 38% 37%);
}
.cursor-glitter__particle--ring {
  border: 2px solid var(--particle-color);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 10px var(--particle-color);
}
.cursor-glitter__particle--confetti {
  border-radius: 1px;
  width: calc(var(--particle-size, 8px) * .6);
  height: calc(var(--particle-size, 8px) * 1.8);
}
.cursor-glitter__particle--spark {
  width: 18px;
  height: 18px;
  background: transparent;
  box-shadow: none;
}
.cursor-glitter__particle--spark::before,
.cursor-glitter__particle--spark::after {
  content: "";
  position: absolute;
  inset: 2px 8px;
  border-radius: 99px;
  background: var(--particle-color);
  box-shadow: 0 0 10px var(--particle-color);
}
.cursor-glitter__particle--spark::after {
  transform: rotate(90deg);
}
@keyframes glitter-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.25) rotate(0deg); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(18deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift-x)), calc(-50% + var(--drift-y))) scale(0) rotate(240deg); }
}
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor-glitter { display: none; }
}

main {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px 0 22px;
}

nav, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand { display: inline-flex; align-items: center; gap: 11px; letter-spacing: .04em; }
.brand img { display: block; width: 372px; max-width: 100%; height: auto; object-fit: contain; }
.nav-tools { display: inline-flex; align-items: center; gap: 18px; }
.theme-toggle {
  min-height: 44px;
  min-width: 44px;
  width: 52px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  color: var(--control-foreground);
  background: var(--control-background);
  font: inherit;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, transform .2s ease;
}
.theme-toggle svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun-rays { fill: none; stroke: currentColor; }
.theme-toggle:hover { color: var(--page-background); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.theme-toggle:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
  padding: 46px 0;
}

.eyebrow { margin: 0 0 14px; color: var(--eyebrow-color); font-family: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: clamp(1.125rem, 1.7vw, 1.2rem); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { max-width: none; margin: 0; color: var(--page-foreground); font-family: "Kalihan", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: clamp(3.25rem, 8.4vw, 7.7rem); line-height: .86; letter-spacing: -.065em; transition: color .25s ease; }
.headline-lead { font-family: "Gaian", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 400; letter-spacing: -.045em; }
.headline-lead { white-space: nowrap; }
h1 .script {
  display: block;
  margin: -.14em 0 .03em -.04em;
  color: var(--accent);
  font-family: "Kalihan", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.22em;
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: .78;
  transform: rotate(-4deg);
}
.intro { max-width: 560px; margin: 44px 0 0; color: var(--muted); font-family: "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: clamp(1rem, 1.2vw, 1.125rem); line-height: 1.58; }

.signup { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
input, button { min-height: 52px; border-radius: 999px; font: inherit; }
input { flex: 1 1 220px; padding: 0 19px; border: 1px solid var(--control-border); outline-offset: 3px; color: var(--control-foreground); background: var(--field-background); transition: border-color .2s ease, background-color .25s ease; }
input::placeholder { color: var(--control-placeholder); opacity: 1; }
.signup button { cursor: pointer; padding: 0 22px; border: 1px solid var(--button-background); color: var(--button-foreground); background: var(--button-background); font-weight: 800; transition: transform .2s, box-shadow .2s, background .2s, color .2s; }
.signup button:hover { background: var(--button-hover); color: var(--button-foreground); transform: translateY(-3px); box-shadow: 0 6px 0 var(--button-shadow); }
button:disabled { cursor: wait; opacity: .7; transform: none; box-shadow: none; }
.message { min-height: 22px; margin: 10px 0 0; color: var(--muted); font-size: .91rem; }
.message.error { color: #d9534f; }

.art { width: 100%; max-width: 540px; height: auto; justify-self: center; display: block; }

footer { color: var(--muted); font-size: clamp(1rem, 1.25vw, 1.125rem); }
footer a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 4px; }

@media (max-width: 760px) {
  main { width: min(100% - 28px, 650px); padding-top: 18px; }
  nav { position: relative; min-height: 112px; display: grid; grid-template-columns: minmax(0, 85%) minmax(0, 15%); align-items: start; gap: 0; }
  .brand { width: 100%; padding-top: 20px; }
  .brand img { width: 100%; height: auto; }
  .nav-tools { position: static; width: 100%; justify-self: end; justify-content: flex-end; }
  .theme-toggle { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
  .hero { grid-template-columns: 1fr; padding: 50px 0 30px; }
  .eyebrow { font-size: 16px; letter-spacing: .06em; }
  h1 { font-size: clamp(3.5rem, 15vw, 5rem); }
  .headline-lead { white-space: normal; }
  .art { max-width: 390px; grid-row: 1; }
  .hero-copy { grid-row: 2; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  h1 { font-size: clamp(3.25rem, 7vw, 5.8rem); }
}
