/* ===================== FONT FACE ===================== */
/* プロジェクト固有フォント（/Fonts 配下）を最優先で利用する */
@font-face {
  font-family: "NPA Gill Sans";
  src:
    url("Fonts/GillSans.ttc") format("truetype-collection"),
    url("Fonts/GillSans.ttc") format("collection"),
    url("Fonts/GillSans.ttc") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-007F, U+00A0-024F, U+2000-206F, U+20A0-20CF, U+2100-214F;
}

@font-face {
  font-family: "NPA Kozuka Gothic";
  src: url("Fonts/KozGoPr6N-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===================== RESET ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* 固定ヘッダー（sticky + 浮遊マージン）分のオフセット。
     アンカー移動時にターゲット要素がヘッダー下に隠れないようにする。
     モバイルの値は @media 側で上書き。 */
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  padding: 0;
  font-family:
    "Zen Kaku Gothic New", "NPA Gill Sans", "NPA Kozuka Gothic", "Gill Sans",
    "Gill Sans MT", "小塚ゴシック Pr6N", "Kozuka Gothic Pr6N",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Meiryo",
    sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol,
dl,
dd,
dt,
p,
h1,
h2,
h3,
h4 {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

/* ===================== COLOR TOKENS ===================== */
:root {
  --olive: #504632;
  --brown: #504632;
  --text: #231815;
  --accent: #23ccff;
  --page-max: 1366px;
}

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 10px;
  z-index: 100;
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid var(--olive);
  margin: 20px;
  box-shadow: 0 10px 14px rgba(0, 0, 0, 0.06);
}

.header-inner {
  width: 100%;
  margin: 0;
  padding: 10px 46px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  height: 46px;
  width: auto;
}

.header-nav {
  margin-left: auto;
}

.header-nav ul {
  display: flex;
  align-items: center;
  gap: 36px;
}

.header-nav a {
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #2a2a2a;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.header-nav a:hover {
  opacity: 0.6;
}

/* ===================== HAMBURGER (mobile) ===================== */
/* デスクトップでは非表示。モバイルのみ @media で表示する。
   デザイン: ヘッダーのオリーブ縁取り＋丸角ピル言語と揃えた、円形の
   オリーブ色アウトラインボタン。 */
.nav-toggle {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  border: 1px solid var(--olive);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--olive);
  line-height: 0;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-toggle:hover {
  background: var(--olive);
  color: #ffffff;
}

.nav-toggle[aria-expanded="true"] {
  background: var(--olive);
  color: #ffffff;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.nav-toggle-bars {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 14px;
}

.nav-toggle-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    top 0.25s ease,
    opacity 0.2s ease;
}

.nav-toggle-bar:nth-child(1) {
  top: 0;
}
.nav-toggle-bar:nth-child(2) {
  top: 6px;
}
.nav-toggle-bar:nth-child(3) {
  top: 12px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  background: #ffffff;
  padding-top: 240px;
}

.hero-logo {
  width: min(67vw, 916px);
  max-width: calc(100% - 40px);
  margin: 0 auto;
}

.hero-logo img {
  width: 100%;
  height: auto;
}

/* ABOUT: 修正指示の白地レイアウト。左右の小さな風／波モチーフを含む。 */
.hero-about {
  scroll-margin-top: 120px;
  position: relative;
  width: 100%;
  max-width: var(--page-max);
  min-height: 986px;
  margin: 90px auto 168px;
  overflow: hidden;
}

.about-inner {
  position: relative;
  width: 100%;
  max-width: 980px;
  min-height: 986px;
  margin: 0 auto;
  padding-top: 375px;
}

.about-text {
  max-width: 720px;
  font-size: clamp(14px, 0.4vw + 0.8rem, 19px);
  letter-spacing: 0;
  line-height: 2.8rem;
  font-weight: 700;
  color: var(--text);
}

.about-text p {
  margin: 0 0 0.35em;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-vertical {
  position: absolute;
  top: 75px;
  right: -17px;
  writing-mode: vertical-rl;
  -webkit-writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 2.7rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  line-height: 1.32;
  white-space: nowrap;
  margin: 0;
  color: var(--text);
}

.about-vertical span {
  display: block;
}

.brand-motif-defs {
  position: absolute;
  pointer-events: none;
}

.brand-motif-cluster {
  position: absolute;
  width: 398px;
  height: 112px;
  pointer-events: none;
}

.brand-motif-cluster--left {
  top: 110px;
  left: 5.4%;
}

.brand-motif-cluster--right {
  right: 7.1%;
  bottom: 0;
}

.brand-motif {
  position: absolute;
  width: 108px;
  height: auto;
  overflow: visible;
}

.brand-motif--first {
  left: 0;
  bottom: 0;
}

.brand-motif--middle {
  left: 144px;
  top: 0;
}

.brand-motif--last {
  right: 0;
  bottom: 0;
}

.about-motif-stop--top {
  animation: about-gradient-top 20s ease-in-out infinite;
}

.about-motif-stop--bottom {
  animation: about-gradient-bottom 20s ease-in-out infinite;
}

@keyframes about-gradient-top {
  0%,
  100% {
    stop-color: #af985b;
  }
  20% {
    stop-color: #ff985b;
  }
  40% {
    stop-color: #7f9851;
  }
  60% {
    stop-color: #004fae;
  }
  80% {
    stop-color: #c8a05a;
  }
}

@keyframes about-gradient-bottom {
  0%,
  100% {
    stop-color: #e3c993;
  }
  20% {
    stop-color: #e3c96c;
  }
  40% {
    stop-color: #b4c9c4;
  }
  60% {
    stop-color: #4aa1c3;
  }
  80% {
    stop-color: #c8a05a;
  }
}

/* ===================== SECTION TITLE (common) ===================== */
.section-title {
  text-align: center;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 auto 48px;
  color: var(--text);
  text-indent: 0.3em;
}

.section-title span {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 1.2px solid var(--olive);
  min-width: 320px;
  padding-left: 0.4em;
  padding-right: 0.4em;
}

/* ===================== NEWS ===================== */
.news {
  padding: 60px 20px 40px;
  background: #ffffff;
}

.news-list {
  max-width: 780px;
  margin: 0 auto;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.2;
}

.news-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  padding: 22px 0;
}

.news-row dt {
  text-align: center;
  letter-spacing: 0.06em;
}

.news-row dd {
  letter-spacing: 0.06em;
  color: #2a2a2a;
}

.news-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: opacity 0.2s ease;
}

