/* Apple, Itself — Global Styles */

:root {
  --bg:          #fff9f2;
  --bg2:         #ffedd9;
  --bg-card:     #EDE0C8;
  --bg-card2:    #E4D5B7;
  --text:        #8A6060;
  --text-muted:  #7A6555;
  --accent:      #C46A3A;
  --radius-pill: 999px;
  --radius-card: 1.25rem;

  --font-title:  'Playwrite AU NSW', cursive;
  --font-body:   'Belanosima', sans-serif;
  --font-label:  'Darumadrop One', sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: url('../images/cursor-apple.svg') 14 15, auto;
}

img {
  max-width: 100%;
  display: block;
}


/* --- Apple Detail Page --- */

.apple-page {
  width: 100%;
  padding-bottom: 5rem;
}

.apple-info,
.rating-card,
.apple-footer {
  max-width: 31.25rem;
  margin-left: auto;
  margin-right: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0;
  position: relative;
  z-index: 10;
}

.back-btn {
  font-size: 1.4rem;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1;
  padding: 0.375rem 0.25rem;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--text);
}

.menu-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--text);
  border-radius: var(--radius-pill);
  padding: 0.375rem 1.125rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}

.menu-btn:hover {
  background: var(--text);
  color: var(--bg);
}

.apple-name {
  font-family: var(--font-title);
  font-size: 3.2rem;
  font-style: italic;
  font-weight: 300;
  color: var(--apple-dark, #7A4F1A);
  text-align: center;
  line-height: 1.05;
  margin: 3rem 2rem 4rem;
  letter-spacing: -0.01em;
}

.apple-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
}

.apple-wrapper {
  width: 70%;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease;
}

.apple-wrapper:active {
  transform: scale(0.97);
}

.apple-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.tap-hint {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.625rem;
  letter-spacing: 0.04em;
  transition: opacity 0.4s ease;
}

.tap-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.bite-comment {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  min-height: 1.5em;
  margin-top: 0.5rem;
  padding: 0 2rem;
  transition: opacity 0.35s ease;
  opacity: 0;
}

.bite-comment.visible {
  opacity: 1;
}

.apple-info {
  padding: 1.5rem 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.apple-origin {
  font-family: var(--font-label);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.apple-description {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}

.personal-note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 0.25rem 0;
}

.note-author {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-label);
  font-size: 0.82rem;
}

.rating-card {
  margin-top: 1.5rem;
  background: var(--bg2);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rating-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0;
}

.rating-placeholder__text {
  font-family: var(--font-label);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rating-card.revealed .rating-placeholder {
  display: none;
}

.rating-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.rating-card.revealed .rating-row {
  display: flex;
  opacity: 0;
  animation: fadeInRow 0.35s ease forwards;
}

.rating-card.revealed .rating-row:nth-child(2) { animation-delay: 0.00s; }
.rating-card.revealed .rating-row:nth-child(3) { animation-delay: 0.06s; }
.rating-card.revealed .rating-row:nth-child(4) { animation-delay: 0.12s; }
.rating-card.revealed .rating-row:nth-child(5) { animation-delay: 0.18s; }
.rating-card.revealed .rating-row:nth-child(6) { animation-delay: 0.24s; }
.rating-card.revealed .rating-row:nth-child(7) { animation-delay: 0.30s; }
.rating-card.revealed .rating-row:nth-child(8) { animation-delay: 0.36s; }

@keyframes fadeInRow {
  from { opacity: 0; transform: translateY(0.4rem); }
  to   { opacity: 1; transform: translateY(0); }
}

.rating-row--alicia {
  margin-top: 0.375rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bg-card2);
}

.rating-label {
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.rating-dots {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.rating-dots svg {
  display: block;
}

.apple-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.5rem 0;
}

.purchase-info {
  font-family: var(--font-label);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
}

.sticker-wrap {
  width: 8.125rem;
}

.sticker-img {
  width: 100%;
  height: auto;
  display: block;
}

@media screen and (min-width: 850px) {
  .apple-page {
    padding-bottom: 8.75rem;
  }

  .apple-info,
  .rating-card,
  .apple-footer {
    max-width: 42.5rem;
  }

  .top-nav {
    padding: 2.25rem 4rem 0;
  }

  .back-btn {
    font-size: 1.8rem;
  }

  .menu-btn {
    font-size: 0.95rem;
    padding: 0.5rem 1.625rem;
  }

  .apple-stage {
    margin-top: 3.5rem;
  }

  .apple-name {
    font-size: 7rem;
    margin: 4rem 2rem 6rem;
  }

  .apple-wrapper {
    width: 52%;
    max-width: 45rem;
  }

  .tap-hint {
    font-size: 0.95rem;
    margin-top: 1.125rem;
  }

  .bite-comment {
    font-size: 1.15rem;
    margin-top: 0.875rem;
  }

  .apple-info {
    padding: 3.25rem 2.5rem 0;
    gap: 1.25rem;
  }

  .apple-origin {
    font-size: 0.85rem;
  }

  .apple-description {
    font-size: 1.15rem;
  }

  .personal-note {
    font-size: 1.1rem;
    padding: 0.5rem 0;
  }

  .note-author {
    font-size: 0.95rem;
  }

  .rating-card {
    margin-top: 2.75rem;
    padding: 2.25rem 2.75rem;
    gap: 1rem;
  }

  .rating-label {
    font-size: 1rem;
  }

  .rating-dots .dot {
    width: 0.875rem;
    height: 0.875rem;
  }

  .rating-dots {
    gap: 0.375rem;
  }

  .rating-row--alicia {
    padding-top: 1.125rem;
  }

  .apple-footer {
    padding: 3.75rem 2.5rem 0;
    gap: 3rem;
  }

  .purchase-info {
    font-size: 1.2rem;
  }

  .sticker-wrap {
    width: 11.25rem;
  }
}


/* --- Home Page --- */

.home-nav {
  display: flex;
  justify-content: flex-end;
  padding: 1.25rem 1.25rem 0;
}

.home-nav__links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.home-nav__btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  padding: 0;
}

