/*
  5secondary renewal stylesheet
  - Static HTML/CSS/JS only
  - No external libraries
  - Designed to differ from the alumni site and mathed lab site
*/

:root {
  --bg: #f8f4ec;
  --paper: #fffaf1;
  --ink: #241a24;
  --muted: #6d6470;
  --line: rgba(36, 26, 36, 0.14);
  --plum: #3b183f;
  --plum-2: #54245a;
  --aubergine: #251528;
  --coral: #d76846;
  --amber: #e0ab55;
  --sky: #78a7b8;
  --white: #ffffff;
  --shadow: 0 26px 70px rgba(59, 24, 63, 0.16);
  --radius: 26px;
  --radius-sm: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(215, 104, 70, .18), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(120, 167, 184, .22), transparent 24rem),
    linear-gradient(180deg, #fffaf1 0%, var(--bg) 55%, #f0e8d9 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  letter-spacing: .02em;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--coral); }
img { display: block; max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  top: -64px;
  left: 12px;
  z-index: 100;
  padding: .7rem 1rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--plum);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 250, 241, .86);
  border-bottom: 1px solid rgba(59, 24, 63, .1);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--max), calc(100% - 36px));
  min-height: 76px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 300px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 15px;
  color: #fff8eb;
  background:
    linear-gradient(135deg, var(--plum), var(--coral)),
    radial-gradient(circle at 85% 20%, var(--amber), transparent 42%);
  box-shadow: 0 15px 34px rgba(59, 24, 63, .22);
  font-weight: 900;
  font-size: 1.2rem;
  transform: rotate(-4deg);
}

.brand-text { display: grid; line-height: 1.25; }
.brand-title { font-weight: 800; font-size: .96rem; }
.brand-subtitle { color: var(--muted); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--ink);
  border-radius: 999px;
  padding: .52rem .84rem;
  font: inherit;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 5px;
  align-items: center;
  list-style: none;
}

.site-nav a {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #4d4050;
  font-size: .9rem;
  font-weight: 750;
  white-space: nowrap;
}

.site-nav a:hover { background: rgba(215, 104, 70, .13); color: var(--plum); }

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 8% 12%, rgba(215,104,70,.36), transparent 26rem),
    radial-gradient(circle at 86% 20%, rgba(120,167,184,.32), transparent 24rem),
    linear-gradient(135deg, #251528 0%, #3b183f 48%, #6b2c55 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 80%, transparent);
}

