:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --accent: #e60012;
  --max: 720px;
  /* Design: 120px header on 2400px canvas. Non-hamburger range fixes to 120px,
     hamburger range overrides to 60px in the @media (max-width: 1800px) block. */
  --header-h: 120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 992px) {
  body {
    background: var(--bg) url("/images/bg.webp") no-repeat 50% 50% fixed;
    background-size: cover;
  }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

main { padding-top: 0; }

.top-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 110;
  height: var(--header-h);
  background: #000;
  display: flex;
  align-items: stretch;
  /* 1280vw=10px → 2400vw=44px に線形。1280直上の中間域で
     ENTRYが見切れるのを避けるため固定44pxからclampへ。 */
  gap: clamp(10px, calc(3.036vw - 28.86px), 44px);
}

.site-header__brand {
  display: flex;
  align-items: center;
  padding: 0 clamp(10px, 1.2vw, 22px);
  flex-shrink: 0;
  height: 100%;
}

.site-header__brand-image {
  /* Asset 580×95. At 2400+ vw render at 95px (PSD spec), scale linearly down
     to 40px at 1280vw so the layout fits with full nav. Hamburger (≤1279)
     overrides to 48px in the @media block. */
  height: clamp(40px, calc(4.911vw - 22.857px), 95px);
  width: auto;
  display: block;
}

.site-header__nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  margin-left: auto;
}

.site-header__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  /* 上限を51→30pxに圧縮。font-size上限到達(~1723px)後もnav幅が
     膨らみ続けてENTRYが見切れていたため。 */
  gap: clamp(10px, calc(1.786vw - 12.86px), 30px);
}

.site-header__link {
  font-size: clamp(11px, calc(13 / 1600 * 100vw), 14px);
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  transition: color 0.2s;
}

.site-header__link:hover {
  color: var(--accent);
}

.site-header__entry {
  flex-shrink: 0;
  display: block;
  width: var(--header-h);
  height: var(--header-h);
  transition: opacity 0.2s;
}

.site-header__entry:hover {
  opacity: 0.85;
}

.site-header__entry-image {
  display: block;
  width: 100%;
  height: 100%;
}

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 4px;
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 120;
}

.hamburger[aria-expanded="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

.hamburger__bar {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: #fff;
  transition: transform 0.25s, opacity 0.2s;
}

.hamburger__bar:nth-child(1) { top: 14px; }
.hamburger__bar:nth-child(2) { top: 21px; }
.hamburger__bar:nth-child(3) { top: 28px; }

.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: #000;
  padding: calc(var(--header-h) + 1rem) 1.25rem 3rem;
  overflow-y: auto;
}

.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.mobile-nav__link {
  font-size: 1rem;
  display: block;
  padding: 1rem 0.4rem;
  border-bottom: 1px solid #1f1f1f;
  color: #fff;
}

.mobile-nav__link--entry {
  background: var(--accent);
  text-align: center;
  font-style: italic;
  font-weight: 700;
  margin-top: 1rem;
  border: none;
}

@media (max-width: 1279px) {
  :root { --header-h: 60px; }
  .site-header__nav,
  .site-header__entry { display: none; }
  .hamburger { display: inline-block; }
  .site-header { justify-content: flex-start; }
  .site-header__brand-image { height: 48px; }
}

@media (max-width: 480px) {
  .site-header__brand { padding: 0 0.6rem; }
}

/* ---------- Hero (FV) ---------- */
.hero {
  width: 100%;
  margin: 0;
  padding-top: var(--header-h);
}

.hero__image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ---------- Reference sections (image stack) ---------- */
.reference-sections {
  display: block;
  width: 100%;
}

/* Wide full-bleed band (e.g. About PC intro at 2400×1177) */
.reference-sections__band {
  display: block;
  width: 100%;
  scroll-margin-top: var(--header-h);
}

.reference-sections__band-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

@media (max-width: 991.98px) {
  .reference-sections__band {
    max-width: var(--max);
    margin: 0 auto;
  }
}

.reference-sections__item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 auto;
  max-width: var(--max);
  scroll-margin-top: var(--header-h);
}

.reference-sections__image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

/* ---------- Interview ---------- */
.interview {
  background: #fff;
}

.interview-video {
  width: 85.21%;
  margin: 0 auto;
  padding-bottom: 21.18%;
}

.interview-video__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* ---------- Flow (採用フロー) ---------- */
.flow-form-link {
  position: absolute;
  display: block;
  left: 30.83%;
  top: 34.07%;
  width: 61.40%;
}

