/* Quuma logo cutout. Display crops leave space around the mark and lettering. */
@font-face {
  font-family: "Quuma Corporate";
  src: url("assets/fonts/yomogi-quuma-corporate-20261012-v4.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.quuma-logo {
  display: block;
  flex: none;
  width: 66px;
  height: auto;
  overflow: hidden;
  background: transparent;
  border-radius: 0;
  filter: drop-shadow(0 1px 1px #06183235);
}
.brand-link {
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  writing-mode: horizontal-tb;
  text-shadow: none;
}
.brand-link:focus-visible { outline: 3px solid #25bde9; outline-offset: 4px; }
.topbar-brand.brand-link {
  display: block;
  margin: 0 auto 16px;
  padding: 0;
}
.rail-brand.brand-link { display: block; margin: 16px auto 0; }
.rail-brand .quuma-logo { width: 62px; }
.rail-mark { border: 0; border-radius: 3px; }
.rail-mark .quuma-logo { width: 34px; }
.works-brand.brand-link { display: inline-flex; align-items: center; gap: 16px; }
.works-brand.brand-link .quuma-logo { width: 66px; }
.footer-brand { display: inline-flex; }
.footer-brand .quuma-logo { width: 70px; }
.hero-brand {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 20px);
  position: absolute;
  z-index: 6;
  top: calc(clamp(26px, 4.5vh, 56px) + 12px);
  left: calc(106px + clamp(28px, 4.6vw, 100px));
  pointer-events: none;
}
.hero-brand-company,
.hero-brand-wordmark { display: block; flex: none; height: auto; overflow: hidden; filter: drop-shadow(0 2px 2px #153f6273); }
.hero-brand-company { width: clamp(124px, 10vw, 190px); }
.hero-brand-wordmark { width: clamp(210px, 18vw, 330px); }

@media (max-height: 650px) and (min-width: 801px) {
  .topbar-brand.brand-link { margin-bottom: 8px; }
  .topbar-brand .quuma-logo { width: 58px; }
}
@media (max-height: 700px) and (min-width: 801px) {
  .hero-brand { top: 26px; }
  .hero-brand-company { width: 96px; }
  .hero-brand-wordmark { width: 170px; }
}
@media (max-width: 800px) {
  body .mobile-menu-toggle,
  body.in-philosophy .mobile-menu-toggle,
  body.after-approach .mobile-menu-toggle {
    top: 18px;
    right: 18px;
    display: block;
    width: 112px;
    height: 46px;
    padding: 0 43px 0 17px;
    border: 1px solid #e6f0f470;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff25, #ffffff06), #071e35a6;
    color: #f5fbff;
    font-family: Arial, "Hiragino Sans", sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 44px;
    letter-spacing: .15em;
    text-align: left;
    text-shadow: none;
    box-shadow: inset 0 1px 0 #ffffff30, 0 6px 20px #03152b24;
    backdrop-filter: blur(12px) saturate(1.15);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
  }
  body .mobile-menu-toggle::before,
  body .mobile-menu-toggle::after {
    position: absolute;
    right: 16px;
    left: auto;
    display: block;
    width: 20px;
    height: 1px;
    margin: 0;
    border: 0;
    border-radius: 1px;
    background: currentColor;
    box-shadow: none;
    content: "";
    transform: none;
    transition: top .2s ease, transform .2s ease;
  }
  body .mobile-menu-toggle::before { top: 18px; }
  body .mobile-menu-toggle::after { top: 26px; }
  body.menu-open .mobile-menu-toggle::before { top: 22px; transform: rotate(45deg); }
  body.menu-open .mobile-menu-toggle::after { top: 22px; transform: rotate(-45deg); }
  body.menu-open .mobile-menu-toggle::before,
  body.menu-open .mobile-menu-toggle::after { content: ""; background: currentColor; height: 1px; font-size: 0; line-height: 0; margin: 0; }
  body .mobile-menu-toggle:hover { border-color: #e6f0f4c4; box-shadow: inset 0 1px 0 #ffffff45, 0 8px 24px #03152b35; }
  body .mobile-menu-toggle:focus-visible { outline: 2px solid #bceaff; outline-offset: 4px; }
  .hero-brand { top: 22px; left: 104px; }
  .hero-brand-company { width: 112px; }
  .hero-brand-wordmark { width: 200px; }
  /* Keep one stable position as the mobile header moves between sections. */
  body .mobile-brand.brand-link,
  body.after-approach .mobile-brand.brand-link,
  body.in-philosophy .mobile-brand.brand-link,
  body.after-approach.in-works-preview .mobile-brand.brand-link {
    top: 12px;
    right: auto;
    left: 14px;
    width: 66px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .topbar-brand.brand-link { align-self: flex-start; margin: 0 0 24px; }
  .topbar-brand.brand-link .quuma-logo { width: 90px; }
  .rail-brand.brand-link { margin: 0; }
  .rail-brand.brand-link .quuma-logo { width: 56px; }
}
@media (max-width: 600px) {
  .hero-brand { top: 106px; left: 22px; gap: 10px; }
  .hero-brand-company { width: clamp(86px, 25vw, 112px); }
  .hero-brand-wordmark { width: clamp(150px, 40vw, 200px); }
}
@media (min-width: 601px) and (max-width: 800px) {
  .story-counter { right: 150px; }
}
@media (max-width: 700px) {
  .works-brand.brand-link .quuma-logo { width: 56px; }
}

/* Company and privacy pages remain reachable from every page. */
.qc-footer, .works-footer { flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; min-width: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.qc-footer .footer-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 600px) {
  .footer-links { gap: 4px 18px; }
  .qc-footer { gap: 8px; }
  .works-footer .footer-links a { font-size: 12px; }
}

/* Quiet navigation: type, fine separators and a small blue edge. */
.topbar { background: #fafaf7; border-right-color: #18333f16; box-shadow: none; }
.topbar .section-rail a { color: #53666d; font-family: "Quuma Corporate", var(--font-jp); letter-spacing: .1em; background: transparent; transition: color .2s ease; }
.topbar .section-rail a:not(:last-child)::after { height: 12px; background: linear-gradient(#718f9a00, #718f9a66, #718f9a00); }
.topbar .section-rail a::before { content: ""; position: absolute; right: 0; top: 50%; width: 2px; height: 22px; background: #369bbc; opacity: 0; transform: translateY(-50%) scaleY(.5); transition: opacity .2s ease, transform .2s ease; }
.topbar .section-rail a:hover, .topbar .section-rail a:focus-visible { color: #193d4c; background: transparent; }
.topbar .section-rail a:hover::before, .topbar .section-rail a:focus-visible::before { opacity: 1; transform: translateY(-50%) scaleY(1); }
.topbar .section-rail a:focus-visible { outline: 1px solid #369bbc; outline-offset: -6px; }
.topbar .section-rail a { white-space: nowrap; }
@media (max-width: 800px) {
  .topbar .section-rail a { letter-spacing: .035em; }
  .topbar .section-rail a:not(:last-child)::after { height: 1px; background: linear-gradient(90deg, #718f9a55, #718f9a00); }
  .topbar .section-rail a::before { right: auto; left: 0; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar .section-rail a, .topbar .section-rail a::before { transition: none; }
}
