:root {
  color-scheme: dark;
  --bg: #10100f;
  --panel: rgba(22, 24, 23, 0.78);
  --text: #f4f1e8;
  --muted: #b8b0a3;
  --line: rgba(244, 241, 232, 0.16);
  --coffee: #c3844d;
  --crema: #f2c27a;
  --green: #7ee787;
  --red: #f07167;
  --blue: #73d2de;
  --shadow: rgba(0, 0, 0, 0.42);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 74% 18%, rgba(195, 132, 77, 0.22), transparent 28rem),
    radial-gradient(circle at 12% 72%, rgba(115, 210, 222, 0.13), transparent 24rem),
    linear-gradient(135deg, #10100f 0%, #181511 44%, #111615 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  align-items: center;
  min-height: 78vh;
  padding: 68px 0 44px;
  overflow: hidden;
}

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

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: clamp(0.78rem, 1.4vw, 0.92rem);
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(4.4rem, 15vw, 10.5rem);
  line-height: 0.82;
  letter-spacing: 0;
  text-shadow: 0 18px 60px var(--shadow);
}

.tagline {
  max-width: 680px;
  margin: 24px 0 0;
  color: #f7d6a7;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.18rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.16;
}

.ambient-code {
  position: absolute;
  inset: 2rem 0 auto auto;
  display: grid;
  width: min(540px, 48vw);
  gap: 14px;
  color: rgba(244, 241, 232, 0.15);
  font-size: clamp(0.78rem, 1.3vw, 1rem);
  transform: rotate(-7deg);
}

.ambient-code span {
  width: max-content;
  padding: 8px 12px;
  border: 1px solid rgba(244, 241, 232, 0.1);
  border-radius: 6px;
  background: rgba(16, 16, 15, 0.34);
  animation: float-code 8s ease-in-out infinite;
}

.ambient-code span:nth-child(2n) {
  margin-left: auto;
  color: rgba(126, 231, 135, 0.22);
  animation-delay: -2s;
}

.ambient-code span:nth-child(3n) {
  color: rgba(115, 210, 222, 0.2);
  animation-delay: -4s;
}

.brew-visual {
  position: relative;
  z-index: 1;
  width: min(420px, 78vw);
  justify-self: end;
  border: 1px solid rgba(244, 241, 232, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(244, 241, 232, 0.06), transparent 46%),
    rgba(16, 16, 15, 0.64);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

.ascii-brew::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(transparent 50%, rgba(126, 231, 135, 0.045) 50%);
  background-size: 100% 8px;
  mix-blend-mode: screen;
}

.ascii-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(244, 241, 232, 0.12);
  color: rgba(244, 241, 232, 0.66);
  font-size: clamp(0.78rem, 1.4vw, 0.92rem);
}

.ascii-status span:first-child::after {
  display: inline-block;
  width: 3ch;
  content: "";
  animation: dots 1.4s steps(4, end) infinite;
}

.ascii-brew pre {
  display: grid;
  min-height: clamp(260px, 32vw, 360px);
  place-content: center;
  padding: clamp(14px, 2.6vw, 28px);
  color: rgba(244, 241, 232, 0.86);
  font-size: clamp(0.56rem, 1.5vw, 0.86rem);
  line-height: 1.14;
  text-shadow: 0 0 18px rgba(126, 231, 135, 0.16);
}

.ascii-brew code {
  display: block;
  width: max-content;
}

.ascii-brew .fill {
  color: var(--coffee);
  text-shadow: 0 0 18px rgba(195, 132, 77, 0.5);
  opacity: 0;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-timing-function: steps(1, end);
}

.ascii-brew .fill-1 {
  color: var(--crema);
  animation-name: fill-top;
}

.ascii-brew .fill-2 {
  animation-name: fill-upper;
}

.ascii-brew .fill-3 {
  animation-name: fill-center;
}