.news-link:hover {
  opacity: 0.65;
}

.news-empty {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 0;
  text-align: center;
  color: #666;
  font-size: 15px;
  letter-spacing: 0.06em;
}

/* ===================== GOALS ===================== */
.goals {
  padding: 60px 20px 50px;
  text-align: center;
}

.goals-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 70px;
  line-height: 1.4;
}

.goals-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  text-align: left;
}

.goal-item {
  color: var(--text);
}

.goal-item h3 {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 28px;
  letter-spacing: 0.06em;
}

.goal-item h3 strong {
  display: block;
  font-size: 26px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: 0.1em;
}

.goal-item p {
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: 0.06em;
}

/* ===================== APPLY (???????) ===================== */
.apply {
  padding: 50px 20px 50px;
}

.apply-list {
  max-width: 820px;
  margin: 0 auto;
  font-weight: 700;
}

.apply-list li {
  margin-bottom: 38px;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.06em;
}

.apply-list h3 {
  font-size: 17px;
  margin-bottom: 6px;
  letter-spacing: 0.1em;
}

/* ===================== CRITERIA (????) ===================== */
.criteria {
  padding: 60px 20px 60px;
}

.criteria-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.criteria-item {
  position: relative;
  padding-top: 28px;
}

.pill {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--olive);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  padding: 16px 44px;
  border-radius: 999px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  z-index: 2;
}

.criteria-box {
  border: 2px solid var(--olive);
  border-radius: 4px;
  padding: 48px 24px 28px;
  text-align: center;
}

.criteria-box p {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.8;
}

/* ===================== REQUIREMENTS (????) ===================== */
.requirements {
  padding: 50px 20px 60px;
  position: relative;
}

