/* ===========================================================
   NexusLiberty - Corporate Site
   Author: YUTA
   Note: ロゴ受領後 :root の --color-accent 系を更新してください
   =========================================================== */

/* -----------------------------------------------------------
   1. Tokens (CSS Variables)
----------------------------------------------------------- */
:root {
  /* Colors - ロゴ受領後に最終調整 */
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-surface-2: #1a1a1a;
  --color-text: #f5f5f0;
  --color-text-soft: #b8b8b0;
  --color-muted: #8a8a85;        /* WCAG AA 確保のため #6e6e68 から引き上げ（5.71:1） */
  --color-accent: #c9a961;        /* メインアクセント（ロゴから抽出） */
  --color-accent-soft: #8a7544;
  --color-line: #2a2a2a;

  /* Typography */
  --font-en: "Cormorant Garamond", "Times New Roman", serif;
  --font-ja-serif: "Noto Serif JP", "Yu Mincho", serif;
  --font-ja-sans: "Noto Sans JP", "Yu Gothic", sans-serif;

  /* Layout */
  --container: 1200px;
  --container-narrow: 760px;
  --space-section: clamp(80px, 12vw, 160px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -----------------------------------------------------------
   2. Base
----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ja-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: opacity .3s var(--ease), color .3s var(--ease); }
a:hover { opacity: .7; }
ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

/* Focus state (キーボード操作時のみアウトラインを出す) */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 1px;
}
.btn-submit:focus-visible { outline-offset: 4px; }
.form-row input:focus-visible,
.form-row select:focus-visible,
.form-row textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--color-accent);
  box-shadow: 0 1px 0 0 var(--color-accent);
}

/* -----------------------------------------------------------
   3. Layout helpers
----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding: var(--space-section) 0;
  position: relative;
}

.section-head {
  margin-bottom: clamp(48px, 6vw, 80px);
  text-align: center;
}

.section-num {
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--color-accent);
  margin: 0 0 12px;
  font-weight: 400;
}

.section-title { margin: 0; line-height: 1.2; }
.section-title .en {
  display: block;
  font-family: var(--font-en);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 84px);
  letter-spacing: 0.02em;
  font-style: italic;
}
.section-title .ja {
  display: block;
  font-family: var(--font-ja-serif);
  font-size: 14px;
  letter-spacing: 0.6em;
  color: var(--color-text-soft);
  margin-top: 8px;
  padding-left: 0.6em;
}

/* -----------------------------------------------------------
   4. Header
----------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 0;
  transition: background .4s var(--ease), padding .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 0;
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}
.brand-mark {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}
.brand-name {
  font-family: var(--font-en);
  font-size: 16px;
  letter-spacing: 0.18em;
  font-weight: 400;
}

.nav-list {
  display: flex;
  gap: 36px;
}
.nav-list a {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.24em;
  position: relative;
  padding: 6px 0;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width .4s var(--ease), left .4s var(--ease);
}
.nav-list a:hover { opacity: 1; }
.nav-list a:hover::after { width: 100%; left: 0; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 8px; right: 8px;
  height: 1px;
  background: var(--color-text);
  transition: transform .4s var(--ease), opacity .3s, top .4s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle.is-open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* -----------------------------------------------------------
   5. Hero
----------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 32px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(201, 169, 97, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(201, 169, 97, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 169, 97, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 97, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--color-accent);
  margin: 0 0 32px;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.3s forwards;
}

.hero-title {
  font-family: var(--font-en);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(56px, 11vw, 140px);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 36px;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line span,
.hero-title .line::before { display: block; }
.hero-title .line:nth-child(1) { opacity: 0; animation: fadeUp 1.2s var(--ease) 0.5s forwards; }
.hero-title .line:nth-child(2) {
  opacity: 0;
  color: var(--color-accent);
  animation: fadeUp 1.2s var(--ease) 0.7s forwards;
  padding-left: 0.4em;
}

.hero-lead {
  font-family: var(--font-ja-serif);
  font-size: 15px;
  line-height: 2.2;
  letter-spacing: 0.18em;
  color: var(--color-text-soft);
  margin: 0;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.9s forwards;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: -40px;
  transform: translateX(-50%);
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--color-muted);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1.2s forwards;
}
.hero-scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, var(--color-accent), transparent);
  margin: 12px auto 0;
  animation: scrollLine 2s var(--ease) infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* -----------------------------------------------------------
   6. About
----------------------------------------------------------- */
.section--about {
  background: var(--color-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.about-text .lead {
  font-family: var(--font-ja-serif);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.9;
  letter-spacing: 0.06em;
  margin: 0 0 32px;
  color: var(--color-text);
}
.about-text p {
  margin: 0 0 24px;
  color: var(--color-text-soft);
  line-height: 2;
}
.about-text p:last-child { margin-bottom: 0; }

.about-figure {
  aspect-ratio: 4 / 5;
  position: relative;
}
.figure-frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(201, 169, 97, 0.06), transparent 60%),
    var(--color-surface);
  overflow: hidden;
}
.figure-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(201, 169, 97, 0.25);
}
.figure-label {
  font-family: var(--font-en);
  font-size: clamp(48px, 6vw, 80px);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--color-accent);
}
.figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.35) brightness(0.85) contrast(1.05);
}

