/* Shared styles for /works/ pages (project list + each project page). */
:root {
  --bg: #ffffff;
  --text: #0E2E68;
  --muted: #4A6290;
  --line: #DCEBFF;
  --panel: #F2F7FF;
  --link: #1D5FD6;
  --accent: #FFC629;
  --accent-hover: #FFD64F;
  --dark: #071C3F;
  --heading: #071C3F;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3, .brand { font-family: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif; color: var(--heading); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Header */
header.site { position: sticky; top: 0; z-index: 5; background: var(--dark); color: #fff; border-bottom: 3px solid var(--accent); }
header.site .inner { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; color: #fff; }
.brand img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.header-links { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.header-links a { color: #fff; text-decoration: none; opacity: .9; }
.header-links a:hover { opacity: 1; text-decoration: underline; }
.btn {
  display: inline-block; background: var(--accent); color: var(--dark) !important;
  padding: 8px 18px; border-radius: 999px; font-weight: 800; text-decoration: none; white-space: nowrap; opacity: 1 !important;
}
.btn:hover { background: var(--accent-hover); text-decoration: none !important; }
.btn-outline {
  display: inline-block; border: 2px solid var(--line); color: var(--heading);
  padding: 8px 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.btn-outline:hover { border-color: var(--link); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.crumbs { font-size: 14px; color: var(--muted); padding-top: 24px; }
.crumbs a { color: var(--muted); }

/* List page */
.page-head { padding: 40px 0 24px; max-width: 720px; }
.page-head h1 { font-size: 2.3rem; line-height: 1.2; margin: 6px 0 10px; }
.page-head p { color: var(--muted); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; padding: 16px 0 64px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 10px 30px rgba(14, 46, 104, .12); transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 40%; background: var(--panel); }
.card .body { padding: 16px 18px 20px; }
.card h2, .card h3 { font-size: 1.15rem; line-height: 1.35; margin: 4px 0 6px; }
.card p { font-size: .95rem; color: var(--muted); margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: 12px; font-weight: 600; background: var(--panel); color: var(--text); padding: 3px 10px; border-radius: 999px; }

/* Project page */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 24px 0 40px; }
.hero h1 { font-size: 2.2rem; line-height: 1.2; margin: 6px 0 12px; }
.hero .lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 20px; }
.hero img { border-radius: 20px; width: 100%; max-height: 640px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 35%; }
.facts { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.facts li { display: grid; grid-template-columns: 110px 1fr; gap: 8px; font-size: .95rem; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.facts b { color: var(--heading); }
.story { max-width: 720px; margin: 0 auto; padding: 8px 0 24px; }
.story h2 { font-size: 1.5rem; margin: 36px 0 8px; }
.media { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; align-items: start; }
.media.single { grid-template-columns: minmax(0, 360px); justify-content: center; }
figure { margin: 0; }
figure video, figure img { width: 100%; border-radius: 16px; background: var(--panel); }
figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.cta { background: var(--dark); color: #fff; border-radius: 24px; padding: 32px; margin: 48px 0 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.cta h2 { color: #fff; font-size: 1.4rem; margin: 0 0 4px; }
.cta p { margin: 0; color: #BEDAFF; }
.more { border-top: 1px solid var(--line); padding: 32px 0 64px; }
.more h2 { font-size: 1.3rem; margin: 0 0 16px; }

/* Footer */
footer.site { background: var(--dark); color: #BEDAFF; font-size: 14px; }
footer.site .inner { max-width: 1100px; margin: 0 auto; padding: 24px 16px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer.site a { color: #fff; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero h1, .page-head h1 { font-size: 1.75rem; }
  .header-links .hide-sm { display: none; }
  .cta { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
@media (max-width: 430px) {
  header.site .inner { gap: 8px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .header-links { gap: 10px; font-size: 13px; }
  .header-links .btn { padding: 7px 12px; font-size: 13px; }
}
/* White-background product shots: show the whole image instead of cropping */
.hero img.contain { aspect-ratio: auto; object-fit: contain; max-height: none; background: #fff; }
.card img[src*="coin-sorter-thumb"], .card img[src*="yokan-mold-thumb"],
.card img[src*="glc-clicker-thumb"], .card img[src*="seiha-clicker-thumb"], .card img[src*="cat-clicker-thumb"] { object-fit: contain; background: #fff; }