.flow-form-link__button {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Recruit (tabbed requirements) ---------- */
.recruit {
  display: flex;
  flex-direction: column;
  background: #fff;
  padding-bottom: clamp(60px, 17.7vw, 141px);
}

.recruit__common {
  margin-bottom: 0;
}

.recruit-tabs {
  display: flex;
  gap: 2.26%;
  width: 100%;
  padding: 0 6.27%;
  margin: 0;
  box-sizing: border-box;
}

.recruit-tabs__tab {
  flex: 1 1 0;
  appearance: none;
  border: 0;
  background: #666;
  color: #fff;
  font-weight: 700;
  font-size: clamp(14px, 3.26vw, 26px);
  line-height: 1;
  height: clamp(48px, 11.65vw, 93px);
  padding: 0 4px;
  border-radius: clamp(10px, 2.13vw, 17px) clamp(10px, 2.13vw, 17px) 0 0;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.recruit-tabs__tab:hover {
  background: #555;
}

.recruit-tabs__tab--active {
  background: var(--accent);
}

.recruit-tabs__tab--active:hover {
  background: var(--accent);
}

.recruit-tabs__panel {
  margin: 0 6.27%;
  border: 4px solid var(--accent);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-sizing: border-box;
  background: #fff;
}

.recruit-tabs__panel > img {
  display: block;
  width: 100%;
  height: auto;
}

.recruit-tabs__form-link {
  display: block;
  width: 71.01%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 9.71%;
}

.recruit-tabs__form-link--kanto {
  margin-top: 4.35%;
}

.recruit-tabs__form-link--chubu {
  margin-top: 3.04%;
}

.recruit-tabs__form-button {
  display: block;
  width: 100%;
  height: auto;
}

.recruit-tabs__panel[hidden] {
  display: none;
}

@media (min-width: 992px) {
  .recruit-tabs__tab {
    font-size: 26px;
  }
}

/* ---------- Apply form ---------- */
.apply {
  scroll-margin-top: var(--header-h);
  padding: 0;
}

.apply__layer {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  container-type: inline-size;
}

.apply__bg {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.apply-form {
  position: absolute;
  /* white card edges align with original 798×2189 art */
  top: 14.7%;
  bottom: 7.5%;
  left: 6.27%;
  right: 6.27%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.apply-form__card {
  background: #fff;
  color: #1a1a1a;
  border-radius: 2.2cqw;
  padding: 4.4% 4.6%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 5cqw;
}

.apply-form__row {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.apply-form__row--radios {
  min-width: 0;
}

.apply-form__row--message {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.apply-form__legend {
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  margin: 0 0 2.4cqw;
  padding: 0;
}

.apply-form__legend-text {
  font-size: clamp(0.95rem, 3.3cqw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1a1a1a;
  line-height: 1.2;
}

.apply-form__required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: clamp(0.6rem, 1.7cqw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2em 0.55em;
  line-height: 1.4;
  border-radius: 2px;
}

.apply-form__radios {
  display: flex;
  flex-wrap: wrap;
  gap: 1cqw 5cqw;
  padding: 0.6cqw 0 0;
}

.apply-form__radio {
  display: inline-flex;
  align-items: center;
  gap: 1.2cqw;
  cursor: pointer;
  font-size: clamp(0.85rem, 2.7cqw, 1.3rem);
  color: #1a1a1a;
}

.apply-form__radio-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.apply-form__radio-mark {
  width: 1.4em;
  height: 1.4em;
  border: 2px solid #00b4ff;
  border-radius: 50%;
  background: #fff;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
}

.apply-form__radio-input:checked + .apply-form__radio-mark::after {
  content: "";
  position: absolute;
  inset: 20%;
  background: #00b4ff;
  border-radius: 50%;
}

.apply-form__radio-input:focus-visible + .apply-form__radio-mark {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.apply-form__input {
  display: block;
  width: 100%;
  font: inherit;
  font-size: clamp(0.9rem, 2.7cqw, 1.3rem);
  color: #1a1a1a;
  background: #fff;
  border: 1px solid #999;
  border-radius: 0.5cqw;
  padding: 2.4cqw 2cqw;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.apply-form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.12);
}

.apply-form__input--textarea {
  flex: 1;
  min-height: 12cqw;
  resize: none;
  line-height: 1.6;
}

.apply-form__privacy {
  text-align: center;
  margin: 2cqw 0 1.4cqw;
}

.apply-form__check {
  display: inline-flex;
  align-items: center;
  gap: 1.2cqw;
  cursor: pointer;
  font-size: clamp(0.85rem, 2.6cqw, 1.25rem);
  color: #1a1a1a;
}

.apply-form__check-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.apply-form__check-mark {
  width: 1.3em;
  height: 1.3em;
  border: 1.5px solid #777;
  background: #fff;
  border-radius: 2px;
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
}

.apply-form__check-input:checked + .apply-form__check-mark::after {
  content: "✓";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -58%);
  color: var(--accent);
  font-size: 1.4em;
  font-weight: 900;
  line-height: 1;
}

.apply-form__check-input:focus-visible + .apply-form__check-mark {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.apply-form__submit {
  appearance: none;
  display: block;
  width: 71.68cqw;
  max-width: 100%;
  margin: 0 auto 6.16cqw;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.apply-form__submit:hover {
  opacity: 0.85;
}

.apply-form__submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.apply-form__submit-image {
  display: block;
  width: 100%;
  height: auto;
}

.apply-form__privacy-link {
  text-decoration: underline;
  text-underline-offset: 0.35em;
  color: inherit;
}

/* ---------- Footer ---------- */
.site-footer {
  width: 100%;
  background: #000;
  color: #fff;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 3rem) clamp(1.25rem, 4vw, 2rem) clamp(1.5rem, 5vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3.5vw, 1.5rem);
}

.site-footer__brand {
  display: flex;
  justify-content: center;
}

.site-footer__brand-image {
  width: clamp(200px, 45vw, 325px);
  height: auto;
  display: block;
}

.site-footer__company {
  margin: 0;
}

.site-footer__company-name,
.site-footer__address {
  margin: 0;
  font-size: clamp(0.95rem, 3.4vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #fff;
}

.site-footer__copyright {
  margin: 0;
  padding-top: clamp(0.9rem, 3vw, 1.25rem);
  border-top: 1px solid #2a2a2a;
  text-align: center;
  font-size: clamp(0.75rem, 2.4vw, 0.85rem);
  color: #fff;
  letter-spacing: 0.02em;
}