/* -----------------------------------------------------------
   7. Service
----------------------------------------------------------- */
.section--service {
  background: var(--color-surface);
  position: relative;
}
.section--service::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 1px;
  height: 80px;
  background: var(--color-accent);
  transform: translate(-50%, -50%);
}

.service-list {
  max-width: 900px;
  margin: 0 auto;
}

.service-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--color-line);
  align-items: start;
}
.service-item:last-child { border-bottom: 1px solid var(--color-line); }

.service-num {
  font-family: var(--font-en);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  font-style: italic;
  color: var(--color-accent);
  line-height: 1;
}

.service-title { margin: 0 0 20px; }
.service-title .en {
  display: block;
  font-family: var(--font-en);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.service-title .ja {
  display: block;
  font-family: var(--font-ja-serif);
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--color-text-soft);
  margin-top: 8px;
}

.service-text {
  margin: 0;
  color: var(--color-text-soft);
  line-height: 2;
}

/* -----------------------------------------------------------
   8. Company
----------------------------------------------------------- */
.section--company { background: var(--color-bg); }

.company-table {
  max-width: 760px;
  margin: 0 auto;
}
.company-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px 8px;
  border-bottom: 1px solid var(--color-line);
}
.company-row:first-child { border-top: 1px solid var(--color-line); }
.company-row dt {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--color-accent);
  font-weight: 400;
  padding-top: 2px;
}
.company-row dd {
  margin: 0;
  font-family: var(--font-ja-serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--color-text);
}
.company-row dd a { color: var(--color-accent); border-bottom: 1px solid currentColor; }

/* -----------------------------------------------------------
   9. Contact
----------------------------------------------------------- */
.section--contact {
  background:
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
}

.contact-lead {
  text-align: center;
  font-family: var(--font-ja-serif);
  color: var(--color-text-soft);
  margin: 0 0 56px;
  line-height: 2.2;
  letter-spacing: 0.1em;
}

.contact-form { display: flex; flex-direction: column; gap: 32px; }

.form-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-row label {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--color-text-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}
.req {
  font-family: var(--font-ja-sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  background: rgba(201, 169, 97, 0.1);
  border: 1px solid var(--color-accent-soft);
  padding: 2px 8px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-line);
  padding: 14px 0;
  color: var(--color-text);
  font-family: var(--font-ja-sans);
  font-size: 15px;
  letter-spacing: 0.06em;
  transition: border-color .3s var(--ease);
  border-radius: 0;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-bottom-color: var(--color-accent);
}
.form-row textarea { resize: vertical; min-height: 140px; }
.form-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23c9a961' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 28px;
}

.form-row--privacy { flex-direction: row; align-items: center; }
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: var(--font-ja-sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
}
.checkbox input { width: 16px; height: 16px; accent-color: var(--color-accent); }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-submit { text-align: center; margin-top: 16px; }
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 240px;
  padding: 18px 40px;
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: color .4s var(--ease);
}
.btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
  z-index: -1;
}
.btn-submit:hover { color: var(--color-bg); }
.btn-submit:hover::before { transform: scaleX(1); transform-origin: left; }
.btn-submit > span { position: relative; z-index: 1; }

/* -----------------------------------------------------------
   10. Footer
----------------------------------------------------------- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-line);
  padding: 48px 0 32px;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}
.copyright {
  margin: 0;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--color-muted);
}

/* -----------------------------------------------------------
   11. Reveal animation (JSで .is-visible 付与)
----------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -----------------------------------------------------------
   12. Responsive
----------------------------------------------------------- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-figure { max-width: 480px; margin: 0 auto; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }

  .header-inner { padding: 0 24px; }
  .nav {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav-list {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }
  .nav-list a { font-size: 18px; letter-spacing: 0.3em; }

  .nav-toggle { display: block; z-index: 110; }

  .container { padding: 0 24px; }

  .service-item {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .service-num { font-size: 36px; }

  .company-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 20px 8px;
  }
  .company-row dt { font-size: 11px; }

  .btn-submit { width: 100%; min-width: 0; }
}

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