/* Two Beans LLC — independent iPhone app maker, small-batch
   ----------------------------------------------------- */

:root {
  /* palette */
  --oat:        #F3ECDF;  /* canvas */
  --oat-deep:   #ECE2CE;  /* alt section */
  --cream:      #FBF7EF;  /* elevated cards */
  --ink:        #211611;  /* warm near-black */
  --espresso:   #6B4A33;  /* brown secondary text */
  --amber:      #EE7E27;  /* roasted bean / primary pop */
  --amber-deep: #C75E12;
  --green:      #1C8F5C;  /* raw bean / secondary pop */
  --line:       rgba(33, 22, 17, 0.14);

  /* type */
  --display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono:    "Space Mono", ui-monospace, "SF Mono", monospace;

  /* metrics */
  --maxw: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--body);
  background: var(--oat);
  color: var(--ink);
  line-height: 1.5;
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* faint grain overlay for warmth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

/* ---------- shared layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--espresso);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(28, 143, 92, 0.18);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7em 1.25em;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--oat); transform: translateY(-2px); }
.btn--solid {
  background: var(--amber);
  border-color: var(--amber);
  color: #2a1605;
  box-shadow: 0 10px 24px -10px rgba(199, 94, 18, 0.7);
  font-weight: 700;
}
.btn--solid:hover { background: var(--amber-deep); border-color: var(--amber-deep); color: #fff; transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  background: color-mix(in srgb, var(--oat) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.stuck { border-bottom-color: var(--line); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 30px; height: 30px; display: block; }
.brand:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; border-radius: 6px; }
.nav__link { font-family: var(--body); font-weight: 600; padding: 0.4em 0.2em; position: relative; }
.nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.1em; height: 2px; background: var(--amber); transform: scaleX(0); transform-origin: right; transition: transform 0.22s ease; }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(3rem, 9vw, 7rem);
  padding-bottom: clamp(3.5rem, 10vw, 8rem);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  position: relative;
}
.hero__text { min-width: 0; }
.hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.15rem, 1rem + 5.2vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 1.2rem 0 1.5rem;
  overflow-wrap: break-word;
}
.hero__title em { font-style: normal; color: var(--amber); position: relative; white-space: nowrap; }
.hero__title em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.04em;
  height: 0.09em;
  background: var(--green);
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards;
}
.hero__sub {
  max-width: 36ch;
  color: var(--espresso);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.55;
}
.hero__specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--espresso);
}
.hero__specs li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4em 0.85em;
  background: color-mix(in srgb, var(--cream) 60%, transparent);
}

/* hero mark */
.hero__mark {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}
.hero__mark::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(238, 126, 39, 0.32), rgba(238, 126, 39, 0) 62%);
  filter: blur(6px);
}
.hero__mark svg { width: min(82%, 360px); height: auto; position: relative; overflow: visible; }

/* the two beans float gently — inner group animates so the outer
   positioning transform (an SVG attribute) is preserved */
.bean-roasted { animation: bob 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bean-raw     { animation: bob 6s ease-in-out infinite 0.6s reverse; transform-box: fill-box; transform-origin: center; }

/* ---------- craft section ---------- */
.craft {
  background: var(--oat-deep);
  border-block: 1px solid var(--line);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.craft__head { max-width: 40ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.craft__head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 0.8rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(33, 22, 17, 0.55); }
.card__tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}
.card__bean { width: 26px; height: 26px; margin-bottom: 0.3rem; }
.card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.card p { color: var(--espresso); font-size: 1rem; }

/* ---------- say hi ---------- */
.say {
  padding-block: clamp(4rem, 11vw, 8rem);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 1.4rem;
}
.say h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 1.4rem + 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.say p { color: var(--espresso); max-width: 44ch; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  font-size: 0.92rem;
  color: var(--espresso);
}
.foot__brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--display); font-weight: 800; color: var(--ink); }
.foot__brand svg { width: 24px; height: 24px; }
.foot__links { display: inline-flex; gap: 1.4rem; }
.foot__links a { transition: color 0.18s ease; }
.foot__links a:hover { color: var(--amber-deep); }
.foot__links a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ---------- legal page ---------- */
.legal { padding-block: clamp(3rem, 7vw, 5.5rem); max-width: 760px; }
.legal__back { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--espresso); display: inline-flex; gap: 0.4em; margin-bottom: 2rem; }
.legal__back:hover { color: var(--amber-deep); }
.legal h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem);
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.legal .updated { font-family: var(--mono); font-size: 0.8rem; color: var(--espresso); margin-top: 0.75rem; }
.legal h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin-top: 2.4rem;
  margin-bottom: 0.6rem;
}
.legal p, .legal li { color: #3a2b20; }
.legal p { margin-bottom: 1rem; }
.legal ul { margin: 0 0 1rem 1.15rem; }
.legal li { margin-bottom: 0.45rem; }
.legal a.inline, .legal .email-link { color: var(--amber-deep); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-2deg); } }
@keyframes underline { to { transform: scaleX(1); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: clamp(2rem, 8vw, 4rem); }
  .hero__text, .hero__mark { min-width: 0; }
  .hero__mark { grid-row: 1; max-width: 300px; margin-inline: auto; }
  .cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__title em::after { transform: scaleX(1); }
}
