/* ===========================================================
   Malek's Coffee — single page: gift + claim instructions
   =========================================================== */

:root {
  --cream:        #f3e6cb;
  --cream-soft:   #f9efd9;
  --paper:        #faf3e3;
  --espresso:     #2b160c;
  --espresso-2:   #3d2418;
  --burnt:        #d96d3b;
  --burnt-deep:   #b14d22;
  --mustard:      #e6b54a;

  --serif:   "DM Serif Display", "Times New Roman", serif;
  --display: "Abril Fatface", Georgia, serif;
  --label:   "Bebas Neue", "Inter", sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --script:  "Caveat", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }

::selection { background: var(--burnt); color: var(--paper); }

a { color: inherit; }

/* ---------- grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: multiply;
  z-index: 100;
}

/* ===========================================================
   HERO  (the gift)
   =========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 40px;
  overflow: hidden;
}

.hero__burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(120vmin, 980px);
  height: min(120vmin, 980px);
  transform: translate(-50%, -54%);
  pointer-events: none;
  opacity: 0.85;
  z-index: 0;
}
.hero__rays use { fill: var(--burnt); }
.hero__rays {
  transform-origin: 300px 300px;
  animation: spin 90s linear infinite;
  opacity: 0.22;
}
.hero__sun { fill: var(--mustard); opacity: 0.5; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 800px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1.5px solid var(--espresso-2);
  border-radius: 999px;
  font-family: var(--label);
  letter-spacing: 0.3em;
  font-size: 12px;
  background: var(--cream-soft);
  color: var(--espresso-2);
  margin: 0 0 18px;
}
.kicker__bean {
  width: 10px; height: 14px;
  background: var(--espresso);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}
.kicker__bean::after {
  content: "";
  position: absolute;
  inset: 1px 4px;
  background: var(--cream);
  border-radius: 50%;
  transform: rotate(18deg);
}

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 18vw, 200px);
  line-height: 0.86;
  margin: 0;
  color: var(--espresso);
  letter-spacing: -0.01em;
}
.wordmark__top { display: block; }
.wordmark__bot {
  display: block;
  color: var(--burnt-deep);
  font-style: italic;
  font-family: var(--serif);
}

.hero__tag {
  font-family: var(--label);
  letter-spacing: 0.26em;
  font-size: clamp(13px, 1.4vw, 16px);
  color: var(--espresso-2);
  margin: 20px 0 14px;
  min-height: 1.6em;
}
.hero__caret {
  display: inline-block;
  margin-left: 2px;
  color: var(--burnt);
  animation: blink 1.05s steps(1) infinite;
  transform: translateY(-1px);
}
@keyframes blink { 50% { opacity: 0; } }

.hero__sign {
  font-family: var(--script);
  font-size: clamp(20px, 3vw, 28px);
  color: var(--espresso);
  transform: rotate(-1.5deg);
  margin: 14px auto 0;
  opacity: 0.85;
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-family: var(--label);
  letter-spacing: 0.32em;
  font-size: 12px;
  color: var(--espresso-2);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(43, 22, 12, 0.25);
  background: rgba(250, 243, 227, 0.5);
  transition: transform 220ms ease, background 220ms ease;
}
.hero__scroll:hover { background: var(--paper); transform: translateY(2px); }
.hero__scroll-arrow {
  display: inline-block;
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* ---------- the cup ---------- */
.cup {
  position: relative;
  display: inline-block;
  margin: 6px 0 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform 220ms cubic-bezier(.2,.7,.3,1);
}
.cup:hover { transform: translateY(-3px); }
.cup.is-tipped { animation: tip 820ms cubic-bezier(.4, .0, .2, 1); }
@keyframes tip {
  0%   { transform: rotate(0deg); }
  32%  { transform: rotate(-12deg) translateY(-3px); }
  68%  { transform: rotate(3deg); }
  100% { transform: rotate(0); }
}

