/* ============================================
   株式会社ミナト安全施設 - スタイルシート
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #0f1e3d;
  --navy-light: #1c3260;
  --navy-mid: #162a50;
  --accent: #c76b12;
  --accent-hover: #a85a0e;
  --accent-light: rgba(199, 107, 18, 0.08);
  --white: #ffffff;
  --off-white: #f7f8fa;
  --gray-light: #f0f1f5;
  --gray: #dfe2e8;
  --gray-dark: #6b7280;
  --text: #1f2937;
  --text-light: #4b5563;
  --border: #d1d5db;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.1);
  --radius: 4px;
  --transition: 0.3s ease;
  --font-heading: "Noto Serif JP", serif;
  --font-body: "Noto Sans JP", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.9;
  background: var(--white);
  overflow-x: hidden;
  font-size: 15px;
  letter-spacing: 0.03em;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: var(--navy);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo a {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.logo-icon {
  height: 1.4em;
  width: auto;
  vertical-align: middle;
}

.nav-list {
  display: flex;
  gap: 32px;
}

.nav-list a {
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-list a:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--navy);
  z-index: 0;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 0 24px;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 24px;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-content p {
  font-size: 1rem;
  margin-bottom: 40px;
  opacity: 0.85;
  letter-spacing: 0.04em;
  line-height: 2;
}

.btn {
  display: inline-block;
  padding: 14px 40px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(199, 107, 18, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

/* --- Section Common --- */
.section {
  padding: 96px 0;
}

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

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

.section-title {
  text-align: center;
  margin-bottom: 56px;
}

.section-title h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}

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

.section-title .title-en {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 16px auto 0;
}

.section-title p {
  color: var(--gray-dark);
  font-size: 0.88rem;
  margin-top: 12px;
}

.section-navy .section-title p {
  color: rgba(255, 255, 255, 0.6);
}

/* --- Placeholder Image Area --- */
.placeholder-image {
  background: var(--gray-light);
  border: 1.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--gray-dark);
  font-size: 0.8rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.placeholder-image .icon {
  font-size: 1.8rem;
  opacity: 0.5;
}

/* --- Greeting (ご挨拶) --- */
.greeting-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.greeting-photo {
  width: 240px;
  height: 310px;
}

.greeting-text h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 20px;
  letter-spacing: 0.06em;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray);
}

.greeting-text p {
  margin-bottom: 16px;
  color: var(--text-light);
  line-height: 2.1;
  font-size: 0.92rem;
}

.greeting-text .name {
  font-weight: 700;
  color: var(--navy);
  margin-top: 24px;
  font-size: 0.95rem;
}

/* --- Company Info (会社概要) --- */
.company-table {
  width: 100%;
  border-collapse: collapse;
  max-width: 780px;
  margin: 0 auto;
}

.company-table th,
.company-table td {
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid var(--gray);
  font-size: 0.9rem;
}

.company-table th {
  width: 160px;
  font-weight: 600;
  color: var(--navy);
  background: var(--off-white);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.company-table td {
  color: var(--text-light);
}

/* --- Services (事業内容) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.service-card .placeholder-image {
  height: 180px;
  border-radius: 0;
  border: none;
  border-bottom: 1.5px dashed var(--border);
}

.service-card-body {
  padding: 24px;
}

.service-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.service-card-body p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.9;
}

/* --- Equipment (保有機材) --- */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.equipment-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.equipment-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.equipment-card .placeholder-image {
  height: 150px;
  border-radius: 0;
  border: none;
  border-bottom: 1.5px dashed var(--border);
}

.equipment-card-body {
  padding: 16px;
  text-align: center;
}

.equipment-card-body h4 {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.equipment-card-body p {
  font-size: 0.8rem;
  color: var(--gray-dark);
}

/* --- Portfolio (施工実績) --- */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.portfolio-card {
  display: grid;
  grid-template-columns: 420px 1fr;
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: box-shadow var(--transition);
}

.portfolio-card:hover {
  box-shadow: var(--shadow-hover);
}

.portfolio-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-ph {
  width: 100%;
  height: 100%;
  min-height: 220px;
  font-size: 0.8rem;
  border-radius: 0;
}

.portfolio-card-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portfolio-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray);
}

.portfolio-card-body dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px 16px;
  font-size: 0.88rem;
  line-height: 1.8;
}

.portfolio-card-body dt {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.portfolio-card-body dd {
  color: var(--text-light);
}

/* --- Recruitment (求人募集) --- */
.recruit-content {
  max-width: 800px;
  margin: 0 auto;
}

.recruit-intro {
  text-align: center;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 2;
}

.recruit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.recruit-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.recruit-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.04em;
}

.recruit-card dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px 16px;
  font-size: 0.85rem;
}

.recruit-card dt {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.recruit-card dd {
  color: rgba(255, 255, 255, 0.65);
}

.recruit-cta {
  text-align: center;
  margin-top: 40px;
}

/* --- Footer --- */
.footer {
  background: #0c1524;
  color: rgba(255, 255, 255, 0.6);
  padding: 56px 0 28px;
  border-top: 3px solid var(--accent);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-info h3 {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 14px;
  letter-spacing: 0.06em;
}

.footer-info p {
  font-size: 0.82rem;
  line-height: 2;
}

.footer-links h4 {
  color: var(--white);
  font-size: 0.88rem;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.82rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* --- Contact Page --- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 120px 0 56px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
}

.page-header p {
  opacity: 0.5;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.contact-section {
  padding: 64px 0 96px;
}

.contact-form {
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray);
  box-shadow: var(--shadow);
  padding: 48px 44px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.form-group label .required {
  background: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 2px;
  margin-left: 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: var(--off-white);
  letter-spacing: 0.02em;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
}

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

.form-group .error-message {
  color: #b91c1c;
  font-size: 0.78rem;
  margin-top: 6px;
  display: none;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: #b91c1c;
}

.form-group.has-error .error-message {
  display: block;
}

.form-submit {
  text-align: center;
  margin-top: 36px;
}

.form-submit .btn {
  min-width: 220px;
  font-family: inherit;
  padding: 16px 40px;
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Mobile Navigation Overlay --- */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.nav-overlay.active {
  display: block;
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
  .greeting-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .greeting-photo {
    margin: 0 auto;
    width: 200px;
    height: 260px;
  }

  .greeting-text h3 {
    text-align: center;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--navy);
    flex-direction: column;
    padding: 80px 30px 30px;
    gap: 0;
    transition: right var(--transition);
    z-index: 1000;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.3);
  }

  .nav-list.active {
    right: 0;
  }

  .nav-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-list a {
    display: block;
    padding: 14px 0;
    font-size: 0.92rem;
  }

  .hero-content h1 {
    font-size: 1.7rem;
  }

  .section {
    padding: 64px 0;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .section-title {
    margin-bottom: 40px;
  }

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

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

  .company-table td {
    padding-top: 4px;
    padding-bottom: 16px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .equipment-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .portfolio-card {
    grid-template-columns: 1fr;
  }

  .portfolio-card-img img {
    height: 240px;
  }

  .portfolio-ph {
    min-height: 160px;
  }

  .portfolio-card-body {
    padding: 20px;
  }

  .recruit-cards {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 28px 24px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 60px;
  }

  .logo a {
    font-size: 1rem;
  }

  .hero {
    min-height: 420px;
  }

  .hero-content h1 {
    font-size: 1.45rem;
  }

  .equipment-grid {
    grid-template-columns: 1fr;
  }
}
