/* =====================================================================
 * Shining Revo Corporate Site — Common Stylesheet
 * Design system: site-design-jp (デジタル庁 + 東京都GL + Remedia 統合)
 * Brand: 黄 #F8D90B × 紫 #8E048B / Noto Sans+Serif JP / Bodoni Moda
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. Design Tokens (CSS Custom Properties)
 * ------------------------------------------------------------------ */
:root {
  /* Brand colors */
  --brand-yellow: #F8D90B;
  --brand-yellow-light: #FFE94A;
  --brand-yellow-soft: #FFF7C2;
  --brand-purple: #8E048B;
  --brand-purple-light: #B53AB1;
  --brand-purple-deep: #5E0258;
  --brand-purple-ink: #2A0027;
  --brand-purple-soft: #F6E3F5;

  /* Semantic colors */
  --color-text: #1A1A1A;
  --color-text-muted: #595959;
  --color-text-inverse: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-alt: #FFFCEE;
  --color-bg-dark: var(--brand-purple-ink);
  --color-border: #E5E5E5;
  --color-border-strong: #BDBDBD;
  --color-link: var(--brand-purple);
  --color-link-visited: var(--brand-purple-deep);
  --color-success: #007E3A;
  --color-error: #CE0808;
  --color-warning: #B85C00;
  --color-info: #1F4DBE;

  /* Typography */
  --font-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "Yu Mincho", serif;
  --font-display: "Bodoni Moda", "Playfair Display", Georgia, serif;
  --font-mono: "Noto Sans Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Spacing (8px base scale) */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --s-7: 96px;
  --s-8: 140px;

  /* Layout */
  --container-max: 1180px;
  --container-narrow: 980px;
  --container-narrower: 720px;
  --container-pad: 32px;

  /* Radius & Shadow */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.12);

  /* Misc */
  --header-h: 72px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
  :root {
    --container-pad: 18px;
    --header-h: 60px;
  }
}
@media (max-width: 480px) {
  :root { --container-pad: 16px; }
}

/* ---------------------------------------------------------------------
 * 2. Reset & Base
 * ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-purple-light); }
a:visited { color: var(--color-link-visited); }
button { font-family: inherit; }
p { margin: 0 0 1em; }

/* Focus ring — DO NOT REMOVE (WCAG 2.4.7) */
:focus-visible {
  outline: 2px solid var(--brand-purple-light);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip to content (a11y) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand-purple-ink);
  color: var(--color-text-inverse);
  padding: var(--s-1) var(--s-2);
  z-index: 9999;
  transition: top 200ms;
}
.skip-link:focus { top: 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------
 * 3. Typography utilities
 * ------------------------------------------------------------------ */
.display { font-family: var(--font-display); font-style: italic; font-weight: 700; line-height: 1.05; letter-spacing: 0.01em; }
.serif { font-family: var(--font-serif); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-purple);
  margin-bottom: var(--s-2);
}
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin: 0 0 var(--s-3);
}
h1 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; }
h2 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; }
h3 { font-size: clamp(18px, 1.8vw, 22px); font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }

/* ---------------------------------------------------------------------
 * 4. Layout helpers
 * ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
.container-narrow { max-width: var(--container-narrow); }
.container-narrower { max-width: var(--container-narrower); }
.section { padding: var(--s-8) 0; }
@media (max-width: 768px) { .section { padding: var(--s-6) 0; } }

.section-head { text-align: center; margin-bottom: var(--s-6); }
.section-head .lead { font-size: 17px; color: var(--color-text-muted); margin-top: var(--s-2); }

/* Grid */
.grid { display: grid; gap: var(--s-3); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
 * 5. Buttons
 * ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 48px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--brand-purple-light); outline-offset: 3px; }
.btn-primary {
  background: var(--brand-purple);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--brand-purple-light);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-primary:visited { color: var(--color-text-inverse); }
