/* ============================================================
   Coffee Joy — coming soon
   ============================================================ */

/* --- Aldo Semibold (drop the files into /fonts) ----------- */
@font-face {
  font-family: "Aldo";
  src: url("fonts/aldo-semibold.woff2") format("woff2"),
       url("fonts/aldo-semibold.woff")  format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- tokens ---------------------------------------------- */
:root {
  --coffee:        #8c3b1a;
  --coffee-deep:   #5e2510;
  --coffee-soft:   #b0633d;
  --cream:         #eadbc5;
  --cream-light:   #f6ecdc;
  --ink:           #2b1409;

  --font: "Aldo", "Avenir Next", "Futura", "Trebuchet MS", system-ui, -apple-system, sans-serif;

  --maxw: 68rem;
  --radius: 999px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3.5rem) 1rem;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* --- background ------------------------------------------ */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
}
.blob--1 {
  width: 46vmax; height: 46vmax;
  top: -16vmax; right: -14vmax;
  background: radial-gradient(circle at 35% 35%, var(--coffee-soft), transparent 70%);
  animation: drift 26s var(--ease) infinite alternate;
}
.blob--2 {
  width: 38vmax; height: 38vmax;
  bottom: -16vmax; left: -12vmax;
  background: radial-gradient(circle at 60% 40%, var(--coffee), transparent 72%);
  opacity: .32;
  animation: drift 32s var(--ease) infinite alternate-reverse;
}

.grain {
  position: absolute; inset: -50%;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6%, 8%, 0) scale(1.12); }
}

/* --- layout ---------------------------------------------- */
.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  display: grid;
  gap: clamp(2rem, 5vh, 3.5rem);
  text-align: center;
  justify-items: center;
}

/* --- brand ----------------------------------------------- */
.brand { display: grid; place-items: center; }

.brand__logo {
  width: clamp(9rem, 26vw, 15rem);
  height: auto;
  display: block;
}
/* if logo.svg is missing, show the wordmark instead */
.brand__logo.is-missing { display: none; }
.brand__logo.is-missing ~ .brand__fallback { display: block; }

.brand__fallback {
  display: none;
  font-size: clamp(2rem, 7vw, 3.25rem);
  color: var(--coffee);
  letter-spacing: -.02em;
}

/* --- hero ------------------------------------------------ */
.hero { display: grid; gap: clamp(1.25rem, 3vh, 2rem); justify-items: center; }

.title {
  margin: 0;
  font-size: clamp(2.9rem, 13vw, 7.5rem);
  line-height: .92;
  letter-spacing: -.035em;
  color: var(--coffee);
  text-wrap: balance;
}
.title__thin {
  color: color-mix(in srgb, var(--coffee) 45%, var(--cream));
}

.lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  line-height: 1.65;
  color: color-mix(in srgb, var(--ink) 72%, var(--cream));
  text-wrap: pretty;
}

/* --- divider --------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 3vw, 1.5rem);
  width: min(100%, 22rem);
  color: color-mix(in srgb, var(--coffee) 55%, var(--cream));
}
.divider__line {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    color-mix(in srgb, var(--coffee) 35%, transparent)
  );
}
.divider__line:last-child { transform: scaleX(-1); }
.divider__cup {
  flex: 0 0 auto;
  width: 1.6rem; height: 1.6rem;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* --- footer ---------------------------------------------- */
.footer { display: grid; gap: 1.1rem; justify-items: center; }

.social { display: flex; gap: .6rem; }
.social a {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--coffee) 22%, transparent);
  color: var(--coffee);
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.social a:hover {
  background: var(--coffee);
  color: var(--cream-light);
  transform: translateY(-3px);
}
.social svg {
  width: 1.2rem; height: 1.2rem;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.copy {
  margin: 0;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 50%, var(--cream));
}

/* --- reveal animation (CSS only) ------------------------- */
.reveal {
  opacity: 0;
  animation: rise .9s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 110ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* --- responsive tweaks ----------------------------------- */
@media (max-width: 30rem) {
  .divider { width: 100%; }
  .brand__logo { width: clamp(8rem, 44vw, 11rem); }
}

@media (min-height: 50rem) and (min-width: 48rem) {
  .shell { gap: 4rem; }
}

/* --- accessibility --------------------------------------- */
:focus-visible {
  outline: 2px solid var(--coffee);
  outline-offset: 3px;
  border-radius: .35rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; animation: none; }
}