.hero {
  display: flex;
  align-items: flex-start;
  padding: 0.5rem 0 0 1.25rem;
  overflow: hidden;
}

.hero__title-wrap {
  flex: 1;
  padding-top: 0.75rem;
  min-width: 0;
}

.site-title {
  font-family: Shrikhand, cursive;
  font-size: 4rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero__basket {
  width: 58%;
  flex-shrink: 0;
  margin-right: -2%;
  margin-top: 6rem;
  position: relative;
  bottom: 10%;
}

.hero__basket img {
  width: 100%;
  height: auto;
  display: block;
}

.home-intro {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  text-align: center;
  padding: 2rem 1.75rem 2.5rem;
  max-width: 30rem;
  margin: 0 auto;
}

.lower-section {
  background: var(--bg2);
  clip-path: polygon(0 2.8125rem, 100% 0, 100% 100%, 0 100%);
  padding-top: 6rem;
  margin-top: -2.8rem;
}

.grid-section {
  padding: 2rem 2rem 0;
}

.apple-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 1.75rem;
}

.apple-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  cursor: pointer;
}

.apple-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.apple-card:hover img {
  transform: scale(1.06);
}

.apple-card__name {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

.apple-card--placeholder {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.apple-card__placeholder-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.25;
}

.apple-card--mystery {
  opacity: 0.35;
  transition: opacity 0.25s ease;
}

.apple-card--mystery .apple-card__placeholder-img {
  transition: transform 0.25s ease;
}

.apple-card--mystery:hover {
  opacity: 0.65;
}

.apple-card--mystery:hover .apple-card__placeholder-img {
  transform: scale(1.12);
}

.appleti-wrap {
  display: flex;
  justify-content: center;
  padding: 2.25rem 0 3.75rem;
}

.appleti-btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 2px solid var(--text);
  border-radius: var(--radius-pill);
  padding: 0.75rem 3.25rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.appleti-btn:hover {
  background: var(--text);
  color: var(--bg);
}

@media screen and (min-width: 850px) {
  .home-nav {
    padding: 1.75rem 3.75rem 0;
  }

  .home-nav__btn {
    font-size: 1rem;
  }

  .hero {
    padding: 0.75rem 0 0 3.75rem;
    max-width: 75rem;
    margin: 0 auto;
  }

  .site-title {
    font-size: 6rem;
  }

  .hero__basket {
    width: 62%;
  }

  .home-intro {
    font-size: 1.05rem;
    padding: 3rem 2.5rem 4rem;
    max-width: 40rem;
  }

  .grid-section {
    padding: 3.25rem 5rem 6rem;
    max-width: 80rem;
    margin: 0 auto;
  }

  .apple-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 5rem 4rem;
  }

  .apple-card__name {
    font-size: 1.3rem;
  }

  .appleti-btn {
    font-size: 1.1rem;
    margin: 3.75rem 0 2rem;
    padding: 0.875rem 4.5rem;
  }

  .lower-section {
    clip-path: polygon(0 6rem, 100% 0, 100% 100%, 0 100%);
    padding-top: 12rem;
    margin-top: -4rem;
  }
}


/* --- Appleti Quiz Page --- */

.quiz-page {
  min-height: 100vh;
}

.quiz-wrap {
  max-width: 30rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 5rem;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quiz-screen {
  opacity: 1;
  transition: opacity 0.28s ease;
}

.quiz-screen.fading {
  opacity: 0;
}

.quiz-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.25rem;
}

.quiz-apple-progress {
  display: block;
}