.hero::after {
  content: "∑";
  position: absolute;
  right: min(4vw, 56px);
  bottom: -4.4rem;
  color: rgba(255,255,255,.08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(12rem, 26vw, 24rem);
  line-height: 1;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 36px));
  margin-inline: auto;
  padding: 96px 0 102px;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(300px, .86fr);
  gap: 48px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 18px;
  color: #ffd7a8;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 5.8vw, 5rem);
  line-height: 1.05;
  letter-spacing: -.055em;
}
.hero-lead {
  max-width: 43rem;
  color: rgba(255,255,255,.82);
  font-size: clamp(1.02rem, 2vw, 1.24rem);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 1.16rem;
  font-weight: 850;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: #fff8eb; color: var(--plum); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.button-secondary { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: var(--white); }
.button-dark { background: var(--plum); color: var(--white); box-shadow: 0 16px 34px rgba(59,24,63,.18); }

.hero-panel {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 30px;
  padding: 28px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 80px rgba(0,0,0,.18);
}
.panel-kicker {
  color: #ffd7a8;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero-panel h2 { font-size: clamp(1.38rem, 3vw, 2.2rem); margin-bottom: 12px; color: #fff; }
.hero-panel p { color: rgba(255,255,255,.8); }

.panel-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.panel-metrics div {
  padding: 13px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.1);
  text-align: center;
}
.panel-metrics span { display: block; font-size: 1.3rem; font-weight: 900; color: #fff; }
.panel-metrics small { color: rgba(255,255,255,.66); }

main {
  width: min(var(--max), calc(100% - 36px));
  margin-inline: auto;
  padding: 76px 0 96px;
}

.section { margin-bottom: 78px; scroll-margin-top: 92px; }
.section-header { max-width: 840px; margin-bottom: 28px; }
.section-header.compact { margin-bottom: 20px; }
.section-kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-weight: 900;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h2 {
  margin-bottom: 14px;
  font-size: clamp(1.72rem, 3.8vw, 2.75rem);
  line-height: 1.22;
  letter-spacing: -.045em;
}
h3 { font-size: 1.18rem; line-height: 1.42; }
.section-lead { color: #625768; font-size: 1.05rem; }

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.principle-card,
.school-card,
.theme-card,
.note-card,
.contact-card,
.resource-card,
.timeline-body {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,250,241,.78);
  box-shadow: var(--shadow);
}
.principle-card { padding: 28px; }
.principle-number {
  color: var(--coral);
  font-weight: 900;
  letter-spacing: .14em;
  font-size: .78rem;
}
.principle-card p:last-child,
.school-card p:last-child,
.theme-card p:last-child,
.contact-card p:last-child { margin-bottom: 0; color: #625768; }

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, .75fr);
  gap: 22px;
  align-items: stretch;
}
.theme-card { padding: 34px; background: linear-gradient(135deg, rgba(255,250,241,.9), rgba(255,246,229,.72)); }
.check-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.check-list li {
  position: relative;
  padding-left: 1.7rem;
  color: #4e4453;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--coral);
  font-weight: 900;
}
.note-card {
  padding: 30px;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at 92% 10%, rgba(224,171,85,.22), transparent 12rem),
    linear-gradient(135deg, #fff8eb, #f6e7d7);
}
.note-label { color: var(--coral); font-weight: 900; letter-spacing: .15em; text-transform: uppercase; font-size: .76rem; }
.note-main { font-size: 1.35rem; line-height: 1.45; font-weight: 900; color: var(--plum); }

.school-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.school-card { padding: 22px; min-height: 210px; display: flex; flex-direction: column; }
.school-icon-image {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.school-icon-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.school-card h3 { margin-bottom: 10px; }



.school-link {
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.school-link:hover {
  color: var(--ink);
  transform: translateY(-3px);
  background: rgba(255,250,241,.94);
  box-shadow: 0 30px 76px rgba(59, 24, 63, 0.2);
}

.school-link small {
  display: inline-flex;
  margin-top: auto;
  color: var(--coral);
  font-weight: 900;
  font-size: .82rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 18px;
  align-items: start;
}
.timeline-date {
  position: sticky;
  top: 96px;
  padding: 12px 14px;
  border-radius: 999px;
  color: var(--white);
  background: var(--plum);
  text-align: center;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(59,24,63,.15);
}
.timeline-body { padding: 26px; }
.timeline-body h3 { margin-bottom: 10px; }
.timeline-body p { color: #625768; }

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 .84rem;
  border: 1px solid rgba(215,104,70,.28);
  border-radius: 999px;
  color: var(--plum);
  background: rgba(215,104,70,.1);
  font-weight: 800;
  font-size: .9rem;
}

.resources { margin-bottom: 66px; }
.resource-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.resource-card {
  padding: 22px;
  display: grid;
  gap: 7px;
}
.resource-card span {
  width: fit-content;
  padding: .15rem .5rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--coral);
  font-size: .72rem;
  font-weight: 900;
}
.resource-card strong { font-size: 1.04rem; }
.resource-card small { color: var(--muted); }

.contact-section { margin-bottom: 0; }
.contact-card {
  padding: 34px;
  background:
    radial-gradient(circle at 8% 0%, rgba(120,167,184,.2), transparent 15rem),
    linear-gradient(135deg, rgba(255,250,241,.88), rgba(255,250,241,.62));
}
.small-note { font-size: .9rem; color: var(--muted); }

.site-footer {
  color: rgba(255,255,255,.78);
  background: #1d1020;
}
.footer-inner {
  width: min(var(--max), calc(100% - 36px));
  margin-inline: auto;
  padding: 54px 0 34px;
  display: grid;
  grid-template-columns: 1.1fr .7fr .7fr;
  gap: 36px;
}
.footer-title { color: #fff; font-weight: 900; margin-bottom: 10px; }
.footer-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.footer-list a { color: rgba(255,255,255,.78); }
.copyright {
  width: min(var(--max), calc(100% - 36px));
  margin-inline: auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.48);
  font-size: .82rem;
}

@media (max-width: 960px) {
  .brand { min-width: auto; }
  .brand-subtitle { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    inset: 68px 18px auto 18px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,250,241,.97);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: grid; gap: 4px; }
  .site-nav a { width: 100%; justify-content: center; }
  .hero-inner,
  .split-section { grid-template-columns: 1fr; }
  .school-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid,
  .resource-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-inner { min-height: 68px; }
  .brand-title { font-size: .9rem; }
  .brand-mark { width: 42px; height: 42px; }
  .hero-inner { padding: 62px 0 70px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  main { padding-top: 54px; }
  .school-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-date { position: static; width: fit-content; }
  .resource-header { align-items: flex-start; flex-direction: column; }
}


/* Updated site icon and R8 notice section */
.brand-mark {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 15px 34px rgba(59, 24, 63, .22);
  transform: none;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.notice-section {
  margin-top: -20px;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.event-card {
  position: relative;
  min-height: 260px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,250,241,.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.event-card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(215,104,70,.10);
}

.event-card.highlight {
  background:
    radial-gradient(circle at 90% 8%, rgba(224,171,85,.20), transparent 9rem),
    linear-gradient(135deg, rgba(255,250,241,.94), rgba(255,242,225,.84));
}

.event-school {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  color: var(--coral);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.45;
}

.event-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  color: var(--plum);
  font-size: 1.08rem;
}

.event-date {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  padding: .2rem .55rem;
  border-radius: 999px;
  color: #fff;
  background: var(--plum);
  font-size: .86rem;
  font-weight: 900;
}

.event-card p {
  position: relative;
  z-index: 1;
}

.event-card p:last-child {
  color: #625768;
  font-size: .92rem;
}

@media (max-width: 1120px) {
  .event-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .brand-mark { width: 46px; height: 46px; }
  .event-grid { grid-template-columns: 1fr; }
  .event-card { min-height: auto; }
}


/* 2026 notice + vertical school layout update */
.brand-mark {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 15px 34px rgba(59, 24, 63, .22);
  transform: none;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-inner {
  grid-template-columns: 1fr;
  gap: 0;
  align-items: end;
}

.school-notice-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.school-notice-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255,250,241,.82);
  box-shadow: var(--shadow);
  padding: 24px 26px;
  overflow: hidden;
  position: relative;
}

.school-notice-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(120, 167, 184, .10);
}

.school-notice-card.highlight {
  background:
    radial-gradient(circle at 92% 10%, rgba(224,171,85,.16), transparent 9rem),
    linear-gradient(135deg, rgba(255,250,241,.96), rgba(255,241,230,.88));
}

.school-notice-head,
.school-notice-body {
  position: relative;
  z-index: 1;
}

.school-notice-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}