.btn-yellow {
  background: var(--brand-yellow);
  color: var(--brand-purple-ink);
}
.btn-yellow:hover {
  background: var(--brand-yellow-light);
  color: var(--brand-purple-ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-yellow:visited { color: var(--brand-purple-ink); }
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-ghost:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-color: var(--color-text);
}
.btn-ghost:visited { color: var(--color-text); }
.btn-on-dark {
  background: var(--brand-yellow);
  color: var(--brand-purple-ink);
}
.btn-on-dark:visited { color: var(--brand-purple-ink); }
.btn-sm { min-height: 40px; padding: 8px 20px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 18px 36px; font-size: 16px; }

/* ---------------------------------------------------------------------
 * 6. Header (global)
 * ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  text-decoration: none;
  color: var(--color-text);
}
.site-header__logo img { height: 38px; width: auto; }
.site-nav { display: flex; align-items: center; gap: var(--s-4); }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav__link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
  padding: 6px 0;
  position: relative;
}
.site-nav__link[aria-current="page"]::after,
.site-nav__link:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brand-purple);
}
.site-nav__cta { margin-left: var(--s-2); }

.site-nav__toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 10px;
  cursor: pointer;
  color: var(--color-text);
}
.site-nav__toggle svg { width: 28px; height: 28px; }

@media (max-width: 960px) {
  .site-nav__toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    padding: var(--s-4);
    gap: var(--s-3);
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }
  .site-nav[data-open="true"] { transform: translateX(0); }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__link {
    display: block;
    padding: var(--s-2) 0;
    font-size: 16px;
    border-bottom: 1px solid var(--color-border);
  }
  .site-nav__cta { margin: var(--s-3) 0 0; align-self: stretch; }
  .site-nav__cta .btn { width: 100%; }
}

/* ---------------------------------------------------------------------
 * 7. Footer (global)
 * ------------------------------------------------------------------ */
.site-footer {
  background: var(--brand-purple-ink);
  color: var(--color-text-inverse);
  padding: var(--s-7) 0 var(--s-4);
}
.site-footer a { color: var(--color-text-inverse); text-decoration: none; }
.site-footer a:hover { color: var(--brand-yellow); text-decoration: underline; text-decoration-thickness: 1px; }
.site-footer a:visited { color: var(--color-text-inverse); }
.site-footer__top {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--s-4);
  align-items: start;
}
@media (max-width: 900px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-footer__top { grid-template-columns: 1fr; }
}
.site-footer__brand img { height: 44px; margin-bottom: var(--s-2); filter: brightness(0) invert(1); }
.site-footer__brand p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.site-footer__col h4 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-yellow);
  margin: 0 0 var(--s-2);
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col li { margin-bottom: 8px; font-size: 14.5px; }
.site-footer__bottom {
  margin-top: var(--s-6);
  padding-top: var(--s-3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------------------------------------------------------------------
 * 8. Cards / List items
 * ------------------------------------------------------------------ */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--s-4);
  transition: all var(--transition);
}
.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card--link:visited { color: inherit; }
.card--link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-purple-light);
}
.card__eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--brand-purple);
  text-transform: uppercase;
  margin-bottom: var(--s-1);
}
.card__title { font-size: 18px; font-weight: 700; margin: 0 0 var(--s-1); color: var(--color-text); }
.card__text { font-size: 14.5px; color: var(--color-text-muted); margin: 0; }

/* ---------------------------------------------------------------------
 * 9. Page hero (shared)
 * ------------------------------------------------------------------ */
/* ---------------------------------------------------------------------
 * News cards (shared: TOP latest + /news/ list) + article detail
 * ------------------------------------------------------------------ */
.news-card {
  background: var(--color-bg);
  border: 1px solid rgba(248, 217, 11, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); color: inherit; }
.news-card:visited { color: inherit; }
.news-card__thumb {
  position: relative;
  height: 150px;
  overflow: hidden;
  background-image:
    linear-gradient(150deg, rgba(248,217,11,0.10), rgba(142,4,139,0.18)),
    url("../images/hero/main-visual.jpg");
  background-size: cover, 220% auto;
  background-repeat: no-repeat, no-repeat;
  background-position: center, 50% 55%;
}
.news-card__thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-card:nth-child(3n+1) .news-card__thumb { background-position: center, 10% 40%; }
.news-card:nth-child(3n+2) .news-card__thumb { background-position: center, 50% 55%; }
.news-card:nth-child(3n+3) .news-card__thumb { background-position: center, 90% 35%; }
.news-card__body { padding: var(--s-3); }
.news-card__meta { display: flex; align-items: center; gap: var(--s-1); margin-bottom: var(--s-1); }
.news-card__date { font-family: var(--font-mono); font-size: 12.5px; color: var(--color-text-muted); }
.news-card__tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--brand-purple-soft);
  color: var(--brand-purple-deep);
  border-radius: var(--radius-pill);
}
.news-card__tag.is-seminar { background: var(--brand-yellow-soft); color: var(--brand-purple-ink); }
.news-card__tag.is-service { background: #E0F4E9; color: var(--color-success); }
.news-card__title { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.6; color: var(--color-text); }

/* TOP "latest news" — constrained card width so a single item isn't oversized */
[data-news-latest] {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(260px, 360px));
}

