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

:root {
  --bg: #F2F0EF;
  --white: #FFFFFF;
  --green: #2D6A4F;
  --green-mid: #40916C;
  --green-light: #D8F3DC;
  --green-pale: #EBF7EE;
  --text: #1B4332;
  --muted: #52796F;
  --border: rgba(45, 106, 79, .16);
  --shadow: 0 6px 30px rgba(45, 106, 79, .09);
  --shadow-h: 0 14px 44px rgba(45, 106, 79, .16);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html {
  font-family: 'Outfit', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

button {
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
}

a {
  text-decoration: none;
}

.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
}

.screen.active {
  display: flex;
  animation: screenEnter 0.45s var(--ease) forwards;
}

.screen.exiting {
  display: flex;
  animation: screenExit 0.4s var(--ease) forwards;
  pointer-events: none;
}

@keyframes screenEnter {
  from {
    opacity: 0;
    transform: scale(1.01) translateY(-8px);
  }

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

@keyframes screenExit {
  from {
    opacity: 1;
    transform: scale(0.97) translateY(12px);
  }

  to {
    opacity: 0;
    transform: scale(0.97) translateY(12px);
  }
}

#welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .65s var(--ease);
}

#welcome-screen.out {
  opacity: 0;
  pointer-events: none;
}

.rings-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}

#welcome-screen .r1 {
  width: 700px;
  height: 700px;
}

#welcome-screen .r2 {
  width: 460px;
  height: 460px;
  opacity: .65;
}

#welcome-screen .r3 {
  width: 240px;
  height: 240px;
  opacity: .45;
}

.welcome-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand-tag {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .7s var(--ease) forwards .2s;
}

#welcome-text {
  font-size: clamp(4rem, 13vw, 9rem);
  font-weight: 200;
  color: var(--green);
  line-height: 1;
  letter-spacing: -.03em;
  margin: 14px 0 20px;
  opacity: 0;
  transform: translateY(48px);
  animation: fadeUp 1s var(--ease) forwards .4s;
}

.divider-line {
  width: 0;
  height: 1px;
  background: var(--green);
  opacity: .22;
  margin-bottom: 34px;
  animation: grow .8s var(--ease) forwards 1.15s;
}

#enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
  font-size: .9rem;
  font-weight: 400;
  letter-spacing: .05em;
  padding: 14px 30px;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .7s var(--ease) forwards 1.5s;
  transition: background .3s, color .3s, transform .3s, box-shadow .3s;
}

#enter-btn:hover {
  background: var(--green);
  color: var(--white);
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 28px rgba(45, 106, 79, .28);
}

#enter-btn svg {
  transition: transform .3s;
}

#enter-btn:hover svg {
  transform: translateX(5px);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 52px;
  flex-shrink: 0;
}

.logo-text {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
}

.dot-trio {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dot-trio span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-trio span:nth-child(1) {
  background: var(--green-light);
}

.dot-trio span:nth-child(2) {
  background: var(--green-mid);
}

.dot-trio span:nth-child(3) {
  background: var(--green);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--green);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: opacity .2s;
}

.back-btn:hover {
  opacity: .6;
}

.hero-area {
  min-height: calc(100vh - 85px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 40px 24px 80px;
  overflow: hidden;
}

.hero-rings {
  position: absolute;
  inset: 0;
}

.hero-rings .r1 {
  width: 620px;
  height: 620px;
}

.hero-rings .r2 {
  width: 340px;
  height: 340px;
  opacity: .55;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

[data-anim] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}

[data-anim].visible {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.main-heading {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 300;
  color: var(--green);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.sub-heading {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--green);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding: 10px 22px;
  box-shadow: var(--shadow);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  margin-top: 14px;
}

.ghost-link:hover {
  border-color: var(--green-mid);
  background: var(--green-pale);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 106, 79, 0.12);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 15px 36px;
  border-radius: 100px;
  border: none;
  transition: transform .3s, box-shadow .3s, background .3s, color .3s;
  margin-top: 10px;
}

.pill-btn svg {
  transition: transform .3s;
}

.green-btn {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 22px rgba(45, 106, 79, .28);
}

.green-btn:hover {
  background: var(--green-mid);
  transform: translateY(-3px);
  box-shadow: 0 10px 34px rgba(45, 106, 79, .36);
}

.green-btn:hover svg {
  transform: translateX(5px);
}

.outline-btn {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
}

.outline-btn:hover {
  background: var(--green);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(45, 106, 79, .24);
}

.outline-btn:hover svg {
  transform: rotate(-50deg);
}

.site-footer {
  background: var(--green);
  color: rgba(255, 255, 255, .88);
  padding: 60px 52px 36px;
  flex-shrink: 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 400px;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: .95rem;
  font-weight: 300;
  font-style: italic;
  color: rgba(255, 255, 255, .65);
  margin-bottom: 14px;
}

.footer-about {
  font-size: .86rem;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, .55);
}

.footer-connect {
  flex-shrink: 0;
}

.footer-section-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, .82);
  font-size: .9rem;
  font-weight: 400;
  transition: color .25s, transform .25s;
  padding: 4px 0;
}

.social-link:hover {
  color: #fff;
  transform: translateX(5px);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .25s;
}

