/* Full-width editorial type and image-led project cards. */
:root{--page-gutter:clamp(16px,1.2vw,24px);--king-display-font:Impact,"Arial Narrow","Roboto Condensed",sans-serif}
body{font-family:"Roboto Condensed","Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif}
header nav a{font-family:"Roboto Condensed",sans-serif;font-size:clamp(12px,1vw,14px);font-weight:600;letter-spacing:.14em}
#projects .section-head{padding-top:clamp(58px,7vw,92px);padding-bottom:clamp(28px,3vw,42px)}
#projects .section-head h2,.kingdom-company .identity-heading h2{font-family:var(--king-display-font);font-size:clamp(42px,4.4vw,66px);font-weight:400;line-height:1.05;letter-spacing:.02em}
#projects .projects>.project:not([hidden]){aspect-ratio:3/2}
#projects .projects>.project:not([hidden])::before{background:linear-gradient(0deg,#020812dc 0%,#02081276 34%,#02081208 72%)}
#projects .projects>.project>div,#projects .project-main>div{display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;gap:12px;padding:clamp(12px,1.2vw,18px)}
#projects .projects>.project h3,#projects .project-main h3{font-family:var(--king-display-font);font-size:clamp(31px,3.2vw,48px);font-weight:400;line-height:1;letter-spacing:.025em}
#projects .projects>.project .project-typewriter{display:block;flex:0 0 52%;width:52%;min-width:0;min-height:1.25em;margin:0;overflow:hidden;white-space:nowrap;color:#fff;font-family:"Roboto Condensed",sans-serif;font-size:clamp(14px,1.3vw,18px);font-weight:600;line-height:1.25;letter-spacing:.045em;text-align:right;text-shadow:0 2px 12px #000}
#projects .projects>.project a.project-link{position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;padding:0;border:0;font-size:0;line-height:0}
#projects .project-typewriter.is-typing::after{content:"";display:inline-block;width:1px;height:.95em;margin-left:3px;vertical-align:-.12em;background:#fff;animation:typing-caret .7s steps(1,end) infinite}
@keyframes typing-caret{50%{opacity:0}}
.kingdom-company .identity-heading{margin-bottom:clamp(26px,3vw,42px)}
.identity-kingdom .identity-content h3{font-family:var(--king-display-font);font-weight:400;letter-spacing:.02em}
.identity-type,.identity-more{font-family:"Roboto Condensed",sans-serif}
@media(max-width:900px){
  #projects .projects{grid-template-columns:repeat(2,minmax(0,1fr))}
  #projects .projects>.project:not([hidden]){grid-column:span 1}
}
@media(max-width:700px){
  #projects .projects{grid-template-columns:1fr}
  #projects .projects>.project:not([hidden]){grid-column:1/-1;min-height:0;aspect-ratio:3/2}
  #projects .section-head h2,.kingdom-company .identity-heading h2{font-size:clamp(34px,8.8vw,46px)}
  #projects .projects>.project h3,#projects .project-main h3{font-size:clamp(33px,9vw,43px)}
  #projects .projects>.project>div,#projects .project-main>div{padding:10px}
  #projects .projects>.project .project-typewriter{font-size:12px}
}
@media(prefers-reduced-motion:reduce){#projects .project-typewriter.is-typing::after{animation:none}}

footer .closing-line{margin:clamp(64px,8vw,120px) 0 0;text-align:center;color:#f5f7fb;font-family:"Roboto Condensed","Noto Sans JP",sans-serif;font-size:clamp(32px,5vw,72px);font-weight:600;line-height:1.2;letter-spacing:-.045em}
@media(max-width:700px){footer .closing-line{font-size:clamp(28px,8vw,40px);margin-top:72px}}
footer .closing-message{max-width:54em;margin:22px auto 0;text-align:center;color:#b9c8d5;font-family:"Roboto Condensed",sans-serif;font-size:clamp(14px,1.35vw,18px);font-weight:400;line-height:1.65;letter-spacing:.01em}
@media(max-width:700px){footer .closing-message{max-width:32em;font-size:14px;line-height:1.7}}
footer .closing-translation{margin:10px 0 0;text-align:center;color:#aab9c8;font-family:"Roboto Condensed",sans-serif;font-size:clamp(12px,1.2vw,16px);font-weight:600;line-height:1.3;letter-spacing:.22em}
footer .closing-message{margin-top:26px}
footer.closing-footer{display:block;padding:clamp(90px,9vw,150px) var(--page-gutter) 50px;border-top:1px solid #d9e6f32b}
footer.closing-footer .closing-line{margin:0}
footer .closing-ring{display:block;width:max-content;margin:clamp(68px,8vw,120px) auto 0;font-family:"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:clamp(42px,5vw,68px);line-height:1}
@media(max-width:700px){footer.closing-footer{padding:82px 24px 38px}footer .closing-ring{margin-top:76px;font-size:48px}}

footer.closing-footer{background-image:linear-gradient(180deg,#050911 0%,#050911d5 27%,#05091160 71%,#0509119e 100%),url("assets/quasar-footer.webp");background-size:cover;background-position:center bottom;background-repeat:no-repeat}

.earth-stories .stories-heading{margin:0;padding:clamp(58px,7vw,92px) var(--page-gutter) clamp(28px,3vw,42px);background:#050911;color:#f5f7fb;font:400 clamp(42px,4.4vw,66px)/1.05 var(--king-display-font);letter-spacing:.02em}
@media(max-width:700px){.earth-stories .stories-heading{font-size:clamp(34px,8.8vw,46px);padding:52px var(--page-gutter) 28px}}

main>.kingdom-company.section{padding-bottom:0}
footer.closing-footer{border-top:0}

/* Four plain text links replace the drawer menu at every width. */
header{display:flex;grid-template-columns:none;align-items:center;justify-content:space-between;padding:0 var(--page-gutter)}
header>.brand{flex:none;height:auto;padding:0;border:0}
header>.brand img{width:150px;max-width:none}
header nav{display:flex;flex-direction:row;position:static;flex:0 1 auto;min-width:0;width:auto;height:100%;align-items:center;justify-content:flex-end;gap:clamp(12px,2vw,28px);padding:0;margin-left:auto;background:none}
header nav a{flex:none;padding:0;font-size:clamp(11px,.95vw,13px);letter-spacing:.11em}
@media(max-width:700px){header{height:56px;padding:0 16px}header>.brand img{width:100px}header nav{gap:8px}header nav a{font-size:12px;letter-spacing:.035em}}

@media(max-width:360px){header{padding:0 10px}header>.brand img{width:88px}header nav{gap:5px}header nav a{font-size:11px}}

.identity-kingdom{position:relative}
.identity-kingdom .identity-card-link{position:absolute;inset:0;z-index:1}
.identity-kingdom .identity-card-link:focus-visible{outline:3px solid #c9eaff;outline-offset:-3px}
.identity-social{display:flex;flex-direction:row;position:relative;top:auto;right:auto;left:auto;z-index:2;align-items:center;gap:clamp(18px,2vw,30px);margin:-10px 0 34px;padding:0;background:transparent}
.identity-social a{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;color:#f5f7fb;transition:color .2s,transform .2s}
.identity-social a:hover,.identity-social a:focus-visible{color:#e33355;transform:translateY(-2px)}
.identity-social a:focus-visible{outline:2px solid #c9eaff;outline-offset:3px}
.identity-social svg{display:block;width:28px;height:28px;fill:currentColor}

.line-header-link{display:inline-grid;flex:none;place-items:center;width:34px;height:28px;padding:0;background:transparent;text-decoration:none;transition:opacity .2s,transform .2s}
.line-header-link .crown-emoji{display:block;font-size:22px;line-height:1;transform:translateY(-1px)}
.line-header-link:hover{opacity:.75;transform:translateY(-1px)}
.line-header-link:focus-visible{outline:2px solid #fff;outline-offset:3px}

/* Keep the navigation legible over the hero while retaining a transparent edge. */
header{isolation:isolate}
header::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#030812b8 0%,#03081255 58%,transparent 100%);pointer-events:none}
header nav a{position:relative;text-shadow:0 1px 10px #000c}

/* MOON-inspired restrained wordmark and compact navigation. */
header{height:52px}
header>.brand .brand-word{display:block;color:#fff;font:400 20px/1 var(--king-display-font);letter-spacing:.08em;white-space:nowrap;text-shadow:0 1px 14px #000a}
header nav a{font-family:"Manrope","Helvetica Neue",Arial,sans-serif;font-size:12px;font-weight:600;letter-spacing:.075em}
@media(max-width:700px){header{height:48px}header>.brand .brand-word{font-size:15px;letter-spacing:.05em}header nav a{font-size:10px;letter-spacing:.03em}}
@media(max-width:360px){header>.brand .brand-word{font-size:13px;letter-spacing:.04em}header nav a{font-size:9px}}

/* Compact header; the next FEST event stays visible at the lower right. */
header{height:44px;padding-inline:16px;gap:14px}
header nav{gap:clamp(10px,1vw,14px)}
.next-event{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:51;display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 12px;border:1px solid #fff;border-radius:5px;background:#fff;color:#07111e;box-shadow:0 4px 16px rgba(0,0,0,.22);white-space:nowrap;text-decoration:none;transition:background .2s,border-color .2s}
.next-event .event-date{display:block;margin:0;padding:0;color:inherit;font:600 12px/1 "Manrope",Arial,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:.06em;text-align:center;transform:none}
.next-event:hover{background:#eaf0f5;border-color:#eaf0f5}
.next-event:focus-visible{outline:2px solid #fff;outline-offset:3px}
@media(max-width:700px){header{height:44px;padding-inline:12px;gap:8px}header nav{gap:7px}.line-header-link{width:30px;height:25px}.line-header-link .crown-emoji{font-size:20px}.next-event{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));height:34px;padding-inline:10px}.next-event .event-date{font-size:11px}}
@media(max-width:480px){header nav a:first-child{display:none}}
@media(max-width:360px){header>.brand .brand-word{font-size:13px;letter-spacing:.02em}header nav a{font-size:9px;letter-spacing:0}}
@media(prefers-reduced-motion:reduce){.line-header-link,.next-event{transition:none}}
@media print{.next-event{display:none}}

/* Three and four card rows keep the full collection compact on desktop. */
#projects .projects{grid-template-columns:repeat(4,minmax(0,1fr))}
#projects .projects>.project:not([hidden]){grid-column:span 1;aspect-ratio:3/2;min-width:0}
#projects .projects>.project-main{min-height:0}
@media(min-width:701px) and (max-width:900px){
  #projects .projects{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  #projects .projects{grid-template-columns:minmax(0,1fr)}
  #projects .projects>.project:not([hidden]){grid-column:1/-1;aspect-ratio:3/2}
}

/* Sixty tracks let complete rows alternate between two and five cards. */
#projects .projects.has-mosaic{grid-template-columns:repeat(60,minmax(0,1fr));grid-auto-rows:auto}
#projects .projects.has-mosaic>.project:not([hidden]){
  grid-column:var(--project-column);
  grid-row:var(--project-row);
  width:100%;
  height:auto;
  min-height:0;
  aspect-ratio:3/2;
}
#projects .projects.has-mosaic>.project h3{font-size:clamp(28px,2.8vw,44px)}
#projects .projects.has-mosaic>.project .project-typewriter{flex-basis:46%;width:46%;font-size:clamp(11px,1vw,16px)}
@media(min-width:901px){
  #projects .section-head{padding-top:18px;padding-bottom:10px}
  #projects .section-head h2{font-size:clamp(42px,3.7vw,54px)}
  #projects .projects.has-mosaic>.project h3{font-size:clamp(22px,2.5vw,36px)}
}
@media(min-width:701px) and (max-width:900px){
  #projects .projects.has-mosaic{grid-template-columns:repeat(2,minmax(0,1fr))}
  #projects .projects.has-mosaic>.project:not([hidden]){grid-column:span 1;grid-row:auto}
  #projects .projects.has-mosaic>.project:first-child{grid-column:span 2}
  #projects .projects.has-mosaic>.project.tablet-wide-last{grid-column:span 2}
}
@media(max-width:700px){
  #projects .projects.has-mosaic{grid-template-columns:minmax(0,1fr)}
  #projects .projects.has-mosaic>.project:not([hidden]){grid-column:1/-1;grid-row:auto;height:auto;aspect-ratio:3/2}
  #projects .projects.has-mosaic>.project h3{font-size:clamp(33px,9vw,43px)}
  #projects .projects.has-mosaic>.project .project-typewriter{font-size:12px}
}

/* NEWS and PROJECT share one heading rhythm at every viewport width. */
:root{
  --content-heading-size:clamp(42px,3.7vw,54px);
  --content-heading-top:clamp(24px,2.6vw,36px);
  --content-heading-bottom:clamp(14px,1.5vw,20px);
}
.earth-stories .stories-heading,
#projects .section-head{
  padding:var(--content-heading-top) var(--page-gutter) var(--content-heading-bottom);
}
#projects .section-head{margin:0 calc(-1 * var(--page-gutter))}
.earth-stories .stories-heading,
#projects .section-head h2{
  margin:0;
  color:#f5f7fb;
  font:400 var(--content-heading-size)/1.05 var(--king-display-font);
  letter-spacing:.02em;
}
@media(max-width:700px){
  :root{
    --content-heading-size:clamp(34px,8.8vw,46px);
    --content-heading-top:28px;
    --content-heading-bottom:16px;
  }
}
