/* =========================================================
   RE-MANs Corporate Site — Stylish Black & White Theme
   ========================================================= */

:root {
  --black: #0a0a0a;
  --black-soft: #141414;
  --white: #ffffff;
  --off-white: #f5f5f3;
  --gray-900: #1a1a1a;
  --gray-700: #4a4a4a;
  --gray-500: #8a8a8a;
  --gray-300: #d4d4d2;
  --gray-100: #ececea;
  --line: rgba(0, 0, 0, 0.12);
  --line-light: rgba(255, 255, 255, 0.16);

  --font-en: 'Inter', 'Noto Sans JP', sans-serif;
  --font-jp: 'Noto Sans JP', 'Inter', sans-serif;

  --container: 1160px;
  --header-h: 84px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-jp);
  background: var(--off-white);
  color: var(--black);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd, dt, table { margin: 0; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font: inherit; }

.only-pc { display: inline; }
@media (max-width: 640px) {
  .only-pc { display: none; }
}

/* ===== Loader ===== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
#page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-logo {
  width: 160px;
  max-width: 60vw;
  opacity: 0;
  animation: loaderFade 1.2s var(--ease) forwards;
}
@keyframes loaderFade {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== Reveal animation ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 500;
  background: rgba(245, 245, 243, 0.0);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease), height .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(245, 245, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  height: 68px;
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; }
.brand-logo {
  height: 40px;
  width: auto;
  transition: opacity .3s var(--ease);
}
.logo-light { display: none; }
.main-nav { display: none; }

@media (min-width: 900px) {
  .main-nav { display: block; }
  .nav-list {
    display: flex;
    align-items: center;
    gap: 36px;
  }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-en);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    position: relative;
    padding: 6px 0;
  }
  .nav-num {
    font-size: 0.68rem;
    color: var(--gray-500);
  }
  .nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 1px;
    background: var(--black);
    transition: width .35s var(--ease);
  }
  .nav-link:hover::after { width: 100%; }
}

.menu-toggle {
  width: 44px; height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 600;
}
@media (min-width: 900px) {
  .menu-toggle { display: none; }
}
.menu-toggle-bar {
  width: 24px; height: 1px;
  background: var(--black);
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-open .menu-toggle-bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Mobile Nav ===== */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 40px;
  transform: translateY(-100%);
  transition: transform .55s var(--ease);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav-list { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-link {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 1.7rem;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-light);
  letter-spacing: 0.02em;
}
.mobile-nav-foot {
  position: absolute;
  bottom: 32px; left: 40px;
  color: var(--gray-500);
  font-size: 0.8rem;
}
@media (min-width: 900px) {
  .mobile-nav { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 34px;
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 999px;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn i { font-size: 0.75rem; transition: transform .35s var(--ease); }
.btn:hover i { transform: translateX(4px); }

.btn-primary {
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
}
.btn-primary:hover { background: transparent; color: var(--black); }

.btn-outline {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--black);
}
.btn-outline:hover { background: var(--black); color: var(--white); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line-light);
  margin-top: 56px;
}
.btn-outline-light:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(100vh + 189px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--header-h) 32px 100px;
  overflow: hidden;
  background: var(--off-white);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-line {
  position: absolute;
  background: var(--line);
}
.hero-line-1 { top: 0; bottom: 0; left: 12%; width: 1px; }
.hero-line-2 { top: 0; bottom: 0; left: 50%; width: 1px; }
.hero-line-3 { top: 0; bottom: 0; left: 88%; width: 1px; }
.hero-noise {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(0,0,0,0.05), transparent 55%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--font-en);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  color: var(--gray-700);
  margin-bottom: 28px;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
}
.hero-title-line { display: block; }
.hero-title-accent {
  -webkit-text-stroke: 1.5px var(--black);
  color: transparent;
}
.hero-desc {
  margin: 36px auto 0;
  max-width: 560px;
  font-size: 1rem;
  color: var(--gray-700);
}
.hero-cta {
  margin-top: 48px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.hero-scroll-text {
  font-family: var(--font-en);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gray-500);
}
.hero-scroll-line {
  width: 1px; height: 40px;
  background: var(--gray-300);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--black);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ===== Section base ===== */
.section { padding: 140px 32px; position: relative; }
.section-inner { max-width: var(--container); margin: 0 auto; }

