@import url("https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Jua&display=swap");

:root {
  color-scheme: light dark;
  --ink: #14231d;
  --muted: #5f7169;
  --paper: #fffaf0;
  --card: rgba(255, 255, 255, 0.64);
  --line: rgba(20, 35, 29, 0.12);
  --forest: #FF8C00;
  --forest-2: #E56F00;
  --rice: #f8df92;
  --tomato: #cc5b37;
  --body-bg:
    radial-gradient(circle at 18% 12%, rgba(255, 188, 92, 0.72), transparent 26rem),
    radial-gradient(circle at 92% 4%, rgba(255, 140, 0, 0.24), transparent 24rem),
    linear-gradient(135deg, #eef4df 0%, #f8efe2 52%, #e4f1eb 100%);
  --grid-line: rgba(255, 140, 0, 0.14);
  --grid-line-2: rgba(255, 140, 0, 0.10);
  --hero-orb: linear-gradient(135deg, rgba(255, 140, 0, 0.92), rgba(229, 111, 0, 0.58));
  --install-bg: rgba(255, 248, 234, 0.78);
  --install-ink: #3e3a2e;
  --install-muted: #5c6459;
  --field-bg: rgba(255, 255, 255, 0.28);
  --chip-bg: rgba(255, 250, 240, 0.48);
  --chip-ink: #24463b;
  --disabled-chip-bg: rgba(255, 255, 255, 0.42);
  --disabled-chip-ink: rgba(36, 70, 59, 0.58);
  --ghost-bg: rgba(255, 255, 255, 0.44);
  --meal-bg: rgba(255, 250, 240, 0.40);
  --meal-ink: #34483f;
  --mobile-actions-bg: rgba(255, 250, 240, 0.62);
  --mobile-actions-border: rgba(20, 35, 29, 0.08);
  --overscroll-bg: #FF8C00;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --display-font: "Jua", "Gowun Dodum", "Apple SD Gothic Neo", sans-serif;
  --body-font: "Gowun Dodum", "Apple SD Gothic Neo", sans-serif;
  --round-xl: 52px;
  --round-lg: 34px;
  --round-md: 26px;
  --shadow: 0 28px 80px rgba(255, 140, 0, 0.18), 0 18px 50px rgba(27, 43, 35, 0.12);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background-color: var(--overscroll-bg);
  background: var(--body-bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--body-font);
  background-color: var(--overscroll-bg);
  background: var(--body-bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line-2) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto -16vw -28vw auto;
  width: 62vw;
  height: 62vw;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 140, 0, 0.2), transparent 42%),
    radial-gradient(circle at 64% 62%, rgba(204, 91, 55, 0.12), transparent 48%);
  filter: blur(12px);
  opacity: 0.86;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(56px + var(--safe-top)) 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(310px, 0.9fr);
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--round-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.18);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 34%);
  opacity: 0.46;
}

.hero {
  min-height: 560px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  top: -92px;
  right: -98px;
  width: 360px;
  height: 360px;
  border-radius: 58% 42% 56% 44%;
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 248, 214, 0.92) 0 8%, transparent 9%),
    radial-gradient(circle at 63% 32%, rgba(255, 248, 214, 0.78) 0 7%, transparent 8%),
    var(--hero-orb);
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 0;
}

.eyebrow,
.section-head p {
  margin: 0 0 12px;
  color: var(--tomato);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--display-font);
  letter-spacing: -0.02em;
}

h1 {
  max-width: 720px;
  font-size: clamp(56px, 9vw, 108px);
  line-height: 0.86;
  text-wrap: balance;
}

h2 {
  font-size: 34px;
  line-height: 1.05;
}

.lead {
  max-width: 580px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.66;
  word-break: keep-all;
}

.actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 54px;
}

.install-panel {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(204, 91, 55, 0.2);
  border-radius: var(--round-md);
  color: var(--install-ink);
  background: color-mix(in srgb, var(--install-bg) 78%, transparent);
}

.install-panel strong {
  display: block;
  color: var(--tomato);
  font-size: 14px;
  font-weight: 900;
}

.install-panel p {
  margin: 8px 0 0;
  color: var(--install-muted);
  font-size: 14px;
  line-height: 1.55;
}

.preferences {
  margin-top: 30px;
  display: grid;
  gap: 14px;
  transition: opacity 180ms ease, filter 180ms ease;
}

.preferences.is-disabled {
  opacity: 0.46;
  filter: grayscale(0.18);
}

.preferences fieldset {
  margin: 0;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid rgba(15, 79, 63, 0.16);
  border-radius: var(--round-lg);
  background: var(--field-bg);
}

