/* ============================================
   style.css — xphase Inc. 全ページ共通スタイル
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:     #2C2C2C;
  --accent-mid: #4A4A4A;
  --accent-pale:#F0F0F0;
  --ink:        #1A1A1A;
  --body:       #555555;
  --muted:      #AAAAAA;
  --rule:       #E8E8E8;
  --bg:         #FFFFFF;
  --bg-off:     #F7F7F7;
  --bg-dark:    #1A1A1A;
  --error:      #C0392B;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo svg { height: 52px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 48px;
  list-style: none;
  margin-left: auto;
  margin-right: 40px;
}

.nav-links a {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--body);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
  font-family: 'Inter', sans-serif;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--accent);
  padding: 13px 30px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-mid); }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  z-index: 200;
}
.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.hamburger span:nth-child(2) { width: 70%; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.98);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu ul { list-style: none; text-align: center; width: 100%; }
.mobile-menu ul li { border-bottom: 1px solid var(--rule); }
.mobile-menu ul li:first-child { border-top: 1px solid var(--rule); }
.mobile-menu ul a {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
  padding: 20px 48px;
  font-weight: 400;
  transition: background 0.2s;
}
.mobile-menu ul a:hover { background: var(--bg-off); }
.mobile-menu .m-cta {
  display: inline-block;
  margin-top: 36px;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--accent);
  padding: 14px 48px;
  text-decoration: none;
}

/* ── SECTION COMMON ── */
.section-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
}
.section-heading {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.container { max-width: 960px; margin: 0 auto; }

/* ── BUTTONS ── */
.btn-dark {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--accent);
  padding: 14px 36px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-dark:hover { background: var(--accent-mid); }

.btn-ghost {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 13px 36px;
  text-decoration: none;
  font-weight: 400;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-white {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: #fff;
  padding: 16px 48px;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.btn-white:hover { opacity: 0.85; }

/* ── FOOTER ── */
footer {
  background: #0f0f0f;
  padding: 36px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-logo svg { height: 22px; opacity: 0.3; filter: brightness(10); }
footer small {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em;
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
  footer { padding: 28px 24px; flex-direction: column; text-align: center; }
}

/* ── HERO ── */
.hero {
  padding: 110px 48px 80px;
  min-height: 55vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(to right, rgba(0,0,0,0.52) 50%, rgba(0,0,0,0.25) 100%),
    url('/img/mainvisual.jpg') center bottom/cover no-repeat;
}

.hero-label { color: #ffffff; text-shadow: 0 1px 8px rgba(0,0,0,0.9); }
.hero-label::before { background: #ffffff; }
.hero h1 { color: #ffffff !important; text-shadow: 0 2px 16px rgba(0,0,0,0.9); }
.hero h1 .thin { color: #ffffff !important; text-shadow: 0 2px 16px rgba(0,0,0,0.9); }
.hero-sub { color: #ffffff !important; text-shadow: 0 1px 8px rgba(0,0,0,0.9); }
.btn-ghost { color: #ffffff; border-color: rgba(255,255,255,0.6); }
.btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.15); }

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  font-weight: 500;
  margin-bottom: 28px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-label::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.hero h1 .thin {
  font-weight: 300;
}

.hero-sub {
  font-size: 0.95rem;
  max-width: 480px;
  line-height: 2;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── SERVICES ── */
.services {
  padding: 100px 48px;
  background: var(--bg);
}
.services-header {
  margin-bottom: 64px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.service-card {
  background: var(--bg-off);
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  transition: background 0.25s;
  position: relative;
  overflow: hidden;
}
.service-card:hover { background: var(--accent-pale); }
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 52px; height: 52px;
  margin-bottom: 28px;
  color: var(--accent);
  flex-shrink: 0;
}
.service-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.service-card-desc {
  font-size: 0.85rem;
  color: var(--body);
  line-height: 2;
  flex: 1;
}
.service-card-tags {
  display: flex;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.service-card-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 3px 10px;
  background: var(--bg);
}

/* ── WORKS ── */
.works {
  padding: 100px 48px;
  background: var(--bg-off);
}
.works-header {
  margin-bottom: 64px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2px;
}
.work-card {
  background: var(--bg);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s;
}
.work-card:hover { transform: translateY(-4px); }
.work-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--accent-pale);
  overflow: hidden;
}
.work-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.work-card:hover .work-thumb img { transform: scale(1.04); }
.work-thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-pale);
}
.work-info { padding: 24px 28px 32px; }
.work-name { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.work-url {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  margin-bottom: 16px;
}
.work-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.work-pill {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--rule);
  padding: 3px 10px;
}



/* ── ABOUT ── */
.about { padding: 100px 48px; background: var(--bg); }
.about-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
.about-lead { font-size: 1rem; color: var(--body); line-height: 2.1; max-width: 640px; margin-bottom: 18px; }

/* ── COMPANY ── */
.company { padding: 100px 48px; background: var(--bg-off); }
.company-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
.company-table { width: 100%; border-collapse: collapse; }
.company-table tr { border-bottom: 1px solid var(--rule); }
.company-table th {
  width: 200px; padding: 20px 0;
  font-size: 0.82rem; font-weight: 500;
  color: var(--muted); letter-spacing: 0.06em;
  text-align: left; vertical-align: top;
}
.company-table td { padding: 20px 0 20px 24px; font-size: 0.92rem; color: var(--body); line-height: 1.9; }
.company-table td a { color: var(--accent); text-decoration: none; }
.company-table td a:hover { text-decoration: underline; }

/* ── CONTACT SECTION (トップ) ── */
.contact { padding: 100px 48px; background: var(--bg-dark); text-align: center; }
.contact .section-eyebrow { color: rgba(255,255,255,0.3); }
.contact .section-heading { color: #fff; margin-bottom: 16px; }
.contact-sub { font-size: 0.9rem; color: rgba(255,255,255,0.45); margin-bottom: 48px; line-height: 2; }

/* ── RESPONSIVE (トップ固有) ── */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero { padding: 90px 24px 64px; min-height: auto; }
  .services, .works, .about, .company, .contact { padding: 72px 24px; }
  .works-grid { grid-template-columns: 1fr; }
  .company-table th { width: 110px; font-size: 0.78rem; }
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 120px 48px 64px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-off);
}
.page-header-inner { max-width: 760px; margin: 0 auto; }
.page-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
}
.page-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 16px;
}
.page-desc { font-size: 0.92rem; color: var(--body); line-height: 2; max-width: 520px; }

/* ── FORM SECTION ── */
.form-section { padding: 80px 48px 100px; }
.form-inner { max-width: 760px; margin: 0 auto; }

/* ── THANK YOU ── */
.thankyou { text-align: center; padding: 80px 24px; }
.thankyou-icon {
  width: 64px; height: 64px;
  background: var(--bg-off); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 32px;
}
.thankyou-icon svg { color: var(--accent); }
.thankyou h2 { font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-bottom: 16px; letter-spacing: -0.01em; }
.thankyou p { font-size: 0.92rem; color: var(--body); line-height: 2; margin-bottom: 8px; }
.thankyou-back {
  display: inline-block;
  margin-top: 40px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--accent);
  padding: 14px 40px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}
.thankyou-back:hover { background: var(--accent-mid); }

/* ── FORM ── */
.form-note { font-size: 0.78rem; color: var(--muted); margin-bottom: 32px; line-height: 1.9; }
.form-group { margin-bottom: 36px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--ink); margin-bottom: 8px; letter-spacing: 0.04em; }
.form-label .required {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem; letter-spacing: 0.1em;
  color: var(--bg); background: var(--accent);
  padding: 2px 8px; margin-left: 8px; vertical-align: middle;
}
.form-label .optional {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem; letter-spacing: 0.1em;
  color: var(--muted); border: 1px solid var(--rule);
  padding: 2px 8px; margin-left: 8px; vertical-align: middle;
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.92rem;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-weight: 300;
  appearance: none;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44,44,44,0.06);
}
.form-input.has-error,
.form-textarea.has-error { border-color: var(--error); }
.form-textarea { height: 180px; resize: vertical; line-height: 1.8; }
.form-error { font-size: 0.78rem; color: var(--error); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.form-divider { height: 1px; background: var(--rule); margin: 48px 0; }
.form-submit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-submit {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem; letter-spacing: 0.08em;
  color: var(--bg); background: var(--accent);
  border: none; padding: 16px 56px;
  cursor: pointer; font-weight: 500; transition: background 0.2s;
}
.btn-submit:hover { background: var(--accent-mid); }
.submit-note { font-size: 0.78rem; color: var(--muted); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .page-header { padding: 100px 24px 48px; }
  .form-section { padding: 56px 24px 80px; }
}