.ascii-brew .fill-4 {
  animation-name: fill-middle;
}

.ascii-brew .fill-5 {
  animation-name: fill-bottom;
}

.ascii-brew .fill-6 {
  animation-name: fill-base;
}

.manifest {
  padding: 18px 0 76px;
}

.manifest-inner {
  max-width: 850px;
  border-left: 2px solid var(--coffee);
  padding-left: clamp(20px, 4vw, 42px);
}

.manifest p {
  margin: 0 0 22px;
  color: rgba(244, 241, 232, 0.9);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 650;
  line-height: 1.28;
}

.console-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  padding-bottom: 68px;
}

.terminal,
.dose {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.terminal {
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.terminal-top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--red);
}

.terminal-top span:nth-child(2) {
  background: var(--crema);
}

.terminal-top span:nth-child(3) {
  background: var(--green);
}

pre {
  margin: 0;
  padding: clamp(18px, 3vw, 30px);
  overflow-x: auto;
  color: rgba(244, 241, 232, 0.86);
  font-size: clamp(0.88rem, 1.8vw, 1rem);
  line-height: 1.58;
}

.prompt,
.cursor {
  color: var(--green);
}

.cursor {
  animation: blink 1s steps(2) infinite;
}

.dose {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 3vw, 28px);
}

.dose-label {
  margin: 0;
  color: var(--blue);
  font-size: 0.78rem;
  text-transform: uppercase;
}

#coffee-line {
  margin: 22px 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
}

button {
  min-height: 44px;
  border: 1px solid rgba(242, 194, 122, 0.55);
  border-radius: 6px;
  color: #1d130d;
  background: linear-gradient(180deg, #f4ca86, #c3844d);
  box-shadow: 0 12px 28px rgba(195, 132, 77, 0.24);
  cursor: pointer;
  font: 800 0.95rem/1 Inter, ui-sans-serif, system-ui, sans-serif;
}

button:focus-visible {
  outline: 3px solid rgba(126, 231, 135, 0.7);
  outline-offset: 4px;
}

button:active {
  transform: translateY(1px);
}

footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 0 0 30px;
  color: rgba(244, 241, 232, 0.52);
  font-size: 0.84rem;
}

@keyframes float-code {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes fill-bottom {
  0%,
  15%,
  100% {
    opacity: 0;
  }
  16%,
  90% {
    opacity: 1;
  }
}

@keyframes fill-base {
  0%,
  14%,
  100% {
    opacity: 0;
  }
  15%,
  90% {
    opacity: 1;
  }
}

@keyframes fill-middle {
  0%,
  29%,
  100% {
    opacity: 0;
  }
  30%,
  90% {
    opacity: 1;
  }
}

@keyframes fill-center {
  0%,
  43%,
  100% {
    opacity: 0;
  }
  44%,
  90% {
    opacity: 1;
  }
}

@keyframes fill-upper {
  0%,
  57%,
  100% {
    opacity: 0;
  }
  58%,
  90% {
    opacity: 1;
  }
}

@keyframes fill-top {
  0%,
  71%,
  100% {
    opacity: 0;
  }
  72%,
  90% {
    opacity: 1;
  }
}

@keyframes dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75%,
  100% {
    content: "...";
  }
}

@media (max-width: 820px) {
  .hero,
  .console-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  .ambient-code {
    width: 100%;
    opacity: 0.72;
  }

  .brew-visual {
    justify-self: center;
    margin-top: 22px;
  }

  .manifest {
    padding-top: 0;
  }
}

@media (max-width: 520px) {
  .page-shell,
  footer {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: clamp(3.65rem, 22vw, 5rem);
  }

  .tagline {
    font-size: 1.22rem;
  }

  .ambient-code {
    display: none;
  }

  .manifest-inner {
    padding-left: 18px;
  }

  .manifest p {
    font-size: 1.18rem;
  }

  footer {
    flex-direction: column;
  }
}