.preferences legend {
  padding: 0 6px;
  color: var(--forest);
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 900;
}

.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid rgba(15, 79, 63, 0.18);
  border-radius: 999px;
  color: var(--chip-ink);
  background: var(--chip-bg);
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.choice input:checked + span {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--forest), var(--forest-2));
}

.choice input:focus-visible + span {
  outline: 3px solid rgba(204, 91, 55, 0.28);
  outline-offset: 2px;
}

.choice input:disabled + span {
  cursor: not-allowed;
  color: var(--disabled-chip-ink);
  border-color: rgba(255, 140, 0, 0.10);
  background: var(--disabled-chip-bg);
}

button {
  position: relative;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-width: 126px;
  min-height: 54px;
  padding: 15px 24px;
  font: inherit;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  touch-action: manipulation;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 120ms ease, box-shadow 180ms ease, opacity 180ms ease, filter 180ms ease;
}

button::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 54%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: skewX(-18deg);
}

button:focus {
  outline: none;
}

button:focus-visible {
  outline: 3px solid rgba(255, 140, 0, 0.35);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: none;
}

button:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

@media (hover: hover) and (pointer: fine) {
  .choice:hover span {
    transform: scale(1.035);
    box-shadow: 0 12px 26px rgba(255, 140, 0, 0.16);
  }

  button:hover {
    filter: brightness(1.03);
  }
}

.primary {
  color: white;
  background: linear-gradient(135deg, var(--forest), var(--forest-2));
  box-shadow: 0 16px 34px rgba(15, 79, 63, 0.24);
}

.ghost {
  color: var(--forest);
  background: var(--ghost-bg);
  border: 1px solid rgba(15, 79, 63, 0.18);
}

.status {
  margin: 0;
  max-height: 0;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 18px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  transition:
    margin-top 220ms ease,
    max-height 280ms ease,
    padding 220ms ease,
    opacity 180ms ease,
    transform 220ms ease,
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
}

.status:not(.is-empty) {
  margin-top: 16px;
  max-height: 170px;
  padding: 12px 14px;
  border-color: color-mix(in srgb, var(--forest) 24%, transparent);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  box-shadow: 0 12px 30px rgba(15, 79, 63, 0.10);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.status.is-empty {
  margin-top: 0;
}

.menu {
  padding: 28px;
}

.menu-grid {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.meal {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--round-lg);
  background: color-mix(in srgb, var(--meal-bg) 88%, transparent);
}

.meal strong {
  display: block;
  margin-bottom: 9px;
  color: var(--forest);
  font-family: var(--display-font);
  font-size: 20px;
}

.meal span {
  display: block;
  color: var(--meal-ink);
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: gridDrift 18s linear infinite;
  }

  body::after {
    animation: glowBreathe 8s ease-in-out infinite;
  }

  .hero {
    animation: cardRise 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both, softGlow 5.6s ease-in-out 800ms infinite;
  }

  .menu {
    animation: cardRise 620ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both, softGlow 6.4s ease-in-out 1200ms infinite;
  }

  .hero::after {
    animation: persimmonFloat 9s ease-in-out infinite;
  }

  .eyebrow,
  h1,
  .lead,
  .preferences,
  .actions,
  .status {
    animation: textBloom 560ms ease both;
  }

  h1 {
    animation: textBloom 560ms ease 70ms both, titlePulse 3.6s ease-in-out 1.1s infinite;
  }

  .lead {
    animation-delay: 130ms;
  }

  .preferences {
    animation-delay: 190ms;
  }

  .actions,
  .status {
    animation-delay: 240ms;
  }

  .menu-grid .meal {
    animation: mealReveal 460ms ease both, mealWiggle 5.2s ease-in-out 900ms infinite;
  }

  .menu-grid .meal:nth-child(2) {
    animation-delay: 90ms, 1.35s;
  }

  .menu-grid .meal:nth-child(3) {
    animation-delay: 180ms, 1.8s;
  }

  button::after {
    animation: buttonShine 2.8s ease-in-out infinite;
  }

  .choice input:checked + span {
    animation: chipPop 320ms cubic-bezier(0.22, 1.5, 0.36, 1) both;
  }
}