/* Empty / loading state for dynamic news */
.news-empty { grid-column: 1 / -1; color: var(--color-text-muted); padding: var(--s-4) 0; }

/* Article detail */
.news-article__hero {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--s-4);
}
.news-article__body img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: var(--s-3) 0; }
.news-article__meta { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.news-article__date { font-family: var(--font-mono); font-size: 14px; color: var(--color-text-muted); }
.news-article__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.5;
  margin: 0 0 var(--s-4);
}
.news-article__body { font-size: 16px; line-height: 2; color: var(--color-text); }
.news-article__body h2 { font-family: var(--font-serif); font-size: 20px; margin: var(--s-4) 0 var(--s-2); }
.news-article__body p { margin: 0 0 var(--s-3); }
.news-article__body a { font-weight: 700; }
.news-article__back {
  display: inline-block;
  margin-top: var(--s-5);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-purple);
  text-decoration: none;
}
.news-article__back:hover { color: var(--brand-purple-light); }

.page-hero {
  padding: calc(var(--s-7) + var(--s-2)) 0 var(--s-7);
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.page-hero__big {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(80px, 14vw, 180px);
  line-height: 1;
  color: var(--brand-purple-soft);
  opacity: 0.7;
  position: absolute;
  right: var(--container-pad);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.page-hero__inner { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.2vw, 48px);
  margin-bottom: var(--s-2);
}
.page-hero .lead { font-size: 17px; color: var(--color-text-muted); max-width: 640px; margin: 0; }
.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: var(--s-3);
}
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-purple); text-decoration: underline; }
.breadcrumb span[aria-current="page"] { color: var(--color-text); }

/* ---------------------------------------------------------------------
 * 10. Final CTA section (shared)
 * ------------------------------------------------------------------ */
.cta-strip {
  background: linear-gradient(135deg, var(--brand-purple-deep) 0%, var(--brand-purple) 100%);
  color: var(--color-text-inverse);
  padding: var(--s-7) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(248, 217, 11, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(248, 217, 11, 0.08) 0%, transparent 40%);
  pointer-events: none;
}
.cta-strip__inner { position: relative; z-index: 1; }
.cta-strip h2 {
  color: var(--color-text-inverse);
  font-family: var(--font-serif);
  margin-bottom: var(--s-2);
}
.cta-strip p { color: rgba(255, 255, 255, 0.85); margin-bottom: var(--s-4); }
.cta-strip__buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: center;
}

/* ---------------------------------------------------------------------
 * 11. Forms
 * ------------------------------------------------------------------ */
.form-field { margin-bottom: var(--s-3); }
.form-field label {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: var(--s-1);
  color: var(--color-text);
}
.form-field .required {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--color-error);
  color: var(--color-text-inverse);
  border-radius: var(--radius-sm);
  vertical-align: middle;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--brand-purple-light);
  outline-offset: 1px;
  border-color: var(--brand-purple);
}
.form-help { font-size: 13px; color: var(--color-text-muted); margin-top: 6px; }
.form-error { font-size: 13px; color: var(--color-error); margin-top: 6px; font-weight: 700; }

/* ---------------------------------------------------------------------
 * 12. Utility
 * ------------------------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mt-1 { margin-top: var(--s-1) !important; }
.mt-2 { margin-top: var(--s-2) !important; }
.mt-3 { margin-top: var(--s-3) !important; }
.mt-4 { margin-top: var(--s-4) !important; }
.mt-5 { margin-top: var(--s-5) !important; }
.mb-0 { margin-bottom: 0 !important; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* List inline (for tags) */
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--brand-purple-soft);
  color: var(--brand-purple-deep);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
