/* ==========================================================
   Advalensa Inc. — corporate site
   ========================================================== */
:root {
  --bg: #f0f0f0;
  --surface: #fafafa;
  --white: #ffffff;
  --text: #213745;
  --text-2: #42525d;
  --muted: #8a949b;
  --line: rgba(33, 55, 69, 0.12);
  --line-strong: rgba(33, 55, 69, 0.3);
  --accent: #146393;
  --accent-2: #2d88b9;
  --navy: #041f30;
  --g1: #42a8f5; --g2: #5b5fe8; --g3: #9b5ed9; --g4: #e89bb3;
  --grad: linear-gradient(135deg, var(--g1) 0%, var(--g2) 55%, var(--g3) 80%, var(--g4) 100%);
  --grad-text: linear-gradient(90deg, var(--g1) 0%, var(--g2) 55%, var(--g3) 100%);
  --sans-en: "Manrope", "Noto Sans JP", sans-serif;
  --sans-jp: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --gutter: clamp(20px, 4vw, 64px);
  --max: 1360px;
  --radius: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans-jp);
  font-weight: 400;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
h1, h2, h3, h4 { font-weight: 500; word-break: auto-phrase; line-break: strict; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pc { display: inline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.en { font-family: var(--sans-en); }
.label { font-family: var(--sans-en); font-weight: 700; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin: 0; }
.card { background: var(--surface); border-radius: var(--radius); }

/* ---------- Buttons ---------- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--grad); color: #fff; text-decoration: none;
  font-family: var(--sans-en); font-weight: 700; font-size: 14px; letter-spacing: 0.02em;
  padding: 0 24px; height: 44px; border-radius: 999px; box-shadow: 0 6px 18px rgba(91, 95, 232, .22);
  transition: filter .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn-pill:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(91, 95, 232, .3); }
.btn-lg { height: 56px; padding: 0 8px 0 28px; font-size: 15px; font-family: var(--sans-jp); font-weight: 500; }
.circle-arrow {
  display: inline-block; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); position: relative; flex: none;
  transition: background .25s, transform .3s var(--ease);
}
.circle-arrow::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px;
  border-top: 2px solid #fff; border-right: 2px solid #fff; transform: translate(-60%, -50%) rotate(45deg);
}
.circle-arrow::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; background: #fff; transform: translate(-50%, -50%); }
.btn-lg .circle-arrow { background: #fff; width: 40px; height: 40px; }
.btn-lg .circle-arrow::before { border-color: var(--g2); }
.btn-lg .circle-arrow::after { background: var(--g2); }
.more { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; font-weight: 700; font-size: 15px; color: var(--accent); margin-top: 28px; }
.more:hover .circle-arrow { transform: translateX(4px); filter: brightness(1.08); }

/* ---------- Rings (fixed background motif) ---------- */
.rings { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; color: var(--accent); }
.rings svg { position: absolute; stroke-width: 1; opacity: 0; transition: opacity 1.6s ease .2s; }
.rings.is-enter svg { opacity: 1; }
.rings-a { width: min(96vmax, 1500px); height: min(96vmax, 1500px); right: -34vmax; top: -22vmax; opacity: .3 !important; }
.rings-b { width: 60vmax; height: 60vmax; left: -36vmax; bottom: -32vmax; opacity: .2 !important; }
.rings.is-enter .rings-a { opacity: .3 !important; }
.rings.is-enter .rings-b { opacity: .2 !important; }
.rings:not(.is-enter) svg { opacity: 0 !important; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; color: var(--text); transition: background .35s, box-shadow .35s; }
.site-header.is-scrolled { background: rgba(240, 240, 240, .84); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; transition: height .35s var(--ease); }
.site-header.is-scrolled .header-inner { height: 68px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--accent); }
.logo-mark { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 2px 8px rgba(91, 95, 232, .25); }
.logo-type { font-family: var(--sans-en); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1; color: var(--accent); }
.nav { display: flex; gap: 32px; align-items: center; }
.nav a:not(.btn-pill) { text-decoration: none; font-family: var(--sans-en); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; position: relative; padding: 4px 0; color: var(--text); }
.nav a:not(.btn-pill)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav a:not(.btn-pill):hover::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; background: none; border: 0; color: inherit; width: 44px; height: 44px; padding: 0; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: currentColor; margin: 6px auto; transition: transform .3s; }
.menu-open .site-header { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
main { position: relative; z-index: 1; }
.hero { padding: clamp(150px, 20vh, 220px) 0 clamp(48px, 6vw, 72px); position: relative; }
.hero::before {
  content: ""; position: absolute; left: calc(var(--gutter) - 6vw); top: 18%; width: min(62vw, 760px); height: min(46vw, 520px);
  pointer-events: none; z-index: -1; opacity: .5; filter: blur(70px); border-radius: 50%;
  background:
    radial-gradient(45% 45% at 25% 40%, var(--g1), transparent 70%),
    radial-gradient(40% 40% at 60% 55%, var(--g2), transparent 70%),
    radial-gradient(35% 35% at 85% 75%, var(--g4), transparent 70%);
  animation: glow 1.8s .3s both;
}
@keyframes glow { from { opacity: 0; } to { opacity: .5; } }
.hero-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; font-family: var(--sans-en); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); animation: fadeup 1s .1s var(--ease) both; }
.hero-kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(91, 95, 232, .15); }
.hero-title { margin: 0; font-size: clamp(42px, 7.4vw, 108px); line-height: 1.22; letter-spacing: 0.02em; font-weight: 700; }
.hero-title .l { display: block; overflow: hidden; }
.hero-title .l::after { content: none; }
.hero-title .l { animation: none; }
.hero-title .l { opacity: 0; transform: translateY(40px); animation: fadeup 1.1s var(--ease) both; }
.hero-title .l:nth-child(1) { animation-delay: .2s; }
.hero-title .l:nth-child(2) { animation-delay: .32s; }
.hero-en { margin: 22px 0 0; font-family: var(--sans-en); font-weight: 600; font-size: clamp(15px, 1.5vw, 20px); letter-spacing: 0.02em; color: var(--g2); background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; width: fit-content; animation: fadeup 1s .5s var(--ease) both; }
.hero-lead { margin: clamp(32px, 4vw, 48px) 0 0; max-width: 44em; color: var(--text-2); font-size: clamp(15px, 1.2vw, 16.5px); line-height: 2; animation: fadeup 1s .65s var(--ease) both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* ---------- About ---------- */
.about { padding-top: 0; }
.about-card { opacity: 0; transform: translateY(30px); animation: fadeup 1.2s .8s var(--ease) both; }
.about-card { padding: clamp(40px, 6vw, 88px) clamp(28px, 6vw, 88px); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-head .label { margin-bottom: 18px; }
.statement { margin: 0; font-size: clamp(26px, 3vw, 42px); line-height: 1.55; letter-spacing: 0.04em; font-weight: 700; }
.scroll-text p { margin: 0 0 1.4em; font-size: clamp(15px, 1.25vw, 17px); line-height: 2.1; }
.scroll-text .ch { color: rgba(33, 55, 69, .22); transition: color .5s ease; }
.scroll-text .ch.is-on { color: var(--text); }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 10vw, 150px) 0; }
.sec-num { display: flex; align-items: center; gap: 18px; font-family: var(--sans-en); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; color: var(--accent); }
.sec-num .rule { display: block; flex: 1; height: 2px; border-radius: 2px; background: var(--grad-text); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .2s; opacity: .8; }
.sec-num.is-in .rule { transform: scaleX(1); }
.sec-title { margin: clamp(28px, 4vw, 44px) 0 0; display: flex; flex-direction: column; gap: 10px; }
.sec-title .en { font-family: var(--sans-en); font-weight: 700; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.sec-title .ja { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.25; letter-spacing: 0.04em; font-weight: 700; color: var(--text); }
.sec-lead { margin: 20px 0 clamp(36px, 4vw, 56px); max-width: 40em; color: var(--text-2); }
.sec-title + .card, .sec-title + .cards { margin-top: clamp(36px, 4vw, 56px); }

/* Gradient section (Fields) */
.section-deep { color: #fff; overflow: hidden; }
.section-deep .sec-num, .section-deep .sec-title .en { color: #fff; }
.section-deep .sec-num .rule { background: #fff; opacity: .5; }
.section-deep .sec-title .ja { color: #fff; }
.section-deep .sec-lead { color: rgba(255, 255, 255, .85); }
.deep-bg { position: absolute; inset: 0; z-index: 0; background: #4a9df0; overflow: hidden; }
.deep-bg i {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .95; will-change: transform;
  width: max(58vw, 620px); height: max(58vw, 620px);
  animation: blob 22s ease-in-out infinite alternate;
}
.deep-bg i:nth-child(1) { left: -18%; top: -12%; background: #4db0ff; animation-duration: 20s; }
.deep-bg i:nth-child(2) { left: 28%; top: -8%; background: #4b2fcf; animation-duration: 26s; animation-delay: -6s; }
.deep-bg i:nth-child(3) { left: 58%; top: -2%; background: #b48cf5; animation-duration: 24s; animation-delay: -12s; }
.deep-bg i:nth-child(4) { left: 52%; top: 42%; background: #e8b98c; animation-duration: 28s; animation-delay: -3s; }
.deep-bg i:nth-child(5) { left: 8%; top: 52%; background: #c04ad6; animation-duration: 23s; animation-delay: -9s; }
.deep-bg i:nth-child(6) { left: 30%; top: 82%; background: #6a7dff; animation-duration: 25s; animation-delay: -15s; }
@keyframes blob {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(10%, -8%) scale(1.15); }
  100% { transform: translate(-8%, 10%) scale(.95); }
}
.section-deep .wrap { position: relative; z-index: 1; }

/* Field cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-card {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start;
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 3.5vw, 44px); color: var(--text);
  box-shadow: 0 10px 40px rgba(4, 31, 48, .10);
  transition: transform .45s var(--ease), box-shadow .45s;
}
.field-card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(4, 31, 48, .16); }
.field-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent); font-family: var(--sans-en); font-weight: 800; font-size: 15px; line-height: 1;
}
.field-card h3 { margin: 2px 0 10px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 700; letter-spacing: 0.04em; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.field-card h3 .en { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.field-card p { margin: 0; color: var(--text-2); font-size: 15px; }

/* Company */
#company .card { padding: clamp(24px, 4vw, 56px) clamp(24px, 5vw, 72px); }
.company-table { width: 100%; border-collapse: collapse; }
.company-table th, .company-table td { text-align: left; vertical-align: top; padding: 22px 0; border-bottom: 1px solid var(--line); }
.company-table tr:last-child th, .company-table tr:last-child td { border-bottom: 0; }
.company-table th { width: 200px; font-weight: 700; color: var(--accent); font-size: 13px; letter-spacing: 0.1em; padding-right: 24px; }
.company-table td { font-size: 15.5px; }
.company-table td .sub { color: var(--muted); font-family: var(--sans-en); font-size: 14px; }
.company-table a { text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: border-color .2s, color .2s; }
.company-table a:hover { color: var(--accent); border-color: var(--accent); }

/* Contact */
.contact-card { padding: clamp(40px, 6vw, 88px) clamp(28px, 6vw, 88px); display: flex; flex-direction: column; align-items: flex-start; gap: 30px; }
.contact-card p { margin: 0; color: var(--text-2); max-width: 32em; }
.contact-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 26px; border-radius: 999px;
  background: transparent; border: 1.5px solid var(--line-strong); color: var(--text); cursor: pointer;
  font-family: var(--sans-jp); font-size: 15px; font-weight: 500; letter-spacing: 0.02em;
  transition: border-color .25s, color .25s, background .25s;
}
.btn-ghost svg { width: 18px; height: 18px; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.is-done { border-color: var(--accent); background: var(--accent); color: #fff; }
.copy-status { font-size: 13px; color: var(--accent); font-weight: 500; opacity: 0; transition: opacity .3s; }
.copy-status.is-show { opacity: 1; }
.contact-note { font-size: 13px; color: var(--muted) !important; }
.big-mail { display: block; text-decoration: none; color: var(--text); font-family: var(--sans-en); font-weight: 800; font-size: clamp(26px, 5.2vw, 76px); letter-spacing: -0.03em; line-height: 1.05; transition: color .2s; word-break: break-all; }
.big-mail:hover { color: var(--accent); }
.big-mail .at { color: var(--accent); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; background: var(--navy); color: #fff; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 48px 80px; padding: clamp(56px, 7vw, 96px) var(--gutter) 40px; }
.footer-brand .logo, .footer-brand .logo-type { color: #fff; }
.footer-brand p { margin: 20px 0 0; font-size: 14px; line-height: 1.8; }
.footer-brand p span { color: rgba(255, 255, 255, .55); font-size: 13px; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 22px 48px; }
.footer-nav a { text-decoration: none; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid rgba(255, 255, 255, .18); padding-bottom: 14px; }
.footer-nav .ja { font-size: 15px; font-weight: 500; }
.footer-nav .en { font-family: var(--sans-en); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, .5); order: -1; }
.footer-nav a:hover .ja { color: #7fb8ff; }
.footer-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }
.sec-num.reveal { transform: none; }

/* ---------- Legal page ---------- */
.legal-hero { padding: 170px 0 48px; }
.legal-hero h1 { margin: 0; font-size: clamp(30px, 4.5vw, 52px); letter-spacing: 0.04em; line-height: 1.3; font-weight: 700; }
.legal-hero p { margin: 10px 0 0; color: var(--accent); font-family: var(--sans-en); font-weight: 700; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.legal-wrap { padding: 0 var(--gutter); }
.legal-body { max-width: 860px; margin: 0 auto 140px; padding: clamp(32px, 5vw, 72px); background: var(--surface); border-radius: var(--radius); position: relative; z-index: 1; }
.legal-body h2 { font-size: 17px; margin: 48px 0 10px; letter-spacing: 0.04em; font-weight: 700; color: var(--accent); }
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--text-2); font-size: 15px; }
.legal-body a { color: var(--text); }
.legal-body .meta { margin-top: 56px; color: var(--muted); font-size: 14px; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .pc { display: none; }
}
@media (max-width: 760px) {
  .nav { position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center; gap: 26px; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .nav a:not(.btn-pill) { font-size: 22px; }
  .menu-open .nav { opacity: 1; pointer-events: auto; }
  .menu-btn { display: block; position: relative; z-index: 2; }
  .hero { padding-top: 120px; min-height: 0; }
  .about-card, .contact-card { padding: 32px 22px; }
  .btn-lg, .btn-ghost { height: 50px; }
  .field-card { gap: 16px; padding: 26px 20px; }
  .company-table th, .company-table td { display: block; width: 100%; }
  .company-table th { padding: 16px 0 0; border-bottom: 0; }
  .company-table td { padding: 2px 0 16px; }
  .rings-a { right: -60vmax; top: -30vmax; }
  .hero::before { left: -20vw; width: 120vw; height: 70vw; top: 10%; }
  .deep-bg i { filter: blur(60px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-title .l, .hero-kicker, .hero-en, .hero-lead { opacity: 1; transform: none; }
  .hero::before { opacity: .5; }
  .sec-num .rule { transform: none; }
  .scroll-text .ch { color: var(--text); }
}