@media (pointer: coarse) and (prefers-reduced-motion: no-preference) {
  body::before,
  body::after,
  .hero::after,
  button::after {
    animation: none !important;
  }

  .hero {
    animation: cardRise 460ms cubic-bezier(0.2, 0.8, 0.2, 1) both !important;
  }

  .menu {
    animation: cardRise 460ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms both !important;
  }

  h1 {
    animation: textBloom 420ms ease 70ms both !important;
  }

  .menu-grid .meal {
    animation: mealReveal 340ms ease both !important;
  }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes textBloom {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titlePulse {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(255, 140, 0, 0);
  }

  50% {
    text-shadow: 0 12px 30px rgba(255, 140, 0, 0.24);
  }
}

@keyframes mealReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softGlow {
  0%,
  100% {
    box-shadow: var(--shadow);
  }

  50% {
    box-shadow: 0 34px 90px rgba(255, 140, 0, 0.24), 0 18px 55px rgba(27, 43, 35, 0.13);
  }
}

@keyframes mealWiggle {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-5px) rotate(-0.35deg);
  }
}

@keyframes chipPop {
  0% {
    scale: 0.92;
  }

  70% {
    scale: 1.08;
  }

  100% {
    scale: 1;
  }
}

@keyframes buttonShine {
  0%,
  48% {
    left: -70%;
  }

  78%,
  100% {
    left: 118%;
  }
}

@keyframes persimmonFloat {
  0%,
  100% {
    border-radius: 58% 42% 56% 44%;
    transform: translate3d(0, 0, 0) rotate(-18deg) scale(1);
  }

  50% {
    border-radius: 45% 55% 42% 58%;
    transform: translate3d(-18px, 14px, 0) rotate(-8deg) scale(1.06);
  }
}

@keyframes glowBreathe {
  0%,
  100% {
    opacity: 0.68;
    transform: scale(0.96);
  }

  50% {
    opacity: 0.98;
    transform: scale(1.05);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 42px 42px, -42px 42px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #edf7ef;
    --muted: #a1b7ae;
    --paper: #07120f;
    --card: rgba(11, 28, 22, 0.60);
    --line: rgba(221, 242, 232, 0.14);
    --forest: #FFB347;
    --forest-2: #FF8C00;
    --rice: #f0d27c;
    --tomato: #ff9a70;
    --body-bg:
      radial-gradient(circle at 18% 12%, rgba(255, 140, 0, 0.24), transparent 28rem),
      radial-gradient(circle at 90% 2%, rgba(255, 179, 71, 0.18), transparent 25rem),
      linear-gradient(135deg, #07120f 0%, #10221b 54%, #05100d 100%);
    --grid-line: rgba(255, 179, 71, 0.12);
    --grid-line-2: rgba(255, 179, 71, 0.08);
    --hero-orb: linear-gradient(135deg, rgba(255, 140, 0, 0.54), rgba(255, 179, 71, 0.22));
    --install-bg: rgba(255, 154, 112, 0.10);
    --install-ink: #f8e5d5;
    --install-muted: #d8c5b7;
    --field-bg: rgba(255, 255, 255, 0.03);
    --chip-bg: rgba(236, 255, 245, 0.05);
    --chip-ink: #d9f3e8;
    --disabled-chip-bg: rgba(255, 255, 255, 0.04);
    --disabled-chip-ink: rgba(217, 243, 232, 0.44);
    --ghost-bg: rgba(255, 255, 255, 0.04);
    --meal-bg: rgba(255, 255, 255, 0.04);
    --meal-ink: #d6eadf;
    --mobile-actions-bg: rgba(8, 22, 17, 0.54);
    --mobile-actions-border: rgba(221, 242, 232, 0.12);
    --overscroll-bg: #241304;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42), 0 0 46px rgba(255, 140, 0, 0.08);
  }

  .primary {
    color: #06231a;
    box-shadow: 0 16px 34px rgba(255, 140, 0, 0.20);
  }

  .ghost {
    border-color: rgba(255, 179, 71, 0.26);
  }

  .choice input:checked + span {
    color: #061912;
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 20px, 1120px);
    grid-template-columns: 1fr;
    padding: calc(18px + var(--safe-top)) 0 calc(26px + var(--safe-bottom));
  }

  .hero {
    min-height: auto;
    padding: 30px 22px;
    justify-content: flex-start;
  }

  .hero::after {
    width: 230px;
    height: 230px;
  }

  h1 {
    font-size: clamp(50px, 17vw, 78px);
  }

  .lead {
    font-size: 16px;
  }

  .actions {
    position: static;
    bottom: auto;
    z-index: auto;
    margin: 26px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .actions button {
    flex: 1 1 140px;
  }

  .menu {
    padding: 22px;
  }
}

@media (max-width: 860px) and (pointer: coarse) {
  .actions {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
