/* IsoPets Toy Factory — one simple page */
:root {
    --teal: #0ea7a3;
    --teal-deep: #0b8f9b;
    --navy: #163147;
    --soft: #4d708c;
    --line: #dbe7ef;
    --bg: #ffffff;
    --bg-2: #f3f9ff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--navy); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--teal-deep); }
h1, h2, .go, .toy em, .brand span { font-family: "Fredoka", sans-serif; }

.top { max-width: 720px; margin: 0 auto; padding: 1.4rem 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--navy); }
.brand img { height: 26px; width: auto; }
.brand span { font-size: 0.95rem; font-weight: 600; color: var(--teal-deep); }
.top-link { font-size: 0.9rem; text-decoration: none; color: var(--soft); }
.top-link:hover { color: var(--navy); }

main { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.hero { text-align: center; margin-bottom: 2rem; }
h1 { font-size: clamp(2.4rem, 7vw, 3.8rem); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 0.8rem; }
.hero p { font-size: 1.1rem; color: var(--soft); max-width: 32rem; margin: 0 auto; }

.factory { display: grid; gap: 1rem; }
.drop { position: relative; display: grid; place-items: center; min-height: 240px; border: 2px dashed var(--navy); border-radius: 24px; background: var(--bg-2); cursor: pointer; overflow: hidden; transition: background 0.15s, border-color 0.15s; }
.drop:hover, .drop.over { background: #e6f7f6; border-color: var(--teal); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop-inner { display: grid; justify-items: center; gap: 0.25rem; text-align: center; padding: 1rem; }
.drop-icon { font-size: 2.2rem; }
.drop-inner strong { font-size: 1.1rem; }
.drop-sub { font-size: 0.9rem; color: var(--soft); }
.drop.has img + .drop-inner { position: absolute; bottom: 12px; background: rgba(255, 255, 255, 0.92); border-radius: 999px; padding: 0.4rem 1rem; gap: 0; }
.drop.has .drop-icon, .drop.has .drop-sub { display: none; }

.toys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.toy { position: relative; cursor: pointer; }
.toy input { position: absolute; opacity: 0; inset: 0; }
.toy span { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.9rem 0.5rem; border: 2px solid var(--line); border-radius: 16px; background: #fff; transition: border-color 0.15s, background 0.15s; }
.toy em { font-style: normal; font-weight: 600; font-size: 1.05rem; }
.toy b { font-weight: 500; color: var(--soft); font-size: 0.95rem; }
.toy:hover span { border-color: var(--navy); }
.toy input:checked + span { border-color: var(--teal); background: #e6f7f6; }
.toy input:checked + span b { color: var(--teal-deep); }
.toy input:focus-visible + span { outline: 3px solid #b5e6e3; }

.go { width: 100%; padding: 1rem 1.5rem; border: 0; border-radius: 999px; background: var(--teal); color: #fff; font-size: 1.15rem; font-weight: 600; cursor: pointer; transition: background 0.15s, transform 0.1s; }
.go:hover { background: var(--teal-deep); }
.go:active { transform: scale(0.99); }
.fine { text-align: center; font-size: 0.85rem; color: var(--soft); }

.examples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 3.5rem; }
.examples figure { text-align: center; }
.examples img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg-2); border-radius: 18px; padding: 0.5rem; }
.examples figcaption { margin-top: 0.4rem; font-size: 0.85rem; color: var(--soft); }

.steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 2rem; margin-top: 2.5rem; color: var(--soft); font-size: 0.95rem; }
.steps b { color: var(--navy); font-weight: 600; margin-right: 0.3rem; }

.foot { max-width: 720px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; border-top: 1px solid var(--line); text-align: center; font-size: 0.85rem; color: var(--soft); }
.foot a { color: var(--soft); }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; background: rgba(22, 49, 71, 0.45); }
.modal-box { position: relative; width: min(440px, 100%); max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 24px; padding: 1.8rem 1.6rem; }
.modal h2 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.modal-sum { color: var(--soft); font-size: 0.95rem; margin-bottom: 1rem; }
.modal label { display: grid; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.8rem; }
.modal input, .modal textarea { font: inherit; font-weight: 400; padding: 0.7rem 0.9rem; border: 2px solid var(--line); border-radius: 12px; outline: none; }
.modal input:focus, .modal textarea:focus { border-color: var(--teal); }
.modal .go { margin-top: 0.4rem; }
.modal .fine { margin-top: 0.6rem; }
.close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg-2); cursor: pointer; font-size: 0.9rem; }
#done { text-align: center; padding: 1rem 0; }
#done p { color: var(--soft); margin-top: 0.4rem; }

@media (max-width: 520px) {
    .examples { grid-template-columns: repeat(2, 1fr); }
    .steps { flex-direction: column; align-items: center; gap: 0.3rem; }
    .drop { min-height: 200px; }
}
