:root {
  --ink: #10251d;
  --forest: #0b3225;
  --leaf: #195f43;
  --lime: #d9ff7a;
  --cream: #fffaf0;
  --sun: #ffb14a;
  --coral: #ff765f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, a { font: inherit; }
a { color: inherit; }

.topbar { position: fixed; z-index: 20; inset: 0 0 auto; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 5vw, 76px); color: white; background: linear-gradient(180deg, rgba(8,30,22,.82), rgba(8,30,22,0)); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: white; text-decoration: none; font-size: 1rem; letter-spacing: .01em; }
.brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 12px; }
.brand strong { color: var(--lime); }
nav { display: flex; align-items: center; gap: 26px; font-size: .92rem; font-weight: 700; }
nav a { text-decoration: none; }
.alongkind-link { padding: 10px 15px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; backdrop-filter: blur(8px); }

.garden-stage { position: relative; min-height: 760px; height: 100svh; overflow: hidden; color: white; background: url("assets/garden-backdrop.png") center/cover no-repeat; isolation: isolate; }
.stage-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(5,29,20,.82) 0%, rgba(5,29,20,.46) 40%, rgba(5,29,20,.04) 70%), linear-gradient(0deg, rgba(5,29,20,.36), transparent 38%); }
.intro { position: absolute; z-index: 2; left: clamp(22px, 7vw, 110px); top: 50%; width: min(610px, 86vw); transform: translateY(-46%); }
.eyebrow { margin: 0 0 14px; color: var(--lime); text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 850; }
.eyebrow.dark { color: var(--leaf); }
h1 { margin: 0; max-width: 750px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.4rem, 7.6vw, 7.4rem); line-height: .89; letter-spacing: -.055em; text-wrap: balance; }
.intro > p:not(.eyebrow) { max-width: 520px; margin: 25px 0 31px; font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.65; color: rgba(255,255,255,.9); }
.primary-button { display: inline-flex; align-items: center; gap: 13px; padding: 14px 20px; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 850; text-decoration: none; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.primary-button.light { background: white; }
.primary-button:hover { transform: translateY(-2px); }

.garden-portraits { position: absolute; inset: 0; pointer-events: none; }
.portrait { position: absolute; padding: 0; overflow: hidden; border: 5px solid rgba(255,255,255,.92); border-radius: 50%; background: white; box-shadow: 0 17px 40px rgba(0,0,0,.32); pointer-events: auto; cursor: pointer; transition: transform .25s ease; }
.portrait:hover { transform: translateY(-8px) rotate(2deg); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-a { right: 26%; bottom: 13%; width: clamp(110px, 12vw, 175px); aspect-ratio: 1; }
.portrait-b { right: 8%; bottom: 29%; width: clamp(95px, 10vw, 145px); aspect-ratio: 1; }
.portrait-c { right: 17%; top: 20%; width: clamp(86px, 8vw, 124px); aspect-ratio: 1; }
.scroll-note { position: absolute; bottom: 27px; left: 50%; transform: translateX(-50%); font-size: .75rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 800; }

.collection { padding: clamp(74px, 10vw, 140px) clamp(20px, 5vw, 76px); }
.collection-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; max-width: 1450px; margin: 0 auto 30px; }
h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.35rem, 4.2vw, 4.8rem); line-height: 1; letter-spacing: -.04em; }
#result-count { color: #587066; font-weight: 700; }
.filters { display: flex; gap: 9px; padding: 4px 0 32px; max-width: 1450px; margin: auto; overflow-x: auto; scrollbar-width: thin; }
.filter { flex: 0 0 auto; border: 1px solid #c6d1c8; background: transparent; color: var(--ink); border-radius: 999px; padding: 9px 15px; cursor: pointer; font-weight: 750; }
.filter[aria-pressed="true"] { color: white; background: var(--forest); border-color: var(--forest); }
.companion-grid { max-width: 1450px; margin: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.companion-card { position: relative; min-width: 0; text-align: left; padding: 0; overflow: hidden; border: 0; border-radius: 22px; background: #e9eee8; aspect-ratio: .79; cursor: pointer; box-shadow: 0 1px 0 rgba(15,52,38,.12); }
.companion-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.companion-card:hover img { transform: scale(1.035); }
.card-label { position: absolute; inset: auto 10px 10px; padding: 12px 13px; border-radius: 14px; color: white; background: rgba(9,36,27,.86); backdrop-filter: blur(10px); }
.card-label strong, .card-label span { display: block; }
.card-label strong { font-size: .98rem; }
.card-label span { margin-top: 3px; color: #cde2d6; font-size: .75rem; }

.closing { display: grid; grid-template-columns: minmax(220px, .75fr) 1.3fr; gap: clamp(30px, 8vw, 120px); align-items: center; padding: clamp(70px, 9vw, 130px) clamp(25px, 9vw, 145px); color: white; background: var(--forest); }
.closing img { width: min(100%, 420px); max-height: 430px; object-fit: contain; filter: drop-shadow(0 25px 35px rgba(0,0,0,.24)); }
.closing h2 { max-width: 780px; }
.closing p:not(.eyebrow) { max-width: 660px; margin: 24px 0 29px; color: #cfe0d6; font-size: 1.05rem; line-height: 1.7; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px clamp(20px, 5vw, 76px); color: #cfe0d6; background: #071f17; font-size: .85rem; }

dialog { width: min(900px, calc(100vw - 30px)); padding: 0; overflow: hidden; border: 0; border-radius: 25px; color: var(--ink); background: var(--cream); box-shadow: 0 30px 100px rgba(0,0,0,.45); }
dialog[open] { display: grid; grid-template-columns: 1fr 1fr; }
dialog::backdrop { background: rgba(4,22,16,.74); backdrop-filter: blur(7px); }
.dialog-close { position: absolute; z-index: 2; right: 14px; top: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 1.6rem; cursor: pointer; }
.dialog-image { min-height: 520px; background: #e5ece7; }
.dialog-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dialog-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(30px, 5vw, 65px); }
.dialog-copy h2 { font-size: clamp(2.5rem, 5vw, 4.4rem); }
.dialog-copy > p:not(.eyebrow) { margin: 21px 0 28px; line-height: 1.65; color: #53685f; }

@media (max-width: 900px) {
  .companion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .garden-portraits { opacity: .82; }
  .portrait-a { right: 5%; bottom: 12%; }
  .portrait-b { display: none; }
  .portrait-c { right: 4%; top: 18%; }
  .closing { grid-template-columns: 1fr; }
  .closing img { width: 210px; }
}

@media (max-width: 600px) {
  .topbar { height: 68px; }
  nav > a:first-child { display: none; }
  .brand span { font-size: .9rem; }
  .alongkind-link { padding: 8px 11px; }
  .garden-stage { min-height: 690px; background-position: 61% center; }
  .stage-shade { background: linear-gradient(90deg, rgba(5,29,20,.88), rgba(5,29,20,.36)), linear-gradient(0deg, rgba(5,29,20,.35), transparent); }
  .intro { top: 47%; }
  .intro > p:not(.eyebrow) { max-width: 88%; }
  .portrait { border-width: 3px; }
  .portrait-a { bottom: 4%; }
  .portrait-c { top: 13%; }
  .collection-heading { display: block; }
  #result-count { margin: 13px 0 0; }
  .companion-grid { gap: 10px; }
  .companion-card { border-radius: 15px; }
  .card-label { inset: auto 6px 6px; padding: 9px; border-radius: 11px; }
  .card-label strong { font-size: .84rem; }
  .card-label span { font-size: .68rem; }
  dialog[open] { grid-template-columns: 1fr; max-height: calc(100svh - 24px); overflow-y: auto; }
  .dialog-image { min-height: 0; height: 43svh; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
