/* ============================================================
   有限会社阪井製作所 — Global Stylesheet
   Design System: Steel Black × Rust Orange
   ============================================================ */

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

:root {
  --color-primary:   #1A1A1A;
  --color-secondary: #4A4A4A;
  --color-accent:    #C0440A;
  --color-accent-hover: #A03508;
  --color-base:      #F5F4F2;
  --color-dark:      #111111;
  --color-white:     #FFFFFF;
  --color-border:    #DDDDDD;
  --color-tag-bg:    rgba(192,68,10,0.12);

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

  --container:  1200px;
  --gap:        24px;
  --radius:     4px;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
  --transition: 0.25s ease;
}

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

body {
  font-family: var(--font-jp);
  color: var(--color-secondary);
  background: var(--color-white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ---------- Section ---------- */
section { padding: 120px 0; }
section.dark { background: var(--color-dark); color: var(--color-white); }
section.gray { background: var(--color-base); }

/* ---------- Section Header ---------- */
.section-header {
  margin-bottom: 64px;
  text-align: center;
}
.section-header .en-label {
  font-family: var(--font-deco);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  display: block;
  margin-bottom: 12px;
}
.section-header h2 {
  font-family: var(--font-jp);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
}
.section-header p {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--color-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
section.dark .section-header h2 { color: var(--color-white); }
section.dark .section-header p  { color: rgba(255,255,255,0.65); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
}
.btn-dark {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-dark:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-2px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(17,17,17,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background var(--transition);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}
.logo-main {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-white);
  letter-spacing: 0.04em;
}
.logo-sub {
  font-family: var(--font-deco);
  font-size: 0.65rem;
  color: var(--color-accent);
  letter-spacing: 0.18em;
  margin-top: 3px;
}
.gnav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.gnav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
  position: relative;
  transition: color var(--transition);
}
.gnav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}
.gnav a:hover, .gnav a.active { color: var(--color-white); }
.gnav a:hover::after, .gnav a.active::after { width: 100%; }

.header-contact {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-tel {
  font-family: var(--font-en);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.header-tel span { font-size: 1.05rem; color: var(--color-white); font-weight: 600; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-dark);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.08em;
}
.mobile-nav a:hover { color: var(--color-accent); }
.mobile-nav .mobile-tel {
  font-family: var(--font-en);
  font-size: 1.2rem;
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.6);
  padding: 80px 0 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo-main { font-size: 1.1rem; }
.footer-address {
  margin-top: 20px;
  font-size: 0.85rem;
  line-height: 2;
}
.footer-address a { color: rgba(255,255,255,0.6); }
.footer-address a:hover { color: var(--color-white); }
.footer-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
}
.footer-nav-grid a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-nav-grid a:hover { color: var(--color-white); }
.footer-bottom {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--color-white); }

/* ---------- Floating CTA (SP) ---------- */
.floating-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 998;
  padding: 12px 16px;
  background: rgba(17,17,17,0.95);
  border-top: 1px solid rgba(255,255,255,0.1);
  gap: 12px;
}
.floating-cta a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
}
.floating-cta .cta-tel {
  background: var(--color-primary);
  color: var(--color-white);
  border: 1px solid rgba(255,255,255,0.2);
}
.floating-cta .cta-mail {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: 160px 0 80px;
  background: var(--color-primary);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: attr(data-en);
  font-family: var(--font-deco);
  font-size: clamp(6rem, 15vw, 14rem);
  color: rgba(255,255,255,0.04);
  position: absolute;
  right: -20px;
  bottom: -20px;
  line-height: 1;
  pointer-events: none;
  letter-spacing: 0.02em;
}
.page-hero .breadcrumb {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,0.5); }
.page-hero .breadcrumb a:hover { color: var(--color-white); }
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
}
.page-hero .en-label {
  font-family: var(--font-deco);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--color-accent);
  display: block;
  margin-bottom: 12px;
}
.page-hero p {
  margin-top: 16px;
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  max-width: 560px;
}

/* ---------- Card ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #ccc;
}
.card-body { padding: 24px; }
.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-tag-bg);
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1.5;
}
.card p { font-size: 0.85rem; line-height: 1.7; }
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  transition: gap var(--transition);
}
.card .card-link:hover { gap: 10px; }

/* ---------- Placeholder Image ---------- */
.img-placeholder {
  background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.25);
  font-family: var(--font-deco);
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  section { padding: 80px 0; }
  .section-header { margin-bottom: 48px; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }
  .gnav { display: none; }
  .header-contact { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .floating-cta { display: flex; }
  body { padding-bottom: 72px; }
  .footer-nav-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  :root { --gap: 16px; }
  .page-hero { padding: 120px 0 60px; }
}

/* ---------- Utility ---------- */
.text-accent { color: var(--color-accent); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
