/* Fog Fruits — styles */
:root {
  --bg: #EEEDEB;
  --ink: #1d1d1b;
  --muted: #6b6a66;
  --chip: #dcdad6;
  --paper: #FAF9F7;
  --ease: cubic-bezier(.65, 0, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --mono: 'Space Mono', ui-monospace, monospace;
  --sans: 'Inter Tight', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono { font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* ---------- background leaves ---------- */
.leaves { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.leaf { position: absolute; left: 0; top: 0; border-radius: 0 72% 0 72%; will-change: transform, opacity; }

/* ---------- header ---------- */
.top {
  position: relative; z-index: 2;
  max-width: 1440px; margin: 0 auto; padding: 28px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center;
  font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.top-nav { display: flex; gap: 28px; justify-self: start; }
.navb {
  border: 0; background: none; padding: 12px 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: none;
  opacity: .45; transition: opacity .3s;
}
.navb.is-active, .navb:hover, .contact-link { opacity: 1; }
.contact-link { justify-self: end; }
.logo {
  width: 240px; height: 44px; display: flex; align-items: center; justify-content: center;
  text-decoration: none; text-transform: none; letter-spacing: normal;
}
#logo-text {
  font-size: 32px; line-height: 1;
  transition: filter .38s cubic-bezier(.45, 0, .25, 1), opacity .38s cubic-bezier(.45, 0, .25, 1);
}
#logo-text.is-blur { filter: blur(5px); opacity: .55; }

/* ---------- main / views ---------- */
.main { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.view { transition: opacity .8s cubic-bezier(.45, 0, .25, 1), filter .8s cubic-bezier(.45, 0, .25, 1); }
.view.is-hidden { opacity: 0; filter: blur(20px); pointer-events: none; }
.stage { position: relative; height: min(640px, 72vh); margin-top: 32px; }

/* ---------- fruits ---------- */
.fruit {
  position: absolute; aspect-ratio: 1 / 1; border: 0; padding: 0; background: none; cursor: pointer;
  transition: left 1.1s var(--ease), top 1.1s var(--ease), width 1.1s var(--ease), opacity .8s ease, filter .9s ease;
}
.fruit.is-off { opacity: 0; filter: blur(18px); pointer-events: none; }
.fruit .mv { position: absolute; inset: 0; transition: transform 1.4s var(--ease-out); }
.fruit .sc { position: absolute; inset: 0; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.fruit .fin { position: absolute; inset: 0; border-radius: 50%; filter: blur(8px); transition: filter .6s; }
.fruit .grain {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; mix-blend-mode: overlay;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
}
.fruit:hover .sc { transform: scale(1.07); }
.fruit:hover .fin, .fruit:focus-visible .fin { filter: blur(1.5px); }
.fruit:focus-visible { outline: none; }
.ring { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; animation: spin 24s linear infinite; pointer-events: none; }
.ring i {
  position: absolute; left: 50%; top: -20px; width: 1ch; margin-left: -.5ch; height: calc(50% + 20px);
  transform-origin: 50% 100%; font: 700 11px/1 var(--mono); font-style: normal; color: var(--ink); text-align: center;
}
.fruit:hover .ring, .fruit:focus-visible .ring { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: none) {
  .fruit .ring { display: none; }
}

/* ---------- about ---------- */
.view-about {
  position: absolute; inset: 32px 40px 0; display: flex; align-items: center; justify-content: center;
}
.about-fog { position: absolute; left: 50%; top: 50%; width: min(560px, 80vw); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); }
.about-fog span { position: absolute; inset: 0; border-radius: 50%; filter: blur(36px); opacity: 0; transition: opacity 1.8s cubic-bezier(.45, 0, .25, 1); }
.about-fog span.is-on { opacity: .85; }
.about-text { position: relative; max-width: 540px; text-align: center; display: flex; flex-direction: column; gap: 18px; }
.about-text p {
  margin: 0; font-size: clamp(17px, 1.5vw, 21px); font-weight: 400; line-height: 1.6; letter-spacing: -.005em;
  color: #2a2927; text-wrap: pretty;
}

/* ---------- detail ---------- */
.detail { position: absolute; inset: 0 0 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 16px; }
.detail[hidden] { display: none; }
.detail-backdrop {
  position: fixed; inset: 0; border: 0; padding: 0; cursor: default;
  background: rgba(238, 237, 235, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fade .6s ease both;
}
.detail-circle {
  position: relative; width: min(660px, 96vw); aspect-ratio: 1 / 1; border-radius: 50%;
  background: radial-gradient(circle closest-side, var(--paper) 0%, var(--paper) 76%, rgba(250, 249, 247, .6) 88%, rgba(250, 249, 247, 0) 100%);
  animation: pop .8s var(--ease-out) both;
}
.detail-image { position: absolute; left: 15%; top: 9%; width: 70%; height: 43%; }
.detail-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-blur {
  filter: blur(14px);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 40%, rgba(0, 0, 0, .5) 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 40%, rgba(0, 0, 0, .5) 70%, transparent 100%);
}
.img-sharp {
  -webkit-mask-image: radial-gradient(ellipse 36% 38% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 36% 38% at 50% 50%, #000 30%, transparent 100%);
}
.detail-body { position: absolute; left: 18%; right: 18%; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.detail-body .mono { font-size: 11px; }
.detail-body h2 { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.detail-body p { margin: 0; font-size: 15px; line-height: 1.55; color: #4a4946; text-wrap: pretty; }
.detail-actions { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
@keyframes pop { from { opacity: 0; transform: scale(.9); filter: blur(12px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- chips (filters + buttons) ---------- */
.chip {
  border: 0; cursor: pointer; min-height: 44px; padding: 0 18px; border-radius: 12px; white-space: nowrap;
  display: inline-flex; align-items: center; text-decoration: none;
  font: 700 12px var(--mono); letter-spacing: .06em; text-transform: uppercase;
  background: var(--chip); color: var(--ink);
  transition: background .45s var(--ease), color .45s var(--ease), transform .2s;
}
.chip:active { transform: scale(.96); }
.chip .dot { display: inline-block; width: 0; height: 6px; margin-right: 0; background: currentColor; transition: width .45s var(--ease), margin .45s var(--ease); }
.chip.is-active, .chip-dark { background: var(--ink); color: #fff; }
.chip.is-active .dot, .chip-dark .dot { width: 6px; margin-right: 10px; }
#detail-close:hover { background: var(--ink); color: #fff; }

.filters {
  position: fixed; left: 50%; bottom: 24px; z-index: 10; transform: translateX(-50%);
  display: flex; gap: 6px; max-width: calc(100vw - 32px); overflow-x: auto;
  transition: transform .7s var(--ease), opacity .5s;
}
.filters.is-hidden { transform: translate(-50%, 120px); opacity: 0; pointer-events: none; }

/* ---------- progressive blur band ---------- */
.blur-band { position: fixed; left: 0; right: 0; bottom: 0; height: 90px; z-index: 9; pointer-events: none; }
.blur-band div { position: absolute; inset: 0; }
.blur-band div:nth-child(1) { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%); mask-image: linear-gradient(to bottom, transparent 0%, #000 35%); }
.blur-band div:nth-child(2) { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); -webkit-mask-image: linear-gradient(to bottom, transparent 25%, #000 65%); mask-image: linear-gradient(to bottom, transparent 25%, #000 65%); }
.blur-band div:nth-child(3) { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); -webkit-mask-image: linear-gradient(to bottom, transparent 55%, #000 100%); mask-image: linear-gradient(to bottom, transparent 55%, #000 100%); }

/* ---------- footer ---------- */
.footer {
  position: relative; z-index: 1;
  max-width: 1440px; margin: 0 auto; padding: 32px 40px 120px; border-top: 1px solid #d9d7d2;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .top { padding: 20px; grid-template-columns: 1fr auto; }
  .logo { grid-column: 1 / -1; grid-row: 1; width: 100%; }
  .top-nav { grid-row: 2; gap: 20px; }
  .contact-link { grid-row: 2; }
  .main { padding: 0 20px; }
  .stage { height: 70vh; margin-top: 8px; }
  .view-about { inset: 8px 20px 0; }
  .detail-body h2 { font-size: 24px; }
  .detail-body p { font-size: 13px; }
  .detail-body { left: 14%; right: 14%; top: 48%; gap: 6px; }
  .footer { padding: 24px 20px 110px; }
  .filters .chip { padding: 0 12px; font-size: 11px; }
  .filters { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