#requirements {
  padding: 50px 20px 0;
}

.requirements-body {
  max-width: 820px;
  margin: 0 auto;
}

.req-block {
  margin-bottom: 40px;
  font-size: 17px;
  line-height: 2.2;
  letter-spacing: 0.06em;
}

.req-block h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}

.req-heading-accent {
  color: var(--accent) !important;
}

.req-block p {
  font-weight: 500;
}

.apply-buttons {
  max-width: 820px;
  margin: 70px auto 0;
  display: flex;
  justify-content: center;
  gap: 48px;
}

.apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--olive);
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  padding: 38px 40px;
  min-width: 340px;
  letter-spacing: 0.2em;
  transition: opacity 0.2s ease;
}

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

/* ３提出物～取り決め: 左辺上の底辺＋右中頂点の直角二等辺。等辺2辺は内側Q曲線（#olive-tri-clip, index.html 更新） */
.olive-tri-band {
  position: relative;
  z-index: 0;
}

/* フロー上の帯の高さは in-flow の .olive-tri-content が決める。clip 形状は JS で objectBoundingBox 更新。
   bottom を JS から調整することで、取り決めと規約パネルなど後続要素の展開に
   三角背景の描画領域が影響されないようにする。 */
.olive-tri-deco-host {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
}

.olive-tri-deco {
  width: 100%;
  height: 100%;
  background: var(--olive);
  clip-path: url(#olive-tri-clip);
}

.olive-tri-content {
  position: relative;
  z-index: 1;
}

.requirements.requirements--olive {
  padding: 0 20px 60px;
  background: transparent;
}

/* ===================== JUDGES ===================== */
.judges {
  padding: 100px 20px 100px;
  position: relative;
}

.judges-row {
  max-width: 1040px;
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.judges-row--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 700px;
}

.judge-card {
  border: 1px solid var(--olive);
  border-radius: 2px;
  padding: 34px 36px 26px;
  background: #ffffff;
  text-align: left;
}

.judge-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 18px;
  background: #e9e9e4;
}

.judge-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.judge-affil {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.7;
  margin-bottom: 6px;
}

.judge-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.judge-topic {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 5px;
  letter-spacing: 0.03em;
}

.judge-field {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

/* ===================== SCHEDULE ===================== */
.schedule {
  padding: 40px 20px 50px;
}

.schedule-list {
  max-width: 720px;
  margin: 0 auto 100px;
  font-size: 16px;
}

.schedule-empty {
  max-width: 720px;
  margin: 0 auto 100px;
  padding: 24px 0;
  text-align: center;
  color: #666;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.schedule-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 18px 0;
}

.schedule-row dt {
  font-weight: 500;
  letter-spacing: 0.06em;
}

.schedule-row dd {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.rules-cta-wrap {
  max-width: 820px;
  margin: 60px auto 0;
  padding: 0 20px;
}

.rules-accordion {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.rules-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--brown);
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  padding: 28px 100px;
  letter-spacing: 0.18em;
  transition: opacity 0.2s ease;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.rules-cta:hover {
  opacity: 0.88;
}

.rules-cta:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

.rules-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.3s ease;
}

/* 開いた状態で下矢印 → 上矢印に反転 */
.rules-cta[aria-expanded="true"] .rules-cta-icon {
  transform: rotate(180deg);
}

/* ===================== RULES PANEL ===================== */
.rules-panel {
  width: 100%;
  margin-top: 32px;
  padding: 40px 44px;
  background: #ffffff;
  border: 1px solid var(--olive);
  border-radius: 18px;
  text-align: left;
  color: var(--text);
}

.rules-group + .rules-group {
  margin-top: 32px;
}

.rules-group-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--olive);
  letter-spacing: 0.08em;
  line-height: 1.6;
  margin-bottom: 14px;
}

.rules-arrows,
.rules-items {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: 0.04em;
}

.rules-arrows li {
  padding-left: 1.4em;
  text-indent: -1.4em;
  margin-bottom: 8px;
}

.rules-arrows li::before {
  content: "→";
  margin-right: 0.4em;
  color: var(--olive);
  font-weight: 700;
}