.cup__svg {
  width: clamp(200px, 26vw, 280px);
  height: auto;
  display: block;
}
.cup__steam {
  position: absolute;
  left: 50%;
  bottom: 86%;
  transform: translateX(-50%);
  width: clamp(260px, 32vw, 340px);
  height: 280px;
  pointer-events: none;
  /* fade out the top + sides so wisps dissolve into the page instead
     of clipping at the canvas bounds */
  -webkit-mask-image: radial-gradient(ellipse 85% 100% at 50% 100%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 85% 100% at 50% 100%, #000 60%, transparent 100%);
}
.cup__saucer-shadow { fill: rgba(43, 22, 12, 0.18); }
.cup__saucer       { fill: var(--burnt); }
.cup__saucer-inner { fill: var(--burnt-deep); }
.cup__body         { fill: var(--paper); stroke: var(--espresso); stroke-width: 4; stroke-linejoin: round; }
.cup__handle,
.cup__handle-inner { stroke: var(--espresso); stroke-width: 4; }
.cup__handle-inner { stroke-width: 2; opacity: 0.55; }
.cup__rim          { fill: var(--espresso-2); }
.cup__coffee       { fill: var(--burnt-deep); transition: transform 600ms ease; transform-origin: 160px 118px; }
.cup__shine        { stroke: var(--espresso); stroke-width: 3; stroke-linecap: round; opacity: 0.35; }

.cup__hint {
  display: block;
  margin-top: 8px;
  font-family: var(--script);
  font-size: 20px;
  color: var(--espresso-2);
  transform: rotate(-3deg);
  opacity: 0.55;
}

/* ===========================================================
   CLAIM SECTION
   =========================================================== */
.claim {
  padding: 60px 22px 90px;
  display: flex;
  justify-content: center;
}
.recipe {
  width: 100%;
  max-width: 640px;
  background: var(--paper);
  border: 1.5px solid var(--espresso-2);
  border-radius: 4px;
  padding: 36px clamp(22px, 5vw, 48px) 40px;
  box-shadow: 14px 14px 0 -2px var(--burnt);
  position: relative;
}
.recipe::before {
  content: "";
  position: absolute;
  top: -14px; left: 24px;
  width: 70px; height: 28px;
  background: var(--burnt);
  transform: rotate(-6deg);
  border-radius: 2px;
  opacity: 0.85;
}

.recipe__eyebrow {
  font-family: var(--label);
  letter-spacing: 0.32em;
  font-size: 12px;
  color: var(--burnt-deep);
  margin: 0 0 14px;
}
.recipe__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 9vw, 64px);
  line-height: 0.95;
  margin: 0 0 14px;
  color: var(--espresso);
}
.recipe__title em {
  color: var(--burnt-deep);
  font-family: var(--serif);
  font-style: italic;
}
.recipe__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--espresso-2);
  margin: 0 0 28px;
  opacity: 0.9;
  line-height: 1.5;
}
.recipe__sub code {
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--cream);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}
.recipe__sign {
  margin-top: 30px;
  font-family: var(--script);
  font-size: 24px;
  color: var(--espresso);
  transform: rotate(-1.5deg);
  line-height: 1.3;
}

/* path cards (two options) */
.path {
  position: relative;
  padding: 34px 0 4px;
}
.path:first-of-type { padding-top: 0; }
.path:not(:first-of-type)::before {
  /* a small string of coffee beans as section divider */
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 168px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='168' height='16' viewBox='0 0 168 16'><g fill='%23d96d3b'><g transform='translate(8 8) rotate(-18)'><ellipse rx='4.5' ry='7'/><path d='M0 -6 Q1.6 0 0 6' stroke='%23faf3e3' stroke-width='1' fill='none'/></g><g transform='translate(44 8) rotate(14)'><ellipse rx='4.5' ry='7'/><path d='M0 -6 Q1.6 0 0 6' stroke='%23faf3e3' stroke-width='1' fill='none'/></g><g transform='translate(84 8) rotate(-8)'><ellipse rx='4.5' ry='7'/><path d='M0 -6 Q1.6 0 0 6' stroke='%23faf3e3' stroke-width='1' fill='none'/></g><g transform='translate(124 8) rotate(20)'><ellipse rx='4.5' ry='7'/><path d='M0 -6 Q1.6 0 0 6' stroke='%23faf3e3' stroke-width='1' fill='none'/></g><g transform='translate(160 8) rotate(-12)'><ellipse rx='4.5' ry='7'/><path d='M0 -6 Q1.6 0 0 6' stroke='%23faf3e3' stroke-width='1' fill='none'/></g></g></svg>");
  background-repeat: no-repeat;
  opacity: 0.75;
}
.path__tag {
  font-family: var(--label);
  letter-spacing: 0.28em;
  font-size: 11px;
  color: var(--burnt-deep);
  margin: 0 0 6px;
}
.path__h {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 5vw, 30px);
  margin: 0 0 6px;
  color: var(--espresso);
  line-height: 1.1;
}
.path__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--espresso-2);
  opacity: 0.8;
  margin: 0 0 16px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: baseline;
}
.step__no {
  font-family: var(--label);
  letter-spacing: 0.2em;
  font-size: 13px;
  color: var(--burnt);
}
.step p {
  font-size: clamp(15px, 1.6vw, 16px);
  line-height: 1.55;
  margin: 0;
  color: var(--espresso-2);
}
.step p strong { color: var(--burnt-deep); font-weight: 600; }
.step__cta {
  display: inline-block;
  font-family: var(--label);
  letter-spacing: 0.18em;
  font-size: 12px;
  text-transform: uppercase;
  background: var(--espresso);
  color: var(--paper);
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  margin-right: 4px;
  transition: background 180ms ease, transform 180ms ease;
}
.step__cta:hover { background: var(--burnt-deep); transform: translateY(-1px); }
.step code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--cream);
  border: 1px solid rgba(43, 22, 12, 0.15);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.92em;
}

.trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}

@media (max-width: 640px) {
  .recipe { box-shadow: 8px 8px 0 -1px var(--burnt); }
  .step { grid-template-columns: 28px 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__rays { animation: none; }
  .hero__caret { animation: none; }
  .hero__scroll-arrow { animation: none; }
}
