/* ============================================================
   株式会社名石 MEISEKI Inc. — style.css
   ============================================================ */

/* ---- リセット & ベース ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold:        #C8941A;
  --gold-light:  #E8B84B;
  --gold-pale:   #F5E9C8;
  --dark:        #1a1a1a;
  --mid:         #2d2d2d;
  --text:        #333333;
  --muted:       #666666;
  --border:      #E2DDD0;
  --bg-alt:      #F7F5F0;
  --white:       #ffffff;
  --header-h:    64px;
  --max-w:       min(1200px,100%);
  --radius-sm:   4px;
  --radius-md:   8px;
  --transition:  0.2s ease;

  /* Font Size */
  --font-size-2xs: clamp(0.625rem, 0.6rem + 0.1vw, 0.688rem);
  /* 10px → 11px */
  --font-size-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.813rem);
  /* 12px → 13px */
  --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  /* 14px → 15px */
  --font-size-md: clamp(1rem, 0.96rem + 0.2vw, 1.063rem);
  /* 16px → 17px */
  --font-size-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
  /* 18px → 20px */
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  /* 20px → 24px */
  --font-size-2xl: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  /* 24px → 32px */
  --font-size-3xl: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  /* 28px → 40px */
  --font-size-4xl: clamp(2rem, 1.5rem + 2vw, 3rem);
  /* 32px → 48px */
  --font-size-5xl: clamp(2.5rem, 1.8rem + 3vw, 4rem);
  /* 40px → 64px */
  --font-size-6xl: clamp(3rem, 2rem + 4vw, 5rem);
  /* 48px → 80px */
  --font-size-7xl: clamp(4rem, 2.5rem + 6vw, 7rem);
  /* 64px → 112px */
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
  font-size: var(--font-size-md);/* 1rem = 通常16px */
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  opacity: 0.75;
}

ul, ol {
  list-style: none;
}


/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--dark);
  border-bottom: 2px solid var(--gold);
  transition: box-shadow var(--transition);
}

.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

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

.header-logo {
  flex-shrink: 0;
}

.logo-ja {
  font-family: 'Noto Serif JP', serif;
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.logo-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--font-size-xs);
  font-weight: 400;
  color: var(--gold-light);
  letter-spacing: 0.25em;
  margin-top: 2px;
}

.header-nav {
  margin-left: auto;
}

.header-nav ul {
  display: flex;
  gap: 0;
}

.header-nav ul li a {
  display: block;
  padding: 8px 20px;
  --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.08em;
  transition: color var(--transition), background var(--transition);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.header-nav ul li:last-child a {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.header-nav ul li a:hover {
  color: var(--gold-light);
  background: rgba(200, 148, 26, 0.1);
  opacity: 1;
}

/* ハンバーガー */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 580px;
  background: var(--dark);
  padding-top: var(--header-h);
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* 背景写真レイヤー */
.hero-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

/* 写真の上にグラデーションオーバーレイ */
.hero-bg-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(15, 10, 5, 0.82) 0%,
    rgba(20, 14, 5, 0.70) 50%,
    rgba(10, 7, 2, 0.50) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 40px 88px;
  width: 100%;
}

.hero-sub {
   --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  font-weight: 300;
  color: var(--gold-light);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-catch {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.65;
  margin-bottom: 20px;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 2;
  margin-bottom: 40px;
  letter-spacing: 0.06em;
}

.hero-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 16px 40px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
  opacity: 1;
}

.hero-btn:hover {
  background: var(--gold-light);
  opacity: 1;
  transform: translateY(-2px);
}

.hero-bg-kanji {
  position: absolute;
  right: -20px;
  bottom: -10px;
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(120px, 18vw, 200px);
  font-weight: 700;
  color: rgba(200, 148, 26, 0.3);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  letter-spacing: -0.05em;
}

.hero-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--gold), var(--gold-light), transparent);
  z-index: 3;
}


/* ============================================================
   SECTION 共通
   ============================================================ */
.section {
  padding: 80px 0;
}

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