.rules-items li {
  margin-bottom: 10px;
  padding-left: 1.8em;
  text-indent: -1.8em;
}

.rules-arrows li:last-child,
.rules-items li:last-child {
  margin-bottom: 0;
}

.rules-contact {
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: 0.04em;
}

/* ===================== FOOTER ===================== */
.site-footer {
  padding: 100px 20px 100px;
  text-align: center;
}

.footer-divider {
  max-width: 1080px;
  margin: 0 auto 100px;
  border-top: 1px solid var(--olive);
}

.footer-org {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 22px;
}

.footer-email {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  html {
    scroll-padding-top: 90px;
  }

  .apply-list .sp-none,
  .requirements-body .sp-none,
  .criteria-box .sp-none {
    display: none;
  }
}

@media (max-width: 1100px) {
  .site-header {
    margin: 12px;
    top: 8px;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 12px;
    padding: 8px 10px;
  }

  .header-logo {
    grid-column: 2;
    justify-self: center;
  }

  .header-logo img {
    height: 25px;
  }

  .nav-toggle {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* モバイル: ヘッダーと同言語の浮いた丸角パネルをヘッダー直下に表示。
     閉じた状態は max-height:0 で折り畳み。 */
  .header-nav {
    margin-left: 0;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--olive);
    border-radius: 22px;
    box-shadow: 0 10px 14px rgba(0, 0, 0, 0.06);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition:
      max-height 0.3s ease,
      opacity 0.2s ease,
      visibility 0s linear 0.3s;
  }

  .header-nav.is-open {
    max-height: calc(100vh - 100% - 32px);
    visibility: visible;
    opacity: 1;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      visibility 0s linear 0s;
  }

  .header-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0;
  }

  .header-nav li {
    border-top: 1px solid rgba(80, 70, 50, 0.18);
  }

  .header-nav li:first-child {
    border-top: 0;
  }

  .header-nav a {
    display: block;
    padding: 14px 24px;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: var(--olive);
    font-weight: 700;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (min-width: 901px) and (max-width: 1013px) {
  .about-vertical {
    right: 0;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 120px;
  }

  .hero-logo {
    width: min(84vw, 520px);
    max-width: calc(100% - 32px);
  }

  .hero-about {
    min-height: 0;
    margin: 48px auto 0;
    padding: 112px 20px 120px;
  }

  .about-inner {
    min-height: 0;
    padding: 0;
  }

  .about-text {
    max-width: 100%;
    margin-top: 48px;
    font-size: 14px;
    line-height: 1.95;
  }

  .about-vertical {
    position: static;
    writing-mode: horizontal-tb;
    -webkit-writing-mode: horizontal-tb;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 0.14em;
    line-height: 1.6;
    width: 100%;
    margin: 0;
    white-space: normal;
  }

  .about-vertical span {
    display: block;
  }

  .brand-motif-cluster {
    width: 218px;
    height: 65px;
  }

  .brand-motif-cluster--left {
    top: 24px;
    left: 16px;
  }

  .brand-motif-cluster--right {
    right: 16px;
    bottom: 20px;
  }

  .brand-motif {
    width: 56px;
  }

  .brand-motif--middle {
    left: 81px;
  }

  .goals-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .criteria-box p {
    font-size: 22px;
  }

  .judges-row,
  .judges-row--two {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .apply-buttons {
    flex-direction: column;
    gap: 16px;
  }

  .apply-btn {
    min-width: 100%;
    padding: 22px 24px;
    font-size: 18px;
  }

  .rules-cta {
    padding: 20px 40px;
    font-size: 18px;
  }

  .rules-panel {
    padding: 26px 20px;
    border-radius: 14px;
    margin-top: 24px;
  }

  .rules-group + .rules-group {
    margin-top: 24px;
  }

  .rules-group-title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .rules-arrows,
  .rules-items,
  .rules-contact {
    font-size: 13px;
    line-height: 1.9;
  }

  .news-row,
  .schedule-row {
    grid-template-columns: 120px 1fr;
    gap: 12px;
  }

  .news-row {
    font-size: 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .goals-title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .about-motif-stop {
    animation: none;
  }
}
