/* ========== 基本設定 ========== */
:root{
  --c-bg: #0b1020;
  --c-surface: #0f1630;
  --c-muted: #aab4d4;
  --c-text: #e9eefc;
  --c-primary: #2fa1ff;   /* 海の青 */
  --c-accent: #00d1b2;    /* サンゴ礁のエメラルド */
  --c-border: #223055;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --maxw: 1320px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Helvetica Neue", Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3{ line-height: 1.25; margin: 0 0 .5rem; }
h1{ font-size: clamp(2rem, 6vw, 3rem); }
h2{ font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 1rem; }
h3{ font-size: 1.125rem; }

.container{ width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

.skip-link{
  position: absolute; left: -999px; top: auto;
  background: var(--c-primary); color: #001;
  padding: .5rem .75rem; border-radius: 8px;
}
.skip-link:focus{ left: .5rem; top: .5rem; z-index: 1000; }

/* ========== ヘッダー ========== */
.site-header{
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(120%) blur(8px);
  background: rgba(6,10,24,.6);
  border-bottom: 1px solid var(--c-border);
}
.header-inner{ display: flex; align-items: center; gap: 1rem; padding: .6rem 0; }

.brand{ display: inline-flex; align-items: center; gap: .8rem; color: var(--c-text); text-decoration: none; }
.brand:hover{ text-decoration: none; }
.brand-mark{ width: 40px; height: 40px; filter: drop-shadow(0 6px 16px rgba(47,161,255,.25)); }
.brand-text{ display: grid; }
.brand-univ{ font-size: .8rem; color: var(--c-muted); letter-spacing: .03em; }
.brand-course{ font-weight: 700; letter-spacing: .02em; }

.nav-toggle{ display: none; }
.hamburger{ margin-left: auto; width: 36px; height: 28px; display: none; cursor: pointer; }
.hamburger span{ display: block; height: 3px; background: var(--c-text); margin: 6px 0; border-radius: 2px; transition: .3s; }

.site-nav ul{ display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.site-nav a{ display: inline-block; padding: .6rem .8rem; border-radius: 999px; color: var(--c-text); }
.site-nav a:hover{ background: rgba(47,161,255,.12); text-decoration: none; }

/* ========== ヒーロー ========== */
.hero{ background: none; 
  border-bottom: 1px solid var(--c-border);
}
.hero-inner{ display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.hero-copy .badge{
  display: inline-block; background: rgba(0,209,178,.18); border: 1px solid rgba(0,209,178,.5);
  color: var(--c-text); padding: .35rem .6rem; border-radius: 999px; font-size: .82rem;
}
.hero h1 .nowrap{ white-space: nowrap; }
.lead{ color: var(--c-muted); margin: .6rem 0 1rem; font-size: 1.05rem; }
.cta-row{ display: flex; gap: .75rem; flex-wrap: wrap; }

.btn{ display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .7rem 1rem; border-radius: 999px; border: 1px solid var(--c-border);
  text-decoration: none; font-weight: 700;
}
.btn.primary{ background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); color: #001; border: none; }
.btn.ghost{ background: transparent; color: var(--c-text); }
.btn:hover{ filter: brightness(1.05); text-decoration: none; }
.hero-art{ min-height: 260px; }
.wave-art{ width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.25)); }

/* ========== セクション共通 ========== */
section{ padding: clamp(2rem, 5vw, 4rem) 0; }
.alt{ background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 40%); }

.grid-3{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-2{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.pill{ border-radius: 20px; }

.check{ padding-left: 1.2rem; }
.check li{ margin: .4rem 0; }
.check li::marker{ content: "⚫︎ "; color: var(--c-surfac); }

.table-wrap{ overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--c-border); }
.curr-table{ width: 100%; border-collapse: collapse; }
.curr-table th, .curr-table td{ padding: .75rem; border-bottom: 1px solid var(--c-border); }
.curr-table thead th{ background: rgba(47,161,255,.08); text-align: left; }

/* ========== ニュース ========== */
.news-list{ list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.news-list li{
  display: grid; grid-template-columns: 120px 1fr; align-items: baseline;
  padding: .75rem 1rem; border: 1px solid var(--c-border); border-radius: 12px;
  background: rgba(255,255,255,.02);
}
.news-list time{ font-variant-numeric: tabular-nums; color: var(--c-muted); }

/* ========== 研究室 & 声 ========== */
.lab h3{ margin-bottom: .4rem; }
.voices .voice-list{ list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.voice-list li{ border-left: 3px solid var(--c-accent); padding-left: .9rem; }
.voice-list blockquote{ margin: 0; color: var(--c-text); }
.voice-list cite{ display: block; margin-top: .4rem; color: var(--c-muted); font-style: normal; }

/* ========== フッター ========== */
.site-footer{
  margin-top: 2rem; border-top: 1px solid var(--c-border);
  
}
.footer-inner{
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1rem 0;
}
.footer-links{ display: flex; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.footer-links a{ color: var(--c-muted); font-size: .95rem; }
.footer-links a:hover{ color: var(--c-text); }

/* ========== フォーム ========== */
.contact-form label{ display: grid; gap: .3rem; margin-bottom: .6rem; }
.contact-form input, .contact-form textarea{
  border: 1px solid var(--c-border); border-radius: 10px; background: rgba(0,0,0,.15);
  color: var(--c-text); padding: .6rem .7rem;
}
.contact-form input::placeholder, .contact-form textarea::placeholder{ color: #93a0c3; }

/* ========== レスポンシブ ========== */
@media (max-width: 960px){
  .hero-inner{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr 1fr; }
  .footer-inner{ flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px){
  .grid-3, .grid-2{ grid-template-columns: 1fr; }
  .site-nav{ position: fixed; inset: 56px 0 auto 0; background: rgba(10,14,30,.96); border-bottom: 1px solid var(--c-border);
    transform: translateY(-120%); transition: transform .3s ease; }
  .site-nav ul{ flex-direction: column; padding: .8rem; }
  .hamburger{ display: block; }
  .nav-toggle:checked ~ .hamburger span:nth-child(1){ transform: translateY(9px) rotate(45deg); }
  .nav-toggle:checked ~ .hamburger span:nth-child(2){ opacity: 0; }
  .nav-toggle:checked ~ .hamburger span:nth-child(3){ transform: translateY(-9px) rotate(-45deg); }
  .nav-toggle:checked ~ .site-nav{ transform: translateY(0); }
}

/* ========== 印刷用 ========== */
@media print{
  .hero, .site-header, .site-footer, .cta-row { display: none !important; }
  body{ background: white; color: #000; }
  .card{ box-shadow: none; border-color: #aaa; }
}


/* === Fix: keep top nav links on one line (desktop/tablet) === */
@media (min-width: 721px){
  .header-inner{ flex-wrap: nowrap; }
  .site-nav ul{ flex-wrap: nowrap; gap: .6rem; }
  .site-nav a{ white-space: nowrap; padding: .55rem .7rem; }
}

/* Tighten layout slightly between 721px and 1024px to avoid wrapping */
@media (min-width: 721px) and (max-width: 1024px){
  .brand-univ{ font-size: .75rem; }
  .brand-course{ font-size: .95rem; }
}


/* Compact link-row for About section */
.cta-row{ flex-wrap: wrap; }


/* Responsive Google Map embed */
.map-embed{ position: relative; width: 100%; padding-bottom: 56.25%; border-radius: var(--radius); overflow: hidden; }
.map-embed iframe{ position: absolute; inset: 0; width: 100%; height: 100%; }


/* About section adjustments */
#about .card ul{ margin: .5rem 0 0 1.2rem; }
#about .card li{ margin: .25rem 0; }


/* About split layout */
.about-split{ display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; align-items: start; }
.about-video iframe{ max-width: 100%; height: auto; aspect-ratio: 16 / 9; }
.about-video a{ display: inline-block; margin-bottom: .5rem; }

@media (max-width: 960px){
  .about-split{ grid-template-columns: 1fr; }
  .about-video iframe{ width: 100%; }
}


/* === Remove faint horizontal rules in background === */
.site-header{ border-bottom: 0 !important; }
.hero{ background: none;  border-bottom: 0 !important; }
.site-footer{ border-top: 0 !important; }

/* Remove alt gradient */
.alt{ background: none !important; }
section{ padding: clamp(2rem, 5vw, 4rem) 0; }


/* Equal width hero CTAs */
.hero .cta-row{ display: flex; gap: .75rem; }
.hero .cta-row .btn{ flex: 1 1 0; text-align: center; }
@media (max-width: 560px){
  .hero .cta-row .btn{ flex: 100%; }
}


/* === About section: full justification and balanced layout === */
#about .about-split{ align-items: stretch; }
#about .about-text, #about .about-video{ display: flex; flex-direction: column; }
#about .about-text{ justify-content: center; }
#about .about-text p{
  margin: 0;
  line-height: 1.95;
  text-align: justify;
  text-justify: inter-ideograph;
  letter-spacing: .02em;
  line-break: strict;
}
#about .about-video a{ margin-bottom: .5rem; }
#about .about-video iframe{ flex: 0 0 auto; max-width: 100%; height: auto; aspect-ratio: 16 / 9; }

@media (max-width: 960px){
  #about .about-text p{ line-height: 1.9; }
}


/* === Hero slider === */
.hero-media{ position: relative; min-height: 260px; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.hero-media .slides{ position: relative; width: 100%; height: 100%; aspect-ratio: 16/10; }
.hero-media .slides .slide{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .8s ease-in-out;
}
.hero-media .slides .slide.active{ opacity: 1; }

@media (max-width: 960px){
  .hero-media .slides{ aspect-ratio: 16/9; }
}
@media (prefers-reduced-motion: reduce){
  .hero-media .slides .slide{ transition: none; }
}

@media (max-width: 560px){ .grid-4{ grid-template-columns: 1fr; } }

/* === Light theme override (background white) + Header/Footer CMYK C100 M80 Y30 K30 === */
/* CMYK(100,80,30,30) ≈ RGB(0,36,125) = #00247D */
:root{
  --brand-hf: #00247D;      /* header & footer color */
  --c-bg: #ffffff;          /* page background to white */
  --c-text: #1a1f29;        /* dark body text */
  --c-muted: #5b6473;       /* muted text */
  --c-surface: #f7f8fb;     /* card surface */
  --c-border: #d8dbe3;      /* subtle borders */
  --c-primary: #2563eb;     /* link/button accent */
  --c-accent: #0ea5e9;
}

body{ background: var(--c-bg); color: var(--c-text); }

/* Header & Nav */
.site-header{
  backdrop-filter: none;
  background: var(--brand-hf);
  border-bottom: none;
}
.site-header .brand, .site-header a{ color:#fff; }
.site-header .hamburger span{ background:#fff; }
.site-nav a:hover{ background: rgba(255,255,255,.12); text-decoration: none; }

/* Mobile nav background to match */
@media (max-width: 720px){
  .site-nav{ background: var(--brand-hf); border-bottom: none; }
}

/* Footer */
.site-footer{
  background: var(--brand-hf);
  color: #fff;
  border-top: none;
}
.site-footer a{ color:#e6f2ff; }
.site-footer a:hover{ color:#fff; }

/* Sections / Cards tuned for light BG */
.alt{ background: none; }
.card{
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: 0 8px 24px rgba(16,24,40,.08);
}
.news-list li{ background:#fff; border-color: var(--c-border); }
.news-list time{ color: var(--c-muted); }

/* Buttons on light */
.btn{ color: var(--c-text); background:#fff; border:1px solid var(--c-border); }
.btn.primary{ color:#fff; background: linear-gradient(90deg,var(--c-primary),var(--c-accent)); border:none; }
.btn.ghost{ background: transparent; color: var(--c-text); }

/* Tables */
.curr-table th, .curr-table td{ border-bottom: 1px solid var(--c-border); }
.curr-table thead th{ background: #eef2ff; color: #16213a; }


/* === Header brand readability === */
.site-header .brand-univ{ color: #EAF2FF !important; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.site-header .brand-course{ color: #FFFFFF !important; text-shadow: 0 1px 2px rgba(0,0,0,.25); font-weight: 800; }


/* === Layout refresh: larger hero image & realigned sections === */
.hero{ padding: clamp(2rem, 5vw, 4rem) 0 clamp(1rem, 3vw, 2rem); }
.hero-inner{ grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: 2.2rem; }
.hero-copy h1{ font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.hero-copy .lead{ font-size: 1.1rem; }
.hero-media{ border-radius: 18px; }
.hero-media .slides{ aspect-ratio: 16/7; } /* shorter, wider visual like ref site */
@media (max-width: 1080px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-media .slides{ aspect-ratio: 16/9; }
}

/* News layout: two-column on desktop for denser first view */
.news-list{ grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.news-list li{ grid-template-columns: 120px 1fr; }
@media (max-width: 860px){
  .news-list{ grid-template-columns: 1fr; }
}

/* Tighten general vertical rhythm */
section{ padding: clamp(1.6rem, 4vw, 3rem) 0; }


/* === Full-bleed hero with overlay === */
.hero{ position: relative; padding: 0; }
.hero-media{ position: relative; width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; overflow: hidden; background: #000; }
.hero-media .slides{ position: relative; width: 100%; height: auto; aspect-ratio: 16/6; }
.hero-media .slide{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease-in-out; }
.hero-media .slide.active{ opacity: 1; }
.hero-overlay{ position: absolute; inset: 0; display: flex; align-items: center; pointer-events: none; }
.hero-overlay .container{ pointer-events: auto; padding-top: clamp(2rem,5vw,5rem); padding-bottom: clamp(2rem,5vw,5rem); }
.hero-copy h1{ font-size: clamp(2.3rem, 4.8vw, 3.4rem); text-shadow: 0 2px 8px rgba(0,0,0,.25); color: #fff; }
.hero-copy .lead{ color: #f3f6ff; text-shadow: 0 1px 4px rgba(0,0,0,.25); }
.hero-copy .badge{ background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); color:#fff; }
.hero .btn.ghost{ color:#fff; border-color: rgba(255,255,255,.45); background: rgba(0,0,0,.15); }
.hero .btn.primary{ box-shadow: 0 6px 20px rgba(0,0,0,.2); }

@media (max-width: 960px){
  .hero-media .slides{ aspect-ratio: 16/9; }
  .hero-copy h1{ font-size: clamp(1.8rem, 5.4vw, 2.4rem); }
}

/* === News: force single-column === */
.news-list{ grid-template-columns: 1fr !important; }


/* === Header/Footer color = same as primary CTA === */
:root{
  /* ensure these are defined; adjust if you want different brand hues */
  --c-primary: #2563eb;
  --c-accent:  #0ea5e9;
}

.site-header{
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent)) !important;
  border-bottom: none;
}
@media (max-width: 720px){
  .site-nav{ background: linear-gradient(90deg, var(--c-primary), var(--c-accent)) !important; }
}
.site-header .brand, .site-header a{ color:#fff; }
.site-header .hamburger span{ background:#fff; }

.site-footer{
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent)) !important;
  color: #fff;
  border-top: none;
}
.site-footer a{ color:#e6f2ff; }
.site-footer a:hover{ color:#fff; }


/* === Badge emphasis: larger & clearer color === */
.hero-copy .badge{
  display: inline-block;
  font-size: 1.06rem !important;
  font-weight: 800;
  letter-spacing: .02em;
  padding: .5rem .9rem !important;
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
  border: 2px solid rgba(255,255,255,.55) !important;
  border-radius: 999px !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* === About: larger text & push video right === */
#about .about-split{
  grid-template-columns: 1.25fr .9fr !important;
  column-gap: 2rem;
}
#about .about-text p{
  font-size: 1.05rem;
}
#about .about-video{
  justify-self: end;
}

#about .about-video{ justify-self: center; }
#about .about-video iframe{
  width: min(720px, 100%) !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
}
@media (max-width: 960px){
  #about .about-split{ grid-template-columns: 1fr !important; }
  #about .about-video iframe{ width: 100% !important; }
}


/* === About YouTube: fill right column to the edges === */
#about .about-video{ justify-self: stretch !important; align-self: stretch !important; }
#about .about-video iframe{
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  border: 0;
}


/* === Subpage hero spacing adjustments (2025-10-08) === */
/* 1) Add more space between sticky header and page title block (h1) on subpages */
.site-header + main > .hero{
  padding-top: clamp(3rem, 7vw, 5rem);
}

/* 2) Make the gap between page title and its lead text/items tighter */
.site-header + main > .hero .lead{
  margin-bottom: .4rem;
}

/* 3) Reduce the top padding of the first content section after the hero
      so the title block sits closer to the content */
main > .hero + section{
  padding-top: clamp(.5rem, 2vw, 1rem);
}

/* Notes:
   - Index page's hero is placed BEFORE <main>, so these selectors won't affect it.
   - Other pages place their hero INSIDE <main>, so only those are targeted. */



/* === Curriculum tweaks (2025-10-08) === */
/* 1) model.png smaller than half on desktop/tablet */
.curr-model .zoom-figure img{
  width: 45% !important;   /* 半分以下 */
  max-width: 45% !important;
  margin-inline: auto;
  display: block;
}
@media (max-width: 560px){
  .curr-model .zoom-figure img{
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 2) 2x2 grid on desktop/tablet; 1 col on small screens */
.grid-4{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 560px){
  .grid-4{ grid-template-columns: 1fr; }
}