.section-alt {
  background: var(--bg-alt);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

.section-header {
  margin-bottom: 48px;
}

.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 32px;
  background: var(--gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-lead {
  font-size: 16px;
  color: var(--muted);
  padding-left: 18px;
  letter-spacing: 0.06em;
}


/* ============================================================
   SERVICE
   ============================================================ */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 20px 24px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  border-color: var(--gold-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  color: var(--gold);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.service-badge {
  display: inline-block;
  font-size: var(--font-size-xs);
  color: var(--gold);
  background: var(--gold-pale);
  border-radius: var(--radius-sm);
  padding: 2px 10px;
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.service-desc {
  color: var(--muted);
  line-height: 1.85;
  font-size: var(--font-size-sm);
}


/* ============================================================
   ABOUT WORK
   ============================================================ */
.work-intro {
  background: var(--white);
  border-left: 4px solid var(--gold-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin-bottom: 40px;
  font-size: 16px;
  color: var(--text);
  line-height: 1.95;
}

.work-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 48px;
}

.work-step {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.work-step:first-child {
  border-top: 1px solid var(--border);
}

.step-num {
  width: 42px;
  height: 42px;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0;
}

.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}

.step-content p {
  --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  color: var(--muted);
  line-height: 1.95;
}

/* 職種 */
.roles-block {
  margin-top: 8px;
}

.roles-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 3px solid var(--gold-light);
  letter-spacing: 0.06em;
}

.roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.role-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  transition: border-color var(--transition);
}

.role-card:hover {
  border-color: var(--gold-light);
}

.role-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.06em;
}

.role-card p {
  color: var(--muted);
  line-height: 1.85;
}


/* ============================================================
   COMPANY TABLE
   ============================================================ */
.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table tr {
  border-bottom: 1px solid var(--border);
}

.company-table tr:first-child {
  border-top: 1px solid var(--border);
}

.company-table th,
.company-table td {
  padding: 18px 12px;
  font-size: 16px;
  vertical-align: top;
  text-align: left;
}

.company-table th {
  width: 148px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.company-table td {
  color: var(--dark);
  line-height: 1.75;
}

.company-table td a,
.company-table td a:hover {
  color: var(--dark);
  opacity: 1;
}


/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
  padding: 60px 0;
}

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

.contact-label {
  font-family: 'Cormorant Garamond', serif;
   --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  color: var(--gold-light);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.contact-lead {
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.06em;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.contact-tel-label {
  font-size: var(--font-size-xs);
  color: var(--gold);
  letter-spacing: 0.25em;
  margin-bottom: 4px;
}

.contact-tel {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 1;
  line-height: 1.2;
  transition: color var(--transition);
}

.contact-tel:hover {
  opacity: 1;
}

.contact-tel-sub {
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
  letter-spacing: 0.06em;
}

.contact-mail-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: var(--white);
  --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  opacity: 1;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}

.contact-mail-btn:hover {
  background: var(--gold-light);
  opacity: 1;
  transform: translateY(-1px);
}

.contact-mail-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.contact-form {
  width: 100%;
  background: var(--white);
  border: 1px solid rgba(232, 184, 75, 0.35);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.contact-form iframe {
  display: block;
  width: 100%;
  min-height: 920px;
  border: 0;
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #111111;
  padding: 40px 0 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo-ja {
  font-family: 'Noto Serif JP', serif;
  font-size: 17px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.footer-logo-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--font-size-xs);
  color: var(--gold-light);
  letter-spacing: 0.25em;
}

.footer-info {
  color: rgba(255, 255, 255, 0.4);
  line-height: 2;
  text-align: right;
}

.footer-copy {
  text-align: center;
  padding: 16px 40px;
   --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.1em;
}


/* ============================================================
   PAGE TOP
   ============================================================ */
.page-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition);
}

.page-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.page-top:hover {
  background: var(--gold-light);
}

.page-top span {
  font-size: 24px;
  line-height: 1;
}


/* ============================================================
   RESPONSIVE — タブレット以下 (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

  :root {
    --header-h: 56px;
  }

  /* ヘッダーナビ → ドロワー */
  .header-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 32px 24px;
    overflow-y: auto;
    z-index: 99;
  }

  .header-nav.is-open {
    display: flex;
  }

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

  .header-nav ul li a {
    padding: 18px 0;
    font-size: 17px;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header-nav ul li:last-child a {
    border-right: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* ヒーロー */
  .hero-inner {
    padding: 56px 24px 72px;
  }

  .hero-desc {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .hero-btn {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
    padding: 15px 36px;
  }

  /* セクション */
  .section {
    padding: 60px 0;
  }

  .section-inner {
    padding: 0 24px;
  }

  .section-title {
    font-size: 24px;
  }

  .section-lead {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  /* サービス */
  .service-list {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .service-name {
    font-size: 16px;
  }

  .service-desc {
     --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  /* 土木説明 */
  .work-intro {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .step-content h3 {
    font-size: 17px;
  }

  .step-content p {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  /* 職種 */
  .roles-grid {
    grid-template-columns: 1fr;
  }

  .role-card h4 {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .role-card p {

  }

  /* 会社情報 */
  .company-table th,
  .company-table td {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
    padding: 16px 8px;
  }

  .company-table th {
    width: 110px;

  }

  /* コンタクト */
  .contact-inner {
    padding: 0 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .contact-lead {
    font-size: 18px;
  }

  .contact-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
  }

  .contact-mail-btn {
    width: 100%;
    justify-content: center;
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .contact-form iframe {
    min-height: 980px;
  }

  /* フッター */
  .footer-inner {
    padding: 0 24px 24px;
    flex-direction: column;
    gap: 16px;
  }

  .footer-info {

    text-align: left;
  }

  .footer-copy {
    padding: 16px 24px;
     --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .page-top {
    right: 16px;
    bottom: 16px;
    width: 34px;
    height: 34px;
  }
}

/* ============================================================
   RESPONSIVE — スマートフォン (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {

  body {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .logo-ja {
    font-size: 17px;
  }

  .hero {
    min-height: 520px;
  }

  .hero-catch {
    font-size: 26px;
  }

  .hero-desc {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .section-title {
    font-size: 22px;
  }

  .section-lead {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  .service-name {
    font-size: 16px;
  }

  .service-desc {

  }

  .work-intro {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .step-content h3 {
    font-size: 16px;
  }

  .step-content p {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .role-card h4 {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
  }

  .role-card p {

  }

  .company-table th,
  .company-table td {
    --font-size-sm: clamp(0.875rem, 0.84rem + 0.2vw, 0.938rem);
    padding: 14px 6px;
  }

  .contact-tel {
    font-size: 28px;
  }

  .contact-tel-sub {

  }

  .contact-lead {
    font-size: 17px;
  }
}