.quiz-progress__count {
  font-family: var(--font-label);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.quiz-q-text {
  font-size: 1.45rem;
  line-height: 1.6;
  color: var(--text);
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.quiz-option {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--opt-bg, transparent);
  border: 1.5px solid var(--opt-border, var(--bg-card2));
  border-radius: var(--radius-card);
  padding: 1rem 1.4rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s, background 0.15s, color 0.15s, filter 0.15s;
}

.quiz-option[data-i="0"] {
  --opt-border: rgba(184,155,48,0.5);
  --opt-bg: rgba(184,155,48,0.07);
  --opt-hover-bg: rgba(184,155,48,0.16);
  --opt-solid: #9E8420;
}
.quiz-option[data-i="1"] {
  --opt-border: rgba(192,104,128,0.5);
  --opt-bg: rgba(192,104,128,0.07);
  --opt-hover-bg: rgba(192,104,128,0.16);
  --opt-solid: #B05870;
}
.quiz-option[data-i="2"] {
  --opt-border: rgba(192,88,64,0.5);
  --opt-bg: rgba(192,88,64,0.07);
  --opt-hover-bg: rgba(192,88,64,0.16);
  --opt-solid: #B04030;
}
.quiz-option[data-i="3"] {
  --opt-border: rgba(88,144,64,0.5);
  --opt-bg: rgba(88,144,64,0.07);
  --opt-hover-bg: rgba(88,144,64,0.16);
  --opt-solid: #488030;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--opt-border, var(--accent));
  background: var(--opt-hover-bg, var(--bg2));
}

.quiz-option.selected {
  border-color: var(--opt-solid, var(--accent));
  background: var(--opt-solid, var(--accent));
  color: #fff;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  text-align: center;
}

.quiz-result__img {
  width: 60%;
  max-width: 14rem;
  height: auto;
  display: block;
  margin: 0 auto 0.25rem;
}

.quiz-result__label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: -0.375rem;
}

.quiz-result__name {
  font-family: var(--font-title);
  font-size: 3.5rem;
  color: var(--text);
  line-height: 1;
  margin: 2rem 0;
}

.quiz-result__copy {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-style: italic;
  max-width: 22rem;
}

.quiz-result__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
  width: 100%;
}

.quiz-result__meet {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  border-radius: var(--radius-pill);
  padding: 0.75rem 2.5rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s;
}

.quiz-result__meet:hover {
  background: var(--accent);
}

.quiz-result__home {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--text);
  border-radius: var(--radius-pill);
  padding: 0.75rem 2.5rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}

.quiz-result__home:hover {
  background: var(--text);
  color: var(--bg);
}

.quiz-result__retry {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

.quiz-back {
  display: block;
  margin: 1.25rem auto 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
  text-align: center;
  transition: color 0.15s;
}

.quiz-back:hover {
  color: var(--text);
}

.lang-toggle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--bg-card2);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.625rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color 0.15s, border-color 0.15s;
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.quiz-option.selected {
  animation: optionBite 0.24s ease;
}

@keyframes optionBite {
  0%   { transform: scale(1); }
  22%  { transform: scale(0.965); }
  60%  { transform: scale(1.01); }
  100% { transform: scale(1); }
}

@keyframes resultBounce {
  from { opacity: 0; transform: scale(0.8); }
  60%  { transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

.quiz-result__img     { animation: resultBounce 0.45s ease forwards; }
.quiz-result__label   { animation: fadeInRow 0.35s ease 0.1s  both; }
.quiz-result__name    { animation: fadeInRow 0.35s ease 0.2s  both; }
.quiz-result__copy    { animation: fadeInRow 0.35s ease 0.32s both; }
.quiz-result__actions { animation: fadeInRow 0.35s ease 0.44s both; }
.quiz-result__retry   { animation: fadeInRow 0.35s ease 0.54s both; }

@media screen and (min-width: 850px) {
  .quiz-wrap {
    max-width: 40rem;
    padding: 2rem 2rem 5rem;
  }

  .quiz-q-text {
    font-size: 1.65rem;
  }

  .quiz-option {
    font-size: 1.15rem;
    padding: 1.1rem 1.75rem;
  }

  .quiz-result__name {
    font-size: 5rem;
  }

  .quiz-result__copy {
    font-size: 1.05rem;
  }
}


/* --- Lucky Apple Page --- */

.easter-label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: -2rem;
}

@media screen and (min-width: 850px) {
  .easter-label {
    margin-top: 3.5rem;
    margin-bottom: -3.5rem;
  }
}

.lucky-fortune {
  max-width: 31.25rem;
  margin: 1.5rem auto 0;
  padding: 0 1.75rem;
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-muted);
  text-align: center;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.lucky-fortune.visible {
  opacity: 1;
  transform: translateY(0);
}

@media screen and (min-width: 850px) {
  .lucky-fortune {
    max-width: 42.5rem;
    font-size: 0.9rem;
  }
}


/* --- Menu Dropdown --- */

.menu-dropdown {
  position: fixed;
  z-index: 200;
  background: var(--bg);
  border: 1.5px solid var(--text);
  border-radius: 1rem;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;

  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.375rem);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body.show-menu .menu-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-dropdown__link {
  font-family: var(--font-title);
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.6;
  transition: color 0.15s;
}

.menu-dropdown__link:hover {
  color: var(--accent);
}
