/* ========================================
   Refine株式会社 — Corporate Website
   ======================================== */

:root {
  --navy: #1a2a3a;
  --navy-dark: #141f2b;
  --gold: #b0946a;
  --gold-hover: #9a8060;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-text: #333333;
  --gray-muted: #666666;
  --table-header: #4a4a4a;
  --font: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --max-width: 1140px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--gray-text);
  line-height: 1.8;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold-hover);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 4px;
}

.btn-gold:hover {
  background: var(--gold-hover);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-header {
  padding: 10px 24px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-hero {
  padding: 14px 36px;
  border-radius: 28px;
  font-size: 1rem;
  margin-top: 8px;
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(26, 42, 58, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.nav {
  flex: 1;
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: 36px;
  list-style: none;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 400;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  border-bottom-color: var(--gold);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lang-btn {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
  color: var(--white);
  background: var(--gold);
}

html[lang="ko"] body {
  font-family: 'Noto Sans KR', 'Noto Sans JP', sans-serif;
}

html[lang="zh-CN"] body {
  font-family: 'Noto Sans SC', 'Noto Sans JP', sans-serif;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(26, 42, 58, 0.75) 0%,
    rgba(26, 42, 58, 0.45) 50%,
    rgba(26, 42, 58, 0.2) 100%
  );
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(26, 42, 58, 0.55);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-nav:hover {
  background: rgba(176, 148, 106, 0.85);
  border-color: var(--gold);
}

.hero-nav--prev {
  left: 24px;
}

.hero-nav--next {
  right: 24px;
}

.hero-indicators {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 10px;
  align-items: center;
}

.hero-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

.hero-indicator.active {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.15);
}

.hero-indicator:hover {
  border-color: var(--gold);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--header-height) + 60px) 24px 100px;
  width: 100%;
  pointer-events: none;
  box-sizing: border-box;
}

.hero-title,
.hero-subtitle {
  max-width: 640px;
}

.hero-content a,
.hero-content button {
  pointer-events: auto;
}

.hero-title {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 2;
  margin-bottom: 36px;
  max-width: 640px;
}

/* ---- Sections ---- */
.section {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.section-navy {
  background: var(--navy);
  color: var(--white);
}

.section-light {
  background: var(--gray-light);
}

.section-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-bottom: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.section-title--white {
  color: var(--white);
}

.section-title--lined::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
  margin: 16px auto 0;
}

.section-title--lined-dark::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 16px auto 0;
}

.title-line {
  display: inline-block;
  width: 80px;
  height: 1px;
  background: var(--gold);
}

/* ---- Network Pattern ---- */
.network-pattern {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
}

.network-pattern--bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.8) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 40px 40px, 80px 80px, 80px 80px;
  mask-image: linear-gradient(to top, black, transparent);
  -webkit-mask-image: linear-gradient(to top, black, transparent);
}

.network-pattern--light {
  bottom: 0;
  right: 0;
  width: 300px;
  height: 300px;
  opacity: 0.08;
  background-image:
    radial-gradient(circle, var(--navy) 1px, transparent 1px),
    linear-gradient(rgba(26,42,58,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,42,58,0.3) 1px, transparent 1px);
  background-size: 30px 30px, 60px 60px, 60px 60px;
}

.network-pattern--full {
  inset: 0;
  opacity: 0.08;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 50px 50px, 100px 100px, 100px 100px;
}

/* ---- Cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 28px 36px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
}

.card-icon {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.card-icon img {
  width: 64px;
  height: 64px;
}

.card-title {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-text {
  color: var(--gray-muted);
  font-size: 0.875rem;
  line-height: 1.9;
  text-align: left;
}

/* ---- Results ---- */
.results-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.results-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.results-list {
  list-style: none;
  font-size: 1rem;
  color: var(--gray-text);
  line-height: 2.2;
}

.results-list li {
  position: relative;
  padding-left: 1.2em;
}

.results-list li::before {
  content: '・';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ---- Company Table ---- */
.company-table-wrap {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.company-table th,
.company-table td {
  padding: 18px 24px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid #e8e8e8;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: none;
}

.company-table th {
  background: var(--table-header);
  color: var(--white);
  font-weight: 500;
  width: 180px;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.company-table td {
  background: var(--white);
  color: var(--gray-text);
  line-height: 1.8;
}

.company-table td a {
  font-weight: 500;
}

/* ---- Contact Form ---- */
.contact-lead {
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin: -24px auto 40px;
  max-width: 560px;
  line-height: 1.9;
}

.contact-form-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 8px;
}

.required {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--white);
  background: var(--gold);
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  background: var(--white);
  color: var(--gray-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 148, 106, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-actions {
  text-align: center;
  margin-top: 32px;
}

.btn-submit {
  padding: 14px 48px;
  font-size: 1rem;
  border-radius: 4px;
}

.form-note {
  margin-top: 20px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  line-height: 1.7;
}

.contact-success {
  background: var(--white);
  border-radius: var(--radius);
  padding: 56px 36px;
  text-align: center;
  box-shadow: var(--shadow);
}

.contact-success-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}

.contact-success-text {
  color: var(--gray-muted);
  font-size: 0.95rem;
  line-height: 1.9;
}

/* ---- Footer ---- */
.footer {
  background: var(--navy-dark);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
}

/* ---- Utilities ---- */
.hide-mobile {
  display: inline;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-content {
    padding-left: 76px;
    padding-right: 76px;
  }

  .hero-title,
  .hero-subtitle {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(26, 42, 58, 0.97);
    padding: 24px;
  }

  .nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .menu-toggle {
    display: flex;
  }

  .header-actions {
    margin-left: auto;
    gap: 8px;
  }

  .btn-header {
    display: none;
  }

  .lang-btn {
    padding: 5px 6px;
    font-size: 0.68rem;
  }

  .header-inner.nav-open .btn-header {
    display: none;
  }

  .company-table th {
    width: 120px;
    font-size: 0.85rem;
    padding: 14px 16px;
  }

  .company-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 72px 0;
  }

  .hide-mobile {
    display: none;
  }

  .hero-content {
    padding-left: 56px;
    padding-right: 56px;
    padding-bottom: 88px;
  }

  .hero-title {
    font-size: 1.45rem;
    letter-spacing: 0.03em;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.85;
  }

  .hero-nav {
    width: 36px;
    height: 36px;
  }

  .hero-nav svg {
    width: 18px;
    height: 18px;
  }

  .hero-nav--prev {
    left: 8px;
  }

  .hero-nav--next {
    right: 8px;
  }

  .hero-indicators {
    bottom: 20px;
  }

  .logo-text {
    font-size: 0.82rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .company-table,
  .company-table tbody,
  .company-table tr,
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
  }

  .company-table th {
    border-bottom: none;
    padding-bottom: 8px;
  }

  .company-table td {
    padding-top: 0;
    border-bottom: 2px solid var(--gray-light);
  }
}
