/* ================================
   TETSU-REN 鉄練 - Forge Dark Theme
   ================================ */

:root {
  --black: #0D0D0D;
  --fire: #FF5722;
  --fire-dark: #E64A19;
  --fire-glow: rgba(255, 87, 34, .15);
  --steel: #B0BEC5;
  --steel-dark: #78909C;
  --white: #F5F5F5;
  --gray-900: #1A1A1A;
  --gray-800: #222;
  --gray-700: #333;
  --gray-600: #444;
  --font-en: 'Barlow Condensed', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

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

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

body {
  font-family: var(--font-jp);
  background: var(--black);
  color: var(--steel);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

.sp-only { display: none; }

/* Sample Banner */
.sample-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--fire);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  z-index: 10000;
  letter-spacing: .04em;
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 32px;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  top: 32px;
  background: rgba(13,13,13,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,87,34,.1);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-en {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 22px;
  color: var(--white);
  letter-spacing: .06em;
}

.logo-ja {
  font-size: 10px;
  color: var(--fire);
  letter-spacing: .2em;
  font-weight: 700;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-desktop a {
  font-size: 13px;
  font-weight: 500;
  color: var(--steel);
  transition: var(--transition);
  letter-spacing: .02em;
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--fire);
  transition: var(--transition);
}

.nav-desktop a:hover { color: var(--white); }
.nav-desktop a:hover::after { width: 100%; }
.nav-desktop a.active { color: var(--white); }
.nav-desktop a.active::after { width: 100%; }

.nav-cta {
  background: var(--fire) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 2px;
  font-weight: 700 !important;
  transition: var(--transition);
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--fire-dark) !important; }

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

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

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(13,13,13,.98);
  z-index: 1050;
  transition: right .4s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.mobile-nav a {
  font-size: 18px;
  font-weight: 500;
  color: var(--steel);
  transition: var(--transition);
  letter-spacing: .06em;
}

.mobile-nav a:hover { color: var(--fire); }

.mobile-cta {
  background: var(--fire);
  color: #fff !important;
  padding: 12px 40px;
  border-radius: 2px;
  font-weight: 700;
  margin-top: 8px;
}

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

.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.35) saturate(.8);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(13,13,13,.5) 0%, rgba(13,13,13,.7) 60%, var(--black) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-sub {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 600;
  color: var(--fire);
  letter-spacing: .2em;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: .04em;
}

.hero-desc {
  font-size: 16px;
  color: var(--steel);
  line-height: 2;
  margin-bottom: 40px;
  max-width: 520px;
}

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

/* Sparks */
.hero-sparks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--fire);
  border-radius: 50%;
  animation: sparkFloat 3s ease-in infinite;
  opacity: 0;
}

.s1 { left: 20%; top: 40%; animation-delay: 0s; }
.s2 { left: 55%; top: 30%; animation-delay: .5s; }
.s3 { left: 70%; top: 50%; animation-delay: 1s; }
.s4 { left: 35%; top: 60%; animation-delay: 1.5s; }
.s5 { left: 80%; top: 35%; animation-delay: 2s; }
.s6 { left: 45%; top: 45%; animation-delay: 2.5s; }

@keyframes sparkFloat {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-30px + 60px * var(--r, .5)), -80px) scale(0); }
}

.s1 { --r: .2; } .s2 { --r: .7; } .s3 { --r: .4; }
.s4 { --r: .8; } .s5 { --r: .1; } .s6 { --r: .6; }

/* Hero scroll */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll span {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--steel-dark);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--fire), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: .06em;
  border: none;
  font-family: var(--font-jp);
}

.btn-primary {
  background: var(--fire);
  color: #fff;
}

.btn-primary:hover {
  background: var(--fire-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,87,34,.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--steel-dark);
}

.btn-outline:hover {
  border-color: var(--fire);
  color: var(--fire);
}

.btn-full { width: 100%; }