.section-tag {
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gray-700);
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}
.section-num {
  font-size: 0.75rem;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.section-tag-light { color: var(--gray-300); }
.section-tag-light .section-num { border-color: var(--line-light); }

.section-title {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.section-title-light { color: var(--white); }

.section-lead {
  font-size: 1rem;
  color: var(--gray-700);
  max-width: 640px;
}
.section-lead-light { color: var(--gray-300); }

/* ===== About ===== */
.about-section { background: var(--off-white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 80px; }
}
.about-lead-text {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.6;
}
.about-body p { color: var(--gray-700); margin-bottom: 18px; }
.about-body p:last-child { margin-bottom: 0; }

/* ===== Services ===== */
.services-section { background: var(--off-white); }
.service-list {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 860px) {
  .service-list { grid-template-columns: repeat(3, 1fr); }
}
.service-card {
  background: var(--off-white);
  padding: 48px 36px;
  position: relative;
  transition: background .4s var(--ease);
}
.service-card:hover { background: var(--white); }
.service-index {
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: var(--gray-500);
  letter-spacing: 0.1em;
}
.service-title { font-size: 1.15rem; font-weight: 700; margin: 22px 0 14px; }
.service-desc { color: var(--gray-700); font-size: 0.92rem; }

/* ===== Strengths (dark) ===== */
.strengths-section { background: var(--black); color: var(--white); }
.strength-list {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 780px) {
  .strength-list { grid-template-columns: 1fr 1fr; }
}
.strength-item {
  display: flex;
  gap: 24px;
  padding: 34px 0;
  border-top: 1px solid var(--line-light);
}
.strength-num {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--gray-500);
  flex-shrink: 0;
}
.strength-content h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.strength-content p { color: var(--gray-300); font-size: 0.92rem; }

/* ===== Company ===== */
.company-section { background: var(--off-white); }
.company-table {
  margin-top: 56px;
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--line);
}
.company-table tr { border-bottom: 1px solid var(--line); }
.company-table th, .company-table td {
  text-align: left;
  padding: 22px 16px;
  font-size: 0.95rem;
  vertical-align: top;
}
.company-table th {
  width: 160px;
  color: var(--gray-500);
  font-weight: 600;
}
@media (max-width: 640px) {
  .company-table th, .company-table td { display: block; padding: 6px 0; }
  .company-table tr { display: block; padding: 16px 0; }
}

/* ===== Contact ===== */
.contact-section { background: var(--off-white); }
.contact-form {
  margin-top: 56px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.form-row { display: flex; flex-direction: column; gap: 10px; }
.form-row-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
@media (min-width: 620px) {
  .form-row-split { grid-template-columns: 1fr 1fr; }
}
.form-row-split > div { display: flex; flex-direction: column; gap: 10px; }
.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.required {
  font-size: 0.68rem;
  color: var(--white);
  background: var(--black);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
  font-weight: 500;
}
.form-row input, .form-row textarea {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 14px 16px;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: border-color .3s var(--ease);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--black);
}
.form-submit { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.form-submit .btn { border: none; }
.form-status { font-size: 0.88rem; color: var(--gray-700); }
.form-status.is-success { color: #1a7a3c; }
.form-status.is-error { color: #b3261e; }

/* ===== Footer ===== */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 64px 32px 32px;
  border-top: 1px solid var(--line-light);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.footer-logo { height: 34px; width: auto; margin-bottom: 10px; }
.footer-brand p { color: var(--gray-500); font-size: 0.85rem; margin-top: 8px; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  font-size: 0.85rem;
  color: var(--gray-300);
}
.footer-nav a { transition: color .3s var(--ease); }
.footer-nav a:hover { color: var(--white); }
.footer-copy {
  font-size: 0.78rem;
  color: var(--gray-500);
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .35s var(--ease), visibility .35s var(--ease), transform .35s var(--ease), background .3s var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--gray-700); }

/* ===== Utility: header active state on dark sections ===== */
.site-header.is-on-dark:not(.is-scrolled) .nav-link,
.site-header.is-on-dark:not(.is-scrolled) .menu-toggle-bar {
  color: var(--white);
}
.site-header.is-on-dark:not(.is-scrolled) .menu-toggle-bar { background: var(--white); }
.site-header.is-on-dark:not(.is-scrolled) .nav-link::after { background: var(--white); }
.site-header.is-on-dark:not(.is-scrolled) .logo-dark { display: none; }
.site-header.is-on-dark:not(.is-scrolled) .logo-light { display: block; }