.social-link:hover .social-icon {
  background: rgba(255, 255, 255, .22);
}

.footer-rule {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-bottom: 22px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .76rem;
  color: rgba(255, 255, 255, .35);
  flex-wrap: wrap;
  gap: 8px;
}

.pip-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pip {
  width: 8px;
  height: 8px;
  border-radius: 100px;
  background: var(--green-light);
  transition: all .4s var(--ease);
}

.pip.active {
  width: 26px;
  background: var(--green);
}

.pip.done {
  background: var(--green-mid);
}

.quiz-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px 64px;
}

.q-slide {
  max-width: 540px;
  width: 100%;
  text-align: center;
  animation: slideUp .5s var(--ease) both;
}

.q-label {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.q-text {
  font-size: clamp(1.7rem, 4.5vw, 2.7rem);
  font-weight: 300;
  color: var(--green);
  line-height: 1.2;
  letter-spacing: -.015em;
  margin-bottom: 44px;
}

.opts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opt-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: transparent;
  text-align: left;
  transition: border-color .25s, background .25s, transform .25s, box-shadow .25s;
}

.opt-card:hover {
  border-color: var(--green);
  background: var(--green-pale);
  transform: translateX(5px);
  box-shadow: var(--shadow);
}

.opt-card:active {
  transform: scale(.98);
}

.opt-card:disabled {
  opacity: .6;
  pointer-events: none;
}

.opt-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.opt-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.opt-sub {
  font-size: .8rem;
  font-weight: 300;
  color: var(--muted);
}

.opt-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green-pale);
  border: 1px solid var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: background .25s, transform .25s;
}

.opt-card:hover .opt-icon {
  background: var(--green-light);
  transform: scale(1.08);
}

.results-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 24px 64px;
}

.results-title-block {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.results-h2 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 300;
  color: var(--green);
  letter-spacing: -.02em;
}

.results-sub {
  font-size: .9rem;
  font-weight: 300;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 22px;
  width: 100%;
  max-width: 900px;
  margin-bottom: 52px;
  perspective: 1000px;
}

.crop-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
  transition: box-shadow 0.3s var(--ease);
  transform-style: preserve-3d;
}

.crop-card.in {
  animation: embercoFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.15s);
}

.crop-card.in:hover {
  box-shadow: var(--shadow-h);
}

.crop-card.in:hover .card-top,
.crop-card.in:hover .card-body {
  transform: translateY(-8px) translateZ(25px);
}

.card-top {
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  transition: transform 0.3s var(--ease);
  transform: translateZ(25px);
}

.card-body {
  padding: 20px 24px 26px;
  transition: transform 0.3s var(--ease);
  transform: translateZ(10px);
}

.match-badge {
  display: inline-block;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-mid);
  background: var(--green-light);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.crop-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.crop-reason {
  font-size: .87rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.65;
}

.hist-page-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 24px 64px;
}

.history-title-block {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.history-h2 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 300;
  color: var(--green);
  letter-spacing: -.02em;
}

.hist-list {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
  animation: slideUp .4s var(--ease) both;
}

.hist-row:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-h);
}

.hist-row-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hist-num {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hist-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.hist-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hist-tag {
  font-size: .68rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--green-light);
  color: var(--green-mid);
}

.hist-arrow {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .25s;
}

.hist-row:hover .hist-arrow {
  transform: translateX(4px);
  color: var(--green);
}

.hist-empty {
  text-align: center;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hist-empty-icon {
  font-size: 3rem;
  opacity: .5;
}

.hist-empty-title {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--green);
}

.hist-empty-sub {
  font-size: .88rem;
  font-weight: 300;
  color: var(--muted);
}

.hist-empty-btn {
  margin-top: 12px;
}

.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(27, 67, 50, .38);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}

.panel-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.h-panel {
  background: var(--bg);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
  transform: translateY(24px) scale(.96);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}

.panel-overlay.open .h-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.h-panel-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.h-panel-tag {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.h-panel-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.h-close-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green-pale);
  border: none;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .2s;
}

.h-close-btn:hover {
  background: var(--green-light);
  transform: rotate(90deg);
}

.h-panel-body {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(45, 106, 79, .06);
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.panel-overlay.open .mini-card {
  animation: embercoFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.12s);
}

.mini-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 26px rgba(45, 106, 79, .14) !important;
}

.mini-emoji {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.mini-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-badge {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-mid);
}

.mini-name {
  font-size: .98rem;
  font-weight: 600;
  color: var(--text);
}

.mini-reason {
  font-size: .78rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.55;
}

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

@keyframes grow {
  to {
    width: 56px;
    opacity: .22;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

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

@keyframes embercoFadeUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 36px;
  }

  .footer-brand {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .top-bar {
    padding: 20px 24px;
  }

  .main-heading {
    font-size: 2.4rem;
  }

  .q-text {
    font-size: 1.65rem;
    margin-bottom: 30px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  #welcome-text {
    font-size: 4rem;
  }

  .site-footer {
    padding: 48px 24px 30px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  #welcome-screen .r1 {
    width: 320px;
    height: 320px;
  }

  #welcome-screen .r2 {
    width: 200px;
    height: 200px;
  }

  #welcome-screen .r3 {
    width: 100px;
    height: 100px;
  }
}