/* ==========================================================
   IAER — 合同会社アクチュアリー教育研究社 コーポレートサイト
   ========================================================== */

:root {
  --navy: #0b1f3a;
  --navy-2: #12305c;
  --ink: #1c2536;
  --muted: #5b6678;
  --line: #e3e8f0;
  --paper: #f5f7fa;
  --white: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1d4fc4;
  --gold: #d9a441;
  --gold-soft: #fdf6e8;
  --green: #0e8a6d;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(11, 31, 58, .06);
  --shadow-hover: 0 12px 28px rgba(11, 31, 58, .14);
  --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { opacity: .85; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--navy); }
.brand:hover { opacity: 1; }
.brand-logo {
  font-size: 24px; font-weight: 900; letter-spacing: .06em;
  color: var(--navy);
}
.brand-logo span { color: var(--gold); }
.brand-name { font-size: 11px; color: var(--muted); letter-spacing: .02em; }

.global-nav ul { display: flex; gap: 26px; list-style: none; }
.global-nav a {
  font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 6px 0;
}
.global-nav a:hover { color: var(--blue); opacity: 1; }

.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(37, 99, 235, .35), transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 90%, rgba(217, 164, 65, .18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  padding: 96px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 80%);
}
.hero .container { position: relative; }
.hero-tagline {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  color: var(--gold);
  border: 1px solid rgba(217, 164, 65, .5);
  border-radius: 999px;
  padding: 4px 16px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(28px, 4.6vw, 46px);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: .02em;
  margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p.lead {
  font-size: clamp(15px, 1.8vw, 17px);
  color: rgba(255, 255, 255, .85);
  max-width: 640px;
  margin-bottom: 36px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); opacity: 1; }
.btn-primary { background: var(--gold); color: var(--navy); box-shadow: 0 6px 18px rgba(217, 164, 65, .35); }
.btn-secondary { background: var(--white); color: var(--navy); }
.btn-outline { border: 1.5px solid rgba(255,255,255,.6); color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); box-shadow: 0 6px 18px rgba(37, 99, 235, .3); }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
section.alt { background: var(--paper); }

.section-head { text-align: center; margin-bottom: 52px; }
.section-head .en {
  display: block;
  font-size: 12px; font-weight: 700; letter-spacing: .22em;
  color: var(--gold); text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 900; color: var(--navy);
  letter-spacing: .03em;
}
.section-head p.desc {
  max-width: 680px; margin: 16px auto 0;
  color: var(--muted); font-size: 15px;
}

/* ---------- featured (library / KKT) ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.featured-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.featured-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.featured-card .badge {
  align-self: flex-start;
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 18px;
}
.badge-library { background: #e8eefc; color: var(--blue-dark); }
.badge-kkt { background: #e3f4ef; color: var(--green); }
.featured-card h3 {
  font-size: 23px; font-weight: 900; color: var(--navy);
  line-height: 1.4; margin-bottom: 6px;
}
.featured-card .sub { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.featured-card ul {
  list-style: none;
  margin-bottom: 26px;
  flex-grow: 1;
}
.featured-card li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  margin-bottom: 9px;
}
.featured-card li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  font-weight: 900; color: var(--gold);
}

/* ---------- product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.product-card .cat {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--gold); margin-bottom: 8px;
}
.product-card h3 {
  font-size: 17.5px; font-weight: 700; color: var(--navy);
  line-height: 1.5; margin-bottom: 10px;
}
.product-card p {
  font-size: 13.5px; color: var(--muted);
  margin-bottom: 18px; flex-grow: 1;
}
.product-card .link {
  font-size: 14px; font-weight: 700;
}
.product-card .link::after { content: " →"; }
.product-card .soon {
  font-size: 13px; font-weight: 700; color: var(--muted);
}

/* ---------- books ---------- */
.books-note {
  text-align: center;
  margin-bottom: 36px;
}
.books-note strong { color: var(--navy); font-size: 17px; }
.book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.book-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow);
}
.book-item .subject {
  font-size: 12px; font-weight: 700; color: var(--blue-dark);
  letter-spacing: .06em;
}
.book-item .title { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.book-item a { font-size: 13px; font-weight: 700; margin-top: 4px; }
.book-item a::after { content: " →"; }

/* ---------- youtube ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}
.video-item .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--shadow);
}
.video-item iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-item .caption {
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  margin-top: 10px;
}
.video-cta { text-align: center; }

/* ---------- akken ---------- */
.akken-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.akken-text h3 {
  font-size: 21px; font-weight: 900; color: var(--navy);
  margin-bottom: 16px; line-height: 1.5;
}
.akken-text p { font-size: 15px; color: var(--ink); margin-bottom: 16px; }
.akken-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .num {
  font-size: 26px; font-weight: 900; color: var(--navy);
  line-height: 1.3;
}
.stat .num small { font-size: 14px; font-weight: 700; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }

/* ---------- news ---------- */
.news-list {
  max-width: 760px; margin: 0 auto;
  list-style: none;
  border-top: 1px solid var(--line);
}
.news-list li {
  display: flex; gap: 24px; align-items: baseline;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.news-list time {
  flex-shrink: 0;
  font-weight: 700; color: var(--gold);
  font-size: 13.5px;
  min-width: 88px;
}

/* ---------- company ---------- */
.company-table {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.company-table th, .company-table td {
  padding: 16px 22px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.company-table tr:last-child th, .company-table tr:last-child td { border-bottom: 0; }
.company-table th {
  width: 30%;
  background: var(--paper);
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- contact ---------- */
.contact-box {
  max-width: 640px; margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 36px;
  text-align: center;
}
.contact-box p { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.contact-mail {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 28px;
  word-break: break-all;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .8);
  padding: 60px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.footer-brand .brand-logo { color: var(--white); font-size: 22px; }
.footer-brand p { font-size: 13px; margin-top: 12px; color: rgba(255,255,255,.6); }
.site-footer h4 {
  font-size: 13px; font-weight: 700; letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255, 255, 255, .85); font-size: 13.5px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding-top: 22px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, .5);
}

/* ---------- sub pages (errata etc.) ---------- */
.page-body { padding: 64px 0 96px; min-height: 55vh; }
.page-body h1 {
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 900; color: var(--navy);
  line-height: 1.5;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--gold);
}
.page-body p { margin-bottom: 20px; }
.page-body h2 {
  font-size: 19px; font-weight: 700; color: var(--navy);
  margin: 32px 0 12px;
}
.errata-list { list-style: none; margin: 20px 0; }
.errata-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 14.5px;
}
.errata-list a { font-weight: 700; }
.errata-list a::after { content: "（PDF）"; font-size: 12px; }
.back-home { margin-top: 40px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .akken-wrap { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
    background: none; border: 0;
    font-size: 26px; color: var(--navy);
    cursor: pointer;
    line-height: 1;
  }
  .global-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(11,31,58,.1);
  }
  .global-nav.open { display: block; }
  .global-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .global-nav li { border-top: 1px solid var(--line); }
  .global-nav a { display: block; padding: 14px 24px; }
  section { padding: 60px 0; }
  .hero { padding: 68px 0 60px; }
}