/* ---- Numbers ---- */
.numbers {
  padding: 60px 0;
  background: var(--gray-900);
  border-top: 1px solid rgba(255,87,34,.1);
  border-bottom: 1px solid rgba(255,87,34,.1);
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.num-val {
  font-family: var(--font-en);
  font-size: 48px;
  font-weight: 900;
  color: var(--fire);
  line-height: 1;
}

.num-unit {
  font-size: 16px;
  color: var(--fire);
  font-weight: 700;
  margin-left: 2px;
}

.num-label {
  font-size: 13px;
  color: var(--steel-dark);
  margin-top: 8px;
}

/* ---- Sections Common ---- */
.section-label {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--fire);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-desc {
  font-size: 15px;
  color: var(--steel-dark);
  margin-bottom: 48px;
}

/* ---- Strength Banner ---- */
.strength {
  padding: 80px 0;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.strength-item {
  text-align: center;
  padding: 24px 16px;
}

.strength-icon {
  margin-bottom: 16px;
}

.strength-item h3 {
  font-size: 16px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 8px;
}

.strength-item p {
  font-size: 13px;
  color: var(--steel-dark);
  line-height: 1.8;
}

/* ---- About ---- */
.about {
  padding: 120px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 48px;
}

.about-lead {
  font-size: 22px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 24px;
  line-height: 1.6;
}

.about-text p {
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 2;
}

.about-signature {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  color: var(--steel-dark);
  font-size: 14px;
}

.sig-line {
  width: 40px;
  height: 1px;
  background: var(--fire);
}

.about-visual {
  position: relative;
}

.about-icon-box {
  position: absolute;
  top: -30px;
  right: -20px;
  z-index: 2;
  opacity: .6;
}

.about-img {
  border-radius: 4px;
  filter: brightness(.7) saturate(.7);
  aspect-ratio: 4/5;
  object-fit: cover;
  width: 100%;
}

/* ---- Welding ---- */
.welding {
  padding: 120px 0;
  background: var(--gray-900);
}

.welding-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.weld-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  padding: 36px 24px;
  border-radius: 4px;
  transition: var(--transition);
  text-align: center;
}

.weld-card:hover {
  border-color: var(--fire);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255,87,34,.1);
}

.weld-icon {
  margin-bottom: 20px;
}

.weld-card h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 4px;
}

.weld-en {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--fire);
  letter-spacing: .1em;
  margin-bottom: 16px;
}

.weld-card p:last-child {
  font-size: 13px;
  line-height: 1.8;
  color: var(--steel-dark);
}

/* ---- Materials ---- */
.materials {
  padding: 120px 0;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.mat-card {
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  padding: 40px 32px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.mat-card:hover {
  border-color: var(--fire);
}

.mat-card:hover .mat-line {
  width: 100%;
}

.mat-number {
  font-family: var(--font-en);
  font-size: 48px;
  font-weight: 900;
  color: var(--fire);
  opacity: .12;
  position: absolute;
  top: 12px;
  right: 24px;
  line-height: 1;
}

.mat-card h3 {
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 4px;
}

.mat-en {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--fire);
  letter-spacing: .1em;
  margin-bottom: 16px;
}

.mat-card p:last-of-type {
  font-size: 14px;
  line-height: 1.8;
  color: var(--steel-dark);
}

.mat-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--fire);
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* ---- Works ---- */
.works {
  padding: 120px 0;
  background: var(--gray-900);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.work-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/3;
}

.work-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
  filter: brightness(.7);
}

.work-item:hover .work-img-wrap img {
  transform: scale(1.08);
  filter: brightness(.5);
}

.work-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.work-item:hover .work-overlay { opacity: 1; }

.work-overlay span {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--white);
  border: 1px solid var(--white);
  padding: 8px 24px;
}

.work-info {
  padding: 20px 4px;
}

.work-cat {
  font-size: 12px;
  color: var(--fire);
  font-weight: 700;
  letter-spacing: .04em;
}

.work-info h3 {
  font-size: 17px;
  font-weight: 900;
  color: var(--white);
  margin: 6px 0 8px;
}

.work-info p {
  font-size: 13px;
  color: var(--steel-dark);
  line-height: 1.7;
}

