/* 株式会社アルファ２１ */
:root {
  --ink: #1d2433;
  --ink-soft: #4a5263;
  --muted: #7a8090;
  --paper: #fbfaf7;
  --card: #ffffff;
  --line: #e6e1d6;
  --gold: #a8854a;
  --gold-soft: #f3ece0;
  --navy: #1f2d4a;
  --serif: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--gold); }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 250, 247, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--serif); font-weight: 600; font-size: 20px;
  color: var(--ink); text-decoration: none; letter-spacing: .08em;
  line-height: 1.2;
}
.logo small {
  display: block; font-family: var(--sans); font-weight: 400;
  font-size: 10px; letter-spacing: .25em; color: var(--gold);
}
.nav { display: flex; gap: 28px; font-size: 14px; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--gold); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav .nav-cta {
  color: #fff; background: var(--navy); padding: 6px 16px; border-radius: 2px;
}
.nav .nav-cta:hover { background: var(--gold); color: #fff; }
.menu-toggle { display: none; }

/* Hero */
.hero { padding: 96px 0 88px; border-bottom: 1px solid var(--line); }
.hero .wrap {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center;
}
.eyebrow {
  font-size: 12px; letter-spacing: .3em; color: var(--gold); margin: 0 0 20px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 3.6vw, 42px); line-height: 1.5;
  margin: 0 0 28px; letter-spacing: .06em;
}
.hero h1 span { display: inline-block; }
.hero p.lead { color: var(--ink-soft); margin: 0 0 36px; max-width: 34em; }
.hero-figure {
  background: var(--card); border: 1px solid var(--line);
  padding: 28px; justify-self: center;
}
.hero-figure img { width: 210px; }
.btn {
  display: inline-block; padding: 14px 32px; border: 1px solid var(--navy);
  color: var(--navy); text-decoration: none; font-size: 14px; letter-spacing: .15em;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--navy); color: #fff; }
.btn-solid { background: var(--navy); color: #fff; }
.btn-solid:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* Sections */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 48px; }
.section-head .en {
  display: block; font-size: 12px; letter-spacing: .3em; color: var(--gold);
  margin-bottom: 8px;
}
.section-head h1, .section-head h2 {
  font-family: var(--serif); font-weight: 500; font-size: 30px;
  margin: 0; letter-spacing: .08em;
}
.section-head h1::after, .section-head h2::after {
  content: ""; display: block; width: 40px; height: 1px;
  background: var(--gold); margin-top: 20px;
}

.split { display: grid; grid-template-columns: 1fr 280px; gap: 56px; align-items: start; }
.split.reverse { grid-template-columns: 340px 1fr; }
.photo {
  background: var(--card); border: 1px solid var(--line); padding: 16px;
}
.photo figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* Top page links */
.link-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.link-card {
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  display: flex; flex-direction: column; transition: border-color .2s;
}
.link-card:hover { border-color: var(--gold); color: var(--ink); }
.link-card .thumb {
  height: 200px; background: var(--paper); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.link-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.link-card .body { padding: 24px 24px 28px; flex: 1; display: flex; flex-direction: column; }
.link-card .en { font-size: 11px; letter-spacing: .3em; color: var(--gold); }
.link-card h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 4px 0 10px; }
.link-card p { margin: 0 0 20px; font-size: 14px; color: var(--ink-soft); flex: 1; }
.link-card .more { font-size: 13px; letter-spacing: .1em; color: var(--navy); }
.link-card .more::after { content: " →"; color: var(--gold); }

/* Equipment rows */
.machine + .machine { margin-top: 64px; padding-top: 64px; border-top: 1px solid var(--line); }
.machine h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 0 0 16px; }
.machine .photo img { width: 100%; }