.school-notice-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.school-icon-image.large {
  width: 72px;
  height: 72px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.school-title-block h3 {
  margin-bottom: 8px;
  font-size: 1.42rem;
  color: var(--plum);
}

.school-site-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 1.05rem;
  border: 1px solid rgba(59,24,63,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--plum);
  font-size: .98rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(59, 24, 63, .10);
}

.school-site-link:hover {
  color: var(--plum);
  background: #fff8eb;
}

.school-notice-date {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  white-space: nowrap;
  padding: 0 1.18rem;
  border-radius: 999px;
  background: var(--plum);
  color: #fff;
  font-size: 1.18rem;
  font-weight: 950;
  letter-spacing: .02em;
  box-shadow: 0 14px 30px rgba(59, 24, 63, .18);
}

.notice-event-title {
  margin-bottom: 10px;
  color: var(--coral);
  font-size: 1.08rem;
  font-weight: 900;
}

.school-notice-body p:last-child {
  margin-bottom: 0;
  color: #625768;
}

@media (max-width: 860px) {
  .school-notice-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .school-notice-brand {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .brand-mark {
    width: 56px;
    height: 56px;
  }
  .school-notice-card {
    padding: 20px 18px;
    border-radius: 22px;
  }
  .school-notice-brand {
    gap: 14px;
  }
  .school-icon-image.large {
    width: 58px;
    height: 58px;
  }
  .school-title-block h3 {
    font-size: 1.18rem;
  }
  .school-site-link {
    min-height: 38px;
    padding: 0 .9rem;
    font-size: .9rem;
  }
  .school-notice-date {
    min-height: 42px;
    padding: 0 .9rem;
    font-size: 1rem;
  }
}


/* Place official site button next to school name */
.school-title-block {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.school-title-block h3 {
  margin-bottom: 0;
}

.school-site-link {
  min-height: 48px;
  padding: 0 1.18rem;
  font-size: 1rem;
  font-weight: 900;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 14px 30px rgba(59, 24, 63, .14);
}

@media (max-width: 640px) {
  .school-title-block {
    gap: 10px;
  }

  .school-title-block h3 {
    width: 100%;
  }

  .school-site-link {
    min-height: 42px;
    padding: 0 .9rem;
    font-size: .9rem;
  }
}
