/* Top page: a focused entry point for Game Programming Lab */
:root {
	--top-ink: #0b2545;
	--top-blue: #0d4f9e;
	--top-sky: #48b7e8;
	--top-line: #d7e2ec;
	--top-paper: #eef3f8;
	--top-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: #27384a; font-family: "Noto Sans JP", sans-serif; line-height: 1.8; }
a { color: inherit; text-decoration: none; }
.site-shell { width: min(calc(100% - 48px), var(--top-max)); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid #e6edf3; }
.header-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.site-brand { display: flex; flex-direction: column; }
.site-logo { display: block; line-height: 1; }
.site-logo img { display: block; width: auto; height: 46px; object-fit: contain; }
.site-logo-sub { display: block; margin-top: 5px; color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: .12em; line-height: 1; }
.site-nav { display: flex; align-items: center; gap: 24px; color: #405267; font-size: 13px; font-weight: 700; }
.site-nav a:hover { color: var(--top-blue); }
.site-nav .nav-education { padding: 8px 14px; background: var(--top-ink); color: #fff; border-radius: 4px; }
.site-nav .nav-education:hover { background: var(--top-blue); color: #fff; }
.site-nav .nav-download { padding: 8px 14px; color: var(--top-blue); border: 1px solid var(--top-blue); border-radius: 4px; }

/* Shared */
.eyebrow { margin: 0 0 12px; color: var(--top-blue); font-size: 12px; font-weight: 900; letter-spacing: .14em; line-height: 1.4; }
.hero-eyebrow { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.hero-eyebrow img { display: block; width: 228px; height: auto; max-height: 56px; object-fit: contain; object-position: left center; }
.hero-eyebrow span { padding-left: 12px; color: var(--top-blue) !important; border-left: 1px solid #8ca6c0; }
h1,h2,h3,p { margin-top: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 54px; padding: 12px 22px; border-radius: 4px; font-weight: 900; line-height: 1.4; transition: transform .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-education { background: #fff; color: var(--top-ink); border: 1px solid var(--top-ink); box-shadow: 0 4px 0 rgba(11,37,69,.18); }
.button-education:hover { color: var(--top-blue); border-color: var(--top-blue); }

/* Hero */
.hero { padding: 72px 0 80px; overflow: hidden; background: var(--top-paper); border-bottom: 1px solid #e6edf3; border-radius: 0 !important; }
.hero-layout { display: grid; grid-template-columns: minmax(410px,1.05fr) minmax(500px,1.15fr); align-items: center; gap: 40px; }
.hero-copy { position: relative; z-index: 1; padding: 36px; background: rgba(255,255,255,.94); border-left: 6px solid var(--top-sky); box-shadow: 0 12px 28px rgba(11,37,69,.08); }
.hero-copy h1 { margin-bottom: 26px; color: var(--top-ink); font-size: clamp(40px,4.4vw,60px); font-weight: 900; letter-spacing: -.035em; line-height: 1.32; }
.hero-copy h1 em { color: var(--top-blue); font-style: normal; }
.hero-copy .hero-lead { max-width: 510px; margin-bottom: 30px; color: #31465c !important; font-size: 16px; font-weight: 700; line-height: 2; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.hero-image-wrap { position: relative; min-height: 440px; }
.hero-image { position: absolute; z-index: 1; inset: 0 -28px 0 auto; width: 100%; height: 100%; object-fit: cover; object-position: center; box-shadow: 20px 20px 0 rgba(11,37,69,.11); }
.hero-caption { position: absolute; z-index: 3; right: 20px; bottom: 18px; margin: 0; padding: 8px 12px; background: rgba(255,255,255,.93); color: var(--top-ink) !important; font-size: 12px; font-weight: 700; }
.hero-caption span { margin-right: 8px; color: #a76f00; font-size: 10px; font-weight: 900; letter-spacing: .12em; }

/* Topics */
.topics-section { padding: 38px 0 34px; background: #fff; }
.topics-card { display: grid; grid-template-columns: 260px 1fr; gap: 34px; align-items: center; width: min(80%, 944px); padding: 18px 28px 18px 18px; background: #fff; border: 1px solid var(--top-line); border-left: 6px solid #e7a928; box-shadow: 0 18px 34px rgba(11,37,69,.1); position: relative; z-index: 3; }
.topics-image { overflow: hidden; aspect-ratio: 16 / 10; background: #f1f5f9; }
.topics-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.topics-copy { display: grid; gap: 10px; align-content: center; }
.topics-copy .eyebrow { margin-bottom: 0; color: #a76f00; }
.topics-copy h2 { margin: 0; color: var(--top-ink); font-size: clamp(22px,2.2vw,30px); letter-spacing: -.045em; line-height: 1.45; }
.topics-copy p { margin: 0; color: #40576d; font-size: 15px; font-weight: 700; line-height: 1.9; }
.topics-link { display: inline-flex; align-items: center; gap: 12px; justify-self: start; margin-top: 4px; color: var(--top-blue); font-size: 14px; font-weight: 900; border-bottom: 1px solid currentColor; line-height: 1.6; }
.topics-link:hover { color: var(--top-ink); }

/* Intro */
.intro-section { padding: 94px 0; }
.intro-layout { display: grid; gap: 26px; align-items: start; }
.intro-shell { width: min(calc(100% - 80px), 820px); justify-items: center; text-align: center; }
.intro-layout h2,.section-heading h2,.free-text-copy h2 { color: var(--top-ink); font-size: clamp(28px,3.3vw,43px); letter-spacing: -.055em; line-height: 1.45; }
.intro-layout h2 { margin-bottom: 0; }
.intro-text { max-width: 720px; margin: 0; color: #31465c; font-size: 24px; font-weight: 900; letter-spacing: -.025em; line-height: 1.8; }
.intro-image { width: min(100%, 640px); margin: 18px 0 0; }
.intro-image img { display: block; width: 100%; height: auto; }

/* Why Godot */
.godot-section { padding: 88px 0; background: var(--top-ink); color: #fff; }
.godot-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: start; }
.godot-intro { position: sticky; top: 110px; }
.godot-wordmark { display: block; width: min(100%, 280px); height: auto; max-height: 76px; margin: 0 0 20px; object-fit: contain; object-position: left center; }
.godot-intro .eyebrow { color: var(--top-sky); font-size: 22px; }
.godot-intro h2 { margin-bottom: 20px; color: #fff; font-size: clamp(28px,3.3vw,43px); letter-spacing: -.055em; line-height: 1.45; }
.godot-intro p:last-of-type { max-width: 470px; margin: 0; color: #d5e3ef; font-size: 15px; line-height: 2; }
.godot-official-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--top-sky); font-size: 14px; font-weight: 900; border-bottom: 1px solid currentColor; line-height: 1.7; }
.godot-official-link:hover { color: #fff; }
.godot-points { border-top: 1px solid rgba(255,255,255,.28); }
.godot-points article { display: grid; grid-template-columns: 62px 1fr; column-gap: 14px; padding: 25px 0 24px; border-bottom: 1px solid rgba(255,255,255,.28); }
.godot-point-number { display: inline-grid; place-items: center; align-self: start; width: 52px; min-height: 34px; grid-row: span 2; background: rgba(72,183,232,.16); border-left: 3px solid var(--top-sky); color: #fff; font-size: 16px; font-weight: 900; letter-spacing: .08em; line-height: 1; }
.godot-points h3 { margin: 0 0 7px; color: #fff; font-size: 22px; letter-spacing: -.035em; line-height: 1.5; }
.godot-points p { margin: 0; color: #c5d6e4; font-size: 16px; line-height: 1.85; }

/* Video on-demand */
.ondemand-section { padding: 88px 0; background: #fff; }
.ondemand-heading { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: end; margin-bottom: 38px; }
.ondemand-heading .eyebrow,.ondemand-heading h2 { grid-column: 1; }
.ondemand-heading h2 { margin: 0; color: var(--top-ink); font-size: clamp(28px,3.3vw,43px); letter-spacing: -.055em; line-height: 1.45; }
.ondemand-heading > p:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; color: #536578; font-size: 15px; line-height: 2; }
.ondemand-grid { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--top-line); border-left: 1px solid var(--top-line); }
.ondemand-grid article { padding: 0 28px 22px; border-right: 1px solid var(--top-line); border-bottom: 1px solid var(--top-line); }
.ondemand-grid article img { display: block; width: calc(100% + 24px); height: 156px; margin: 0 -12px 24px; object-fit: cover; object-position: center; border-bottom: 1px solid var(--top-line); }
.ondemand-number { display: inline-grid; place-items: center; min-width: 52px; min-height: 34px; margin-bottom: 18px; padding: 0 8px; background: #e7f5fb; border-left: 3px solid var(--top-sky); color: var(--top-blue); font-size: 16px; font-weight: 900; letter-spacing: .08em; line-height: 1; }
.ondemand-grid h3 { margin: 0 0 12px; color: var(--top-ink); font-size: 17px; letter-spacing: -.04em; line-height: 1.55; white-space: nowrap; }
.ondemand-grid p { margin: 0; color: #5a6b7d; font-size: 14px; line-height: 1.85; }

/* Routes */
.routes-section { padding: 78px 0 88px; background: var(--top-paper); }
.routes-shell { width: min(calc(100% - 80px), 960px); }
.section-heading { margin-bottom: 34px; }
.section-heading h2 { margin-bottom: 0; }
.routes-lead { max-width: 700px; margin: 14px 0 0; color: #536578; font-size: 16px; line-height: 1.9; }
.routes-grid { display: grid; gap: 64px; }
.route-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(36px,7vw,96px); align-items: center; }
.route-reverse .route-image { order: 2; }
.route-reverse .route-content { order: 1; }
.route-general { --route-color: var(--top-blue); --route-bg: #eaf3fb; }
.route-education { --route-color: #2778bc; --route-bg: #eaf5fb; }
.route-download { --route-color: #53a6d7; --route-bg: #e9f8fd; }
.route-image { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #dce8f1; box-shadow: 14px 14px 0 rgba(11,37,69,.09); }
.route-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.route-content { max-width: 460px; }
.route-number { display: inline-grid; place-items: center; min-width: 82px; min-height: 38px; margin-bottom: 20px; padding: 0 14px; background: var(--top-ink); border-radius: 999px; color: #fff; font-size: 14px; font-weight: 900; letter-spacing: .05em; line-height: 1; }
.route-card h3 { margin-bottom: 16px; color: var(--top-ink); font-size: clamp(24px,2.4vw,32px); letter-spacing: -.045em; line-height: 1.48; }
.route-content > p:last-child { margin: 0; color: #40576d; font-size: 16px; line-height: 2; }

/* Game Share */
.game-share-section { padding: 88px 0; background: var(--top-ink); color: #fff; }
.game-share-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,.86fr); gap: 64px; align-items: center; width: min(calc(100% - 48px), var(--top-max)); }
.game-share-copy { max-width: 600px; }
.game-share-copy .eyebrow { color: var(--top-sky); }
.game-share-copy h2 { margin-bottom: 24px; color: #fff; font-size: clamp(30px,3.4vw,44px); letter-spacing: -.055em; line-height: 1.42; }
.game-share-copy p:not(.eyebrow) { margin: 0; color: #d5e3ef; font-size: 15px; line-height: 2; }
.game-share-copy p:not(.eyebrow) + p { margin-top: 16px; }
.game-share-link { display: inline-flex; align-items: center; gap: 12px; justify-self: start; margin-top: 20px; color: var(--top-sky); font-size: 14px; font-weight: 900; border-bottom: 1px solid currentColor; line-height: 1.7; }
.game-share-link:hover { color: #fff; }
.game-share-panel { position: relative; min-height: 300px; }
.game-share-panel img { position: relative; z-index: 1; display: block; width: min(100%, 420px); aspect-ratio: 4 / 3; margin-left: auto; object-fit: cover; object-position: center; background: #fff; border: 1px solid rgba(255,255,255,.26); box-shadow: 18px 18px 0 rgba(0,0,0,.24); }

/* Education guide */
.education-guide { padding: 40px 0 82px; }
.education-guide-inner { display: grid; grid-template-columns: minmax(280px,.9fr) minmax(0,1.1fr); gap: 42px; align-items: stretch; padding: 0; background: #e9f4fa; border-left: 6px solid var(--top-sky); }
.education-guide-image { min-height: 280px; }
.education-guide-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.education-guide-copy { display: grid; align-content: center; justify-items: start; gap: 20px; padding: 38px 44px 38px 0; }
.education-guide .eyebrow { margin-bottom: 7px; }
.education-guide h2 { margin: 0; color: var(--top-ink); font-size: clamp(23px,2.7vw,34px); letter-spacing: -.04em; line-height: 1.45; }
.education-guide-copy > p { margin: 0; color: #516578; font-size: 14px; }

/* Free text */
.free-text-section { padding: 0 0 84px; background: #fff; }
.free-text-box { display: grid; grid-template-columns: 220px 1fr auto; gap: 48px; align-items: center; padding: 44px 54px; background: #fff4dc; color: var(--top-ink); border: 1px solid #f0d89f; border-radius: 18px; box-shadow: 0 18px 34px rgba(125,91,22,.12); }
.book-cover { width: 220px; aspect-ratio: 4 / 3; background: #fff; border: 1px solid #f0d89f; box-shadow: 8px 8px 0 rgba(125,91,22,.16); overflow: hidden; }
.book-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.free-text-copy .eyebrow { color: #a76f00; }
.textbook-eyebrow { display: flex; align-items: center; gap: 12px; }
.free-text-copy h2 { margin-bottom: 12px; color: var(--top-ink); font-size: clamp(24px,2.8vw,35px); }
.free-text-copy p:last-child { max-width: 610px; margin: 0; color: #516578; font-size: 14px; }
.button-light { min-width: 210px; background: var(--top-blue); color: #fff; box-shadow: 0 5px 0 #08386f; }

/* FAQ */
.faq-section { padding: 0 0 88px; background: #fff; }
.faq-shell { width: min(calc(100% - 80px), 960px); }
.faq-heading { margin-bottom: 28px; text-align: center; }
.faq-heading h2 { margin: 0; color: var(--top-ink); font-size: clamp(28px,3.3vw,40px); letter-spacing: -.05em; }
.faq-list { border-top: 1px solid var(--top-line); }
.faq-list details { border-bottom: 1px solid var(--top-line); }
.faq-list summary { display: flex; align-items: center; gap: 16px; position: relative; padding: 22px 54px 22px 0; color: var(--top-ink); cursor: pointer; font-size: 17px; font-weight: 900; line-height: 1.7; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { flex: 0 0 auto; color: var(--top-blue); font-size: 14px; letter-spacing: .04em; }
.faq-list summary::after { content: "+"; position: absolute; right: 8px; top: 50%; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #b8cadb; color: var(--top-blue); font-size: 21px; font-weight: 400; line-height: 1; transform: translateY(-50%); }
.faq-list details[open] summary::after { content: "−"; background: var(--top-blue); border-color: var(--top-blue); color: #fff; }
.faq-answer { padding: 0 54px 22px 54px; }
.faq-answer p { margin: 0; color: #526477; font-size: 15px; line-height: 2; }
.faq-answer p + p { margin-top: 10px; }
.faq-answer a { color: var(--top-blue); font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }
/* Footer */
.site-footer { background: #07111f !important; color: #fff; border-top: 1px solid #07111f !important; }
.footer-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; padding: 48px 0; }
.operator-info { display: flex; flex-direction: column; }
.operator-logo-link { display: block; width: fit-content; line-height: 1; }
.operator-info img { width: auto; height: 44px; margin-bottom: 18px; object-fit: contain; object-position: left; }
.operator-info p { margin: 0; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.65; }
.operator-info p + p { color: #d5e3ef; font-size: 11px; font-weight: 500; }
.footer-side { display: flex; flex-direction: column; align-items: flex-end; gap: 20px; text-align: right; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; color: #d5e3ef; font-size: 12px; font-weight: 900; }
.footer-links a { text-decoration: underline; text-underline-offset: 4px; }
.footer-links a:hover { color: var(--top-sky); }
.social-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.social-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; font-size: 12px; font-weight: 900; line-height: 1; }
.social-links a:hover { color: var(--top-sky); border-color: var(--top-sky); background: rgba(255,255,255,.08); }
.social-links span { font-size: 15px; line-height: 1; }
.footer-copyright { margin: 0; padding-top: 5px; color: rgba(255,255,255,.55); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-align: right; }
.footer-disclaimer { padding: 0 0 34px; color: rgba(255,255,255,.62); font-size: 11px; line-height: 1.8; }
.footer-disclaimer p { margin: 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); }

@media (max-width: 900px) {
	.site-header { position: static; }
	.header-inner { padding: 16px 0; align-items: flex-start; flex-direction: column; }
	.site-nav { width: 100%; overflow-x: auto; gap: 20px; padding-bottom: 2px; white-space: nowrap; }
	.hero { padding: 48px 0 56px; }
	.hero-layout,.intro-layout,.free-text-box { grid-template-columns: 1fr; }
	.hero-layout { gap: 12px; }
	.hero-image-wrap { min-height: min(56vw,460px); }
	.hero-image { right: -16px; }
	.topics-card { grid-template-columns: 220px 1fr; gap: 24px; width: min(calc(100% - 48px), var(--top-max)); padding: 16px 22px 16px 16px; }
	.intro-layout { gap: 18px; }
	.intro-shell { width: min(calc(100% - 48px), 820px); }
	.intro-text { margin-top: 0; }
	.godot-layout { grid-template-columns: 1fr; gap: 34px; }
	.godot-intro { position: static; }
	.ondemand-heading { grid-template-columns: 1fr; gap: 18px; }
	.ondemand-heading .eyebrow,.ondemand-heading h2,.ondemand-heading > p:last-child { grid-column: auto; grid-row: auto; }
	.ondemand-grid { grid-template-columns: repeat(2,1fr); }
	.routes-shell { width: min(calc(100% - 48px), 1180px); }
	.game-share-inner { grid-template-columns: 1fr; gap: 34px; }
	.game-share-copy { max-width: none; }
	.game-share-panel img { margin-left: 0; }
	.free-text-box { gap: 26px; padding: 36px; }
	.book-cover { width: min(100%, 220px); }
	.education-guide-inner { grid-template-columns: 1fr; gap: 0; }
	.education-guide-image { min-height: auto; aspect-ratio: 16 / 8; }
	.education-guide-copy { padding: 32px; }
	.free-text-box .button { justify-self: start; }
	.faq-shell { width: min(calc(100% - 48px), 960px); }
}

@media (max-width: 640px) {
	.site-shell { width: min(calc(100% - 32px),var(--top-max)); }
	.site-logo img { height: 40px; }
	.site-logo-sub { font-size: 8px; }
	.site-nav { font-size: 12px; }
	.hero-copy { padding: 28px 22px; }
	.hero-copy h1 { font-size: clamp(36px,10vw,48px); line-height: 1.3; }
	.hero-eyebrow { align-items: flex-start; flex-direction: column; gap: 7px; }
	.hero-eyebrow span { padding-left: 0; border-left: 0; }
	.hero-lead { font-size: 14px; }
	.hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
	.hero-image-wrap { min-height: 270px; margin-top: 10px; }
	.hero-image { box-shadow: 10px 10px 0 rgba(11,37,69,.11); }
	.topics-section { padding-bottom: 18px; }
	.topics-card { grid-template-columns: 1fr; width: min(calc(100% - 32px), var(--top-max)); padding: 16px; }
	.topics-image { aspect-ratio: 16 / 9; }
	.topics-copy p { font-size: 14px; }
	.intro-section { padding: 62px 0; }
	.intro-shell { width: min(calc(100% - 32px), 820px); }
	.intro-text { font-size: 20px; line-height: 1.8; }
	.godot-section { padding: 62px 0; }
	.ondemand-section { padding: 62px 0; }
	.ondemand-grid { grid-template-columns: 1fr; }
	.ondemand-grid article { min-height: auto; padding: 0 24px 24px; }
	.ondemand-grid article img { width: calc(100% + 48px); height: auto; aspect-ratio: 4 / 3; margin: 0 -24px 22px; }
	.ondemand-number { margin-bottom: 18px; }
	.routes-section { padding: 58px 0; }
	.routes-shell { width: min(calc(100% - 32px), 1180px); }
	.routes-grid { gap: 48px; }
	.route-card { grid-template-columns: 1fr; gap: 28px; }
	.route-reverse .route-image,.route-reverse .route-content { order: initial; }
	.route-image { box-shadow: 8px 8px 0 rgba(11,37,69,.09); }
	.route-content { max-width: none; }
	.route-number { margin-bottom: 18px; }
	.game-share-section { padding: 62px 0; }
	.game-share-inner { width: min(calc(100% - 32px), var(--top-max)); }
	.game-share-panel { min-height: 250px; }
	.game-share-panel img { box-shadow: 10px 10px 0 rgba(11,37,69,.1); }
	.free-text-section { padding-bottom: 56px; }
	.free-text-box { padding: 30px 24px; }
	.faq-section { padding-bottom: 62px; }
	.faq-shell { width: min(calc(100% - 32px), 960px); }
	.faq-list summary { gap: 10px; padding: 18px 42px 18px 0; font-size: 15px; }
	.faq-list summary::after { right: 0; width: 24px; height: 24px; font-size: 18px; }
	.faq-answer { padding: 0 0 18px 0; }
	.faq-answer p { font-size: 14px; }
	.education-guide { padding: 28px 0 56px; }
	.education-guide-copy { padding: 28px 24px; }
	.footer-main { align-items: flex-start; flex-direction: column; gap: 28px; }
	.footer-side { align-items: flex-start; text-align: left; }
	.footer-links { justify-content: flex-start; }
	.social-links { justify-content: flex-start; }
	.footer-copyright { text-align: left; }
}