/* Process */
.process {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px; counter-reset: step;
}
.process li {
  counter-increment: step;
  background: var(--card); border: 1px solid var(--line);
  padding: 10px 16px; font-size: 14px;
}
.process li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--gold); font-size: 11px; margin-right: 8px; letter-spacing: .1em;
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); padding: 28px;
  display: flex; flex-direction: column;
}
.card .card-img {
  height: 200px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; background: var(--paper);
}
.card .card-img img { max-height: 180px; width: auto; }
.card h3 {
  font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 0 0 10px;
}
.card p { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* Company table */
.company { width: 100%; border-collapse: collapse; background: var(--card); }
.company th, .company td {
  text-align: left; vertical-align: top; padding: 20px 24px;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.company tr:first-child th, .company tr:first-child td { border-top: 1px solid var(--line); }
.company th { width: 9em; font-weight: 500; color: var(--gold); white-space: nowrap; }
.company ol { margin: 0; padding-left: 1.4em; }

/* Contact */
.contact-band { background: var(--navy); color: #fff; }
.contact-band .section-head h2 { color: #fff; }
.contact-band .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.tel {
  font-family: var(--serif); font-size: clamp(30px, 4vw, 40px); letter-spacing: .08em;
  color: #fff; text-decoration: none; display: inline-block; line-height: 1.4;
}
.tel:hover { color: var(--gold-soft); }
.contact-band .note { color: #c9cfdc; font-size: 14px; margin: 4px 0 0; }
.contact-band .btn { border-color: #fff; color: #fff; }
.contact-band .btn:hover { background: #fff; color: var(--navy); }

/* Form */
.form { display: grid; gap: 24px; max-width: 640px; }
.form label { display: block; font-size: 14px; margin-bottom: 6px; }
.form .req { color: #b4442f; font-size: 12px; margin-left: 6px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 2px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form textarea { min-height: 200px; resize: vertical; }
.form button { justify-self: start; cursor: pointer; font: inherit; }
.hp { position: absolute; left: -9999px; }

/* Plain text pages */
.prose { max-width: 760px; }
.prose h3 {
  font-family: var(--serif); font-weight: 600; font-size: 18px;
  margin: 40px 0 8px; padding-left: 14px; border-left: 2px solid var(--gold);
}
.page-head { padding: 72px 0 0; }
.page-head + section { border-top: 0; padding-top: 40px; }

/* Footer */
.site-footer { background: #151c2c; color: #aab1c0; padding: 48px 0 32px; font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer .logo { color: #fff; }
.site-footer a { color: #aab1c0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.copyright { width: 100%; border-top: 1px solid #2a3348; padding-top: 20px; margin-top: 8px; }

/* Responsive */
@media (max-width: 860px) {
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; border-top: 1px solid var(--line); }
  .nav .nav-cta { border-radius: 0; }
  .menu-toggle {
    display: block; background: none; border: 1px solid var(--line);
    padding: 6px 12px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
  }
  .hero { padding: 56px 0; }
  .hero .wrap, .split, .split.reverse, .contact-band .grid { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse .photo { order: 2; }
  .cards, .link-cards { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .company th, .company td { display: block; width: auto; padding: 4px 16px; border: 0; }
  .company th { padding-top: 16px; }
  .company td { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .company tr:first-child th { border-top: 1px solid var(--line); }
  .company tr:first-child td { border-top: 0; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
}

/* Motion */
.site-header { transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 4px 20px rgba(29, 36, 51, .08); }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes shine {
  from { transform: translateX(-120%) skewX(-20deg); }
  to   { transform: translateX(260%) skewX(-20deg); }
}
.hero .eyebrow, .hero h1 span, .hero .lead, .hero .btn-row, .hero-figure {
  animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
}
.hero .eyebrow      { animation-delay: .1s; }
.hero h1 span:nth-child(1) { animation-delay: .25s; }
.hero h1 span:nth-child(2) { animation-delay: .4s; }
.hero h1 span:nth-child(3) { animation-delay: .55s; }
.hero .lead         { animation-delay: .75s; }
.hero .btn-row      { animation-delay: .9s; }
.hero-figure        { animation-delay: .5s; position: relative; overflow: hidden; }
.hero-figure::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: shine 1.4s ease-in-out 1.4s both;
  pointer-events: none;
}

/* スクロールで表示（JSが有効なときだけ隠す） */
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .section-head h1::after, .js .section-head h2::after {
  width: 0; transition: width .9s ease .3s;
}
.js .section-head.is-visible h1::after, .js .section-head.is-visible h2::after { width: 40px; }

/* ホバー */
.link-card { transition: border-color .3s, transform .3s, box-shadow .3s; }
.link-card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(29, 36, 51, .1); }
.link-card .thumb img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.link-card:hover .thumb img { transform: scale(1.06); }
.link-card .more::after { display: inline-block; transition: transform .3s; }
.link-card:hover .more::after { transform: translateX(6px); }
.photo { overflow: hidden; }
.photo img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.photo:hover img { transform: scale(1.04); }
.btn { position: relative; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .section-head h1::after, .js .section-head h2::after { width: 40px; }
}
