/* ===== CSS Variables ===== */
:root {
  --bg: #f7fafc;
  --ink: #111827;
  --muted: #4b5563;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --card: #ffffff;
  --border: #e5e7eb;
}

/* ===== Base (bright + advanced) ===== */
html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}

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

/* ===== Brand (intelligent & creative) ===== */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-text {
  font-size: 24px;
  letter-spacing: .4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .18), rgba(6, 182, 212, .12));
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .15) inset, 0 3px 10px rgba(2, 6, 23, .06);
}

.brand-mark .orb {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, .3));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35) inset, 0 0 10px rgba(37, 99, 235, .65);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.brand-mark {
  --d: 7s;
}

.brand-mark .orb {
  transform-origin: 9px 9px;
  animation: orbit var(--d) linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark .orb {
    animation: none;
  }
}

/* ===== Header: always visible ===== */
header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease;
}

header.elevated {
  box-shadow: 0 10px 24px rgba(2, 6, 23, .08);
}

header .container,
footer .container,
main .container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* ===== Navigation ===== */
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

nav a {
  color: #0b1e3a;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s;
}

nav a:hover::after,
nav a.active::after {
  transform: scaleX(1);
}

/* ===== Hero ===== */
.hero {
  background: radial-gradient(900px 380px at 10% -40%, rgba(37, 99, 235, .18), transparent), 
              linear-gradient(180deg, #eef5ff, #ffffff);
  padding: 72px 0;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.25;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 16px;
  color: #374151;
  margin: 0;
}

.highlight {
  background: #fffdf3;
  padding: 15px;
  border-left: 5px solid #f59e0b;
  border-radius: 6px;
  margin-top: 20px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, .06);
}

/* ===== Sections ===== */
h2 {
  color: #0b1e3a;
  margin-bottom: 10px;
  position: relative;
  letter-spacing: .2px;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 2px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ===== Cards ===== */
.card {
  background: var(--card);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(2, 6, 23, .06);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: .95;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(2, 6, 23, .32);
}

/* ===== Timeline ===== */
.timeline {
  display: grid;
  gap: 12px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step .dot {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(2, 6, 23, .15);
}

/* ===== Progress bar (JS injects element) ===== */
#scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 6px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  z-index: 1000;
}

/* ===== Reveal animation (used by JS) ===== */
.reveal {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

.reveal.reveal-in {
  opacity: 1;
  transform: none;
}

/* ===== Lists ===== */
ul {
  padding-left: 1.2rem;
}

ul li {
  margin: 6px 0;
  list-style: none;
  position: relative;
  padding-left: 18px;
}

ul li:before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 2px #ffffff inset, 0 2px 6px rgba(2, 6, 23, .12);
}

/* ===== Footer ===== */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  color: #0b1e3a;
}

footer a {
  color: var(--brand);
}

/* ===== Utilities ===== */
body > p:empty,
body > p {
  display: none;
}

/* ===== Nav Link Styles ===== */
.nav-link {
  position: relative;
  padding: 8px 12px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  background: linear-gradient(90deg, #00b4d8, #0077b6);
  border-radius: 30px;
  transition: background 0.4s ease, transform 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover {
  background: linear-gradient(90deg, #90e0ef, #00b4d8);
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 80%;
  left: 10%;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    padding: 56px 0;
  }
  
  .hero h1 {
    font-size: 28px;
  }
}