/* ---- Certifications ---- */
.certifications {
  padding: 120px 0;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.cert-card {
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  padding: 32px 24px;
  border-radius: 4px;
  text-align: center;
  transition: var(--transition);
}

.cert-card:hover {
  border-color: var(--fire);
  transform: translateY(-3px);
}

.cert-badge { margin-bottom: 16px; }

.cert-card h3 {
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.cert-card p {
  font-size: 13px;
  color: var(--steel-dark);
  line-height: 1.7;
}

/* ---- Flow ---- */
.flow {
  padding: 120px 0;
  background: var(--gray-900);
}

.flow-steps {
  max-width: 700px;
  margin: 48px auto 0;
  position: relative;
}

.flow-steps::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--gray-700);
}

.flow-step {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  position: relative;
}

.flow-num {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 900;
  color: var(--fire);
  width: 72px;
  height: 72px;
  border: 2px solid var(--fire);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--gray-900);
  position: relative;
  z-index: 1;
}

.flow-content h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 8px;
  padding-top: 4px;
}

.flow-content p {
  font-size: 14px;
  color: var(--steel-dark);
  line-height: 1.8;
}

/* ---- Company ---- */
.company {
  padding: 120px 0;
}

.company-table-wrap {
  margin-top: 48px;
  overflow-x: auto;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

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

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

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

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

/* ---- Contact ---- */
.contact {
  padding: 120px 0;
  background: var(--gray-900);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-box {
  margin-bottom: 32px;
}

.contact-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--steel-dark);
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.contact-phone {
  font-family: var(--font-en);
  font-size: 32px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: .04em;
  transition: var(--transition);
}

.contact-phone:hover { color: var(--fire); }

.contact-hours {
  font-size: 13px;
  color: var(--steel-dark);
  margin-top: 4px;
}

.contact-tagline {
  margin-top: 48px;
}

.tagline-en {
  font-family: var(--font-en);
  font-size: 36px;
  font-weight: 900;
  color: var(--fire);
  opacity: .2;
  letter-spacing: .06em;
}

.tagline-ja {
  font-size: 18px;
  font-weight: 900;
  color: var(--steel-dark);
  margin-top: 4px;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.req {
  font-size: 11px;
  color: var(--fire);
  margin-left: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: 2px;
  color: var(--white);
  font-family: var(--font-jp);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--fire);
  box-shadow: 0 0 0 3px rgba(255,87,34,.15);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B0BEC5' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

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

/* ---- Footer ---- */
.footer {
  padding: 60px 0 0;
  border-top: 1px solid var(--gray-700);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  gap: 40px;
}

.footer-desc {
  font-size: 13px;
  color: var(--steel-dark);
  margin-top: 16px;
  max-width: 300px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--steel-dark);
  transition: var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--steel-dark);
}

.footer-credit a {
  color: var(--fire);
  transition: var(--transition);
}

.footer-credit a:hover {
  color: var(--fire-dark);
}

/* ---- Animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}

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

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .welding-grid { grid-template-columns: repeat(2, 1fr); }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sp-only { display: inline; }

  .nav-desktop { display: none; }
  .hamburger { display: flex; }

  .hero { min-height: 100vh; }
  .hero-title { margin-bottom: 16px; }
  .hero-scroll { display: none; }

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

  .num-val { font-size: 36px; }

  .about, .welding, .materials, .works, .certifications, .flow, .company, .contact {
    padding: 80px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-visual { order: -1; }
  .about-icon-box { display: none; }

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

  .welding-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .materials-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr; max-width: 400px; margin: 48px auto 0; }
  .cert-grid { grid-template-columns: 1fr; max-width: 400px; margin: 48px auto 0; }

  .flow-steps::before { left: 35px; }
  .flow-step { gap: 20px; }
  .flow-num { width: 56px; height: 56px; font-size: 16px; }

  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-phone { font-size: 26px; }

  .company-table th { width: 120px; }

  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-desc { font-size: 14px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .num-val { font-size: 30px; }
  .section-title { font-size: 26px; }
}
