@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;900&family=Nunito+Sans:wght@400;600&display=swap');

/* Pickatale Brand — Design System */
:root {
  /* Primary Greens */
  --dark-green:    #0B4230;
  --green-grass:   #116C4F;
  --mint:          #AADBCB;
  --moss-green:    #D4EDE5;
  --frozen-green:  #EBF5F2;

  /* Warm Neutrals */
  --cream:         #FFF9F8;
  --soft-sand:     #F5E7E1;

  /* Accents */
  --sun:           #FCC128;
  --berry-red:     #FF444F;

  /* Typography (Ambit-like via Nunito Black) */
  --font-display:  'Nunito', sans-serif;
  --font-body:     'Nunito Sans', sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  background: var(--dark-green);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ── Decorative pattern elements (brand pattern system) ── */
body::before,
body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.18;
}

/* Large circle — bottom-left corner (grows from corner per brand rules) */
body::before {
  width: 380px;
  height: 380px;
  background: var(--green-grass);
  bottom: -120px;
  left: -120px;
}

/* Smaller accent circle — top-right */
body::after {
  width: 180px;
  height: 180px;
  background: var(--mint);
  top: -60px;
  right: -60px;
}

/* Leaf-petal decorative shapes */
.petal-tl,
.petal-br,
.dot-accent-1,
.dot-accent-2 {
  position: absolute;
  pointer-events: none;
}

/* Top-left petal */
.petal-tl {
  width: 120px;
  height: 60px;
  background: var(--green-grass);
  border-radius: 60px 60px 0 0;
  top: 60px;
  left: 40px;
  opacity: 0.22;
  transform: rotate(-30deg);
}

/* Bottom-right petal */
.petal-br {
  width: 90px;
  height: 45px;
  background: var(--mint);
  border-radius: 45px 45px 0 0;
  bottom: 80px;
  right: 50px;
  opacity: 0.25;
  transform: rotate(140deg);
}

/* Sun accent dot */
.dot-accent-1 {
  width: 28px;
  height: 28px;
  background: var(--sun);
  border-radius: 50%;
  top: 120px;
  left: 80px;
  opacity: 0.55;
}

/* Berry red accent dot */
.dot-accent-2 {
  width: 18px;
  height: 18px;
  background: var(--berry-red);
  border-radius: 50%;
  bottom: 140px;
  right: 90px;
  opacity: 0.5;
}

/* ── Calculator Card ── */
.calc {
  width: min(380px, 92vw);
  background: var(--cream);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(11, 66, 48, 0.45);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* Brand wordmark header */
.calc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}

.calc-header .brand-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--dark-green);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.calc-header .brand-dot {
  width: 8px;
  height: 8px;
  background: var(--sun);
  border-radius: 50%;
  display: inline-block;
  margin-left: 2px;
}

/* ── Display ── */
.display {
  width: 100%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  padding: 18px 16px;
  border: none;
  border-radius: 16px;
  text-align: right;
  background: var(--frozen-green);
  color: var(--dark-green);
  letter-spacing: 0.02em;
  outline: none;
  box-shadow: inset 0 2px 8px rgba(11, 66, 48, 0.1);
}

/* ── Button Grid ── */
.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

button {
  padding: 20px 8px;
  border-radius: 14px;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s, box-shadow 0.12s;
  background: var(--moss-green);
  color: var(--dark-green);
  box-shadow: 0 2px 0 rgba(11, 66, 48, 0.15);
}

button:hover {
  background: var(--mint);
  box-shadow: 0 4px 12px rgba(11, 66, 48, 0.18);
}

button:active {
  transform: scale(0.94);
  box-shadow: none;
}

button.span-2 {
  grid-column: span 2;
}

/* Operator buttons — Green Grass */
button.btn-op {
  background: var(--green-grass);
  color: var(--cream);
  font-size: 1.2rem;
}

button.btn-op:hover {
  background: #148f68;
}

/* Clear button — Soft Sand with dark green text */
button.btn-clear {
  background: var(--soft-sand);
  color: var(--dark-green);
  font-weight: 900;
}

button.btn-clear:hover {
  background: #ecd9d0;
}

/* Equals button — Sun Yellow (primary accent) */
button.btn-eq {
  background: var(--sun);
  color: var(--dark-green);
  font-weight: 900;
  font-size: 1.3rem;
  box-shadow: 0 3px 0 #c99200;
}

button.btn-eq:hover {
  background: #ffd152;
}

button.btn-eq:active {
  box-shadow: none;
}

@media (max-width: 420px) {
  .calc { width: 100%; }
}
