:root {
  --bg-deep: #dfe4ef;
  --bg: #e8ecf4;
  --bg-soft: #f3f5fa;
  --surface: rgba(255, 255, 255, 0.55);
  --text: #4a4a68;
  --text-strong: #2f2f48;
  --muted: #8e8ea9;
  --accent: #e8a0bf;
  --accent-deep: #d4889f;
  --line: rgba(74, 74, 104, 0.12);
  --shadow: 0 18px 50px rgba(74, 74, 104, 0.08);
  --font-display: "Fraunces", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --max: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(232, 160, 191, 0.28), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(184, 198, 230, 0.35), transparent 50%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 48%, var(--bg-deep) 100%);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(rgba(74, 74, 104, 0.045) 0.6px, transparent 0.7px);
  background-size: 3px 3px;
  z-index: 0;
  animation: grain-drift 18s linear infinite;
}

@keyframes grain-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-12px, 8px, 0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes soft-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

a { color: var(--accent-deep); }
a:hover { color: var(--text-strong); }

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  backdrop-filter: blur(14px);
  background: rgba(243, 245, 250, 0.72);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  color: var(--accent-deep);
  text-decoration: none;
  line-height: 1;
}

.brand span {
  display: inline-block;
  animation: soft-float 6s var(--ease) infinite;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

nav a:hover {
  color: var(--text-strong);
}

nav a:hover::after,
nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

nav a[aria-current="page"] {
  color: var(--text-strong);
}

/* ——— Landing ——— */

.page-home {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 7vw, 88px) clamp(24px, 5vw, 72px);
  animation: rise 0.9s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--accent-deep);
  margin: 0 0 22px;
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 500;
  color: var(--text-strong);
  letter-spacing: 0.01em;
}

.hero-lead {
  margin: 0 0 28px;
  max-width: 28em;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent-deep);
  color: #fff;
}

.btn-primary:hover {
  background: #c67890;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.hero-visual {
  position: relative;
  min-height: 420px;
  animation: rise 1.1s var(--ease) 0.12s both;
}

.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(232, 236, 244, 0.55) 0%, transparent 28%),
    linear-gradient(180deg, transparent 60%, rgba(223, 228, 239, 0.35) 100%);
  pointer-events: none;
}

.home-section {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px clamp(20px, 4vw, 48px) 72px;
  animation: rise 1s var(--ease) 0.2s both;
}

.home-section h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 550;
  color: var(--text-strong);
}

.home-section > p {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 36em;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
}

.legal-grid a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.legal-grid a:hover {
  color: var(--accent-deep);
  border-color: var(--accent);
}

/* ——— Document pages ——— */

.page-doc {
  position: relative;
  z-index: 1;
}

.page-doc main {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px clamp(20px, 4vw, 32px) 80px;
  animation: rise 0.7s var(--ease) both;
}

.page-doc .doc-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: clamp(24px, 4vw, 40px);
}

.page-doc h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 560;
  color: var(--text-strong);
  margin: 0 0 8px;
  line-height: 1.2;
}

.page-doc .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 28px;
}

.page-doc h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 8px;
  color: var(--accent-deep);
  letter-spacing: 0.01em;
}

.page-doc p,
.page-doc li {
  color: var(--text);
  font-size: 0.98rem;
}

.page-doc ul {
  padding-left: 1.2em;
  margin: 0 0 8px;
}

.page-doc .cta {
  display: inline-flex;
  align-items: center;
  margin: 8px 0 20px;
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.page-doc .cta:hover {
  background: #c67890;
  color: #fff;
  transform: translateY(-1px);
}

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  padding: 28px 20px 40px;
  font-size: 0.85rem;
}

.site-footer .brand-mini {
  font-family: var(--font-display);
  color: var(--accent-deep);
  font-size: 1rem;
  display: block;
  margin-bottom: 6px;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    order: -1;
    min-height: min(52vh, 420px);
  }

  .hero-visual::after {
    background:
      linear-gradient(180deg, transparent 45%, rgba(232, 236, 244, 0.85) 100%);
  }

  .hero-copy {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .hero-brand {
    font-size: clamp(3rem, 14vw, 4.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
