/* =========================================================
   TECNOPLANT INC. — Site Stylesheet
   Design concept: Blueprint / Industrial precision
   ========================================================= */

:root {
  /* Color */
  --c-bg: #eef1f0;
  --c-bg-alt: #e2e8e7;
  --c-paper: #ffffff;
  --c-ink: #16212a;
  --c-ink-soft: #4a5860;
  --c-navy: #1c2b35;
  --c-navy-soft: #26394650;
  --c-steel: #3d5a73;
  --c-signal: #ff6a13;
  --c-signal-dark: #d95700;
  --c-line: #c7d0d2;
  --c-line-on-navy: #3f4f59;

  /* Type */
  --f-display: "Big Shoulders Display", "Hiragino Sans", sans-serif;
  --f-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-mono: "JetBrains Mono", "Courier New", monospace;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--c-navy);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-signal-dark);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--c-signal);
}

.section-heading {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.3;
  margin-bottom: 8px;
}

.section-lead {
  color: var(--c-ink-soft);
  max-width: 640px;
  margin-top: 16px;
}

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

/* ---------- Blueprint corner-tick utility ---------- */
.blueprint {
  position: relative;
}
.blueprint::before,
.blueprint::after,
.blueprint > .tick-br,
.blueprint > .tick-bl {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--c-steel);
  opacity: 0.55;
}
.blueprint::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.blueprint::after { top: -1px; right: -1px; border-left: none; border-bottom: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  font-family: var(--f-mono);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn-signal {
  background: var(--c-signal);
  border-color: var(--c-signal);
  color: var(--c-navy);
  font-weight: 700;
}
.btn-signal:hover { background: var(--c-signal-dark); border-color: var(--c-signal-dark); transform: translateY(-1px); }
.btn-outline-light {
  color: #eef1f0;
  border-color: #5a6b74;
}
.btn-outline-light:hover { background: #24343f; }
.btn-outline-dark {
  color: var(--c-navy);
  border-color: var(--c-navy);
}
.btn-outline-dark:hover { background: var(--c-navy); color: #fff; }

/* ---------- Header ----------
   Two-row layout: brand + phone on row 1, nav + CTA on row 2.
   On narrow screens row 2 collapses into a hamburger overlay and
   row 1 gets a compact icon-only CTA instead. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(238, 241, 240, 0.98);
  border-bottom: 1px solid var(--c-line);
}
/* NOTE: intentionally no backdrop-filter here — it would establish a
   containing block for position:fixed descendants (like .main-nav's
   mobile menu) and break its full-height overlay. */

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.header-top-right { display: flex; align-items: center; gap: 24px; flex: none; }

.header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0 18px;
  border-top: 1px solid var(--c-line);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark svg { width: 30px; height: 30px; color: var(--c-signal); flex: none; }
.brand-name {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--c-navy);
  letter-spacing: 0.02em;
  /* Never truncated — if space runs out it wraps to a second line
     rather than hiding part of the company name. */
  white-space: normal;
}
.brand-sub {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--c-ink-soft);
  padding-left: 40px;
}

.tel-block {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
}
.tel-block svg { width: 18px; height: 18px; color: var(--c-signal); }
.tel-number { font-size: 18px; font-weight: 700; color: var(--c-navy); line-height: 1.1; }
.tel-hours { font-size: 10.5px; color: var(--c-ink-soft); }

.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--c-ink);
  position: relative;
  padding-bottom: 4px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--c-signal);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }

/* Two CTA variants: full-text one lives in row 2 for desktop,
   icon-only one lives in row 1 for mobile. Only one is shown at a time. */
.btn-cta-mobile { display: none; }
.btn-cta-desktop { display: inline-flex; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--c-line);
  background: transparent;
  align-items: center;
  justify-content: center;
  flex: none;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--c-navy);
  color: #eef1f0;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--c-line-on-navy) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-line-on-navy) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, transparent, black 15%, black 80%, transparent);
}
.hero-inner {
  position: relative;
  padding: 128px 0 108px;
  display: grid;
  gap: 28px;
}
.hero-tag {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9fb0b8;
}
.hero-tag strong { color: var(--c-signal); font-weight: 700; }
.hero h1 {
  color: #f4f6f5;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.2;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--c-signal);
}
.hero-en {
  font-family: var(--f-mono);
  font-size: 13.5px;
  color: #7f929b;
  letter-spacing: 0.04em;
}
.hero-actions { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }

.hero-coords {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: #64767f;
  letter-spacing: 0.05em;
  text-align: right;
}

/* ---------- Section base ---------- */
.section { padding: 108px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-navy { background: var(--c-navy); color: #dfe6e5; }
.section-navy .section-heading { color: #f4f6f5; }
.section-navy .section-lead { color: #a9b6ba; }

/* ---------- Greeting ---------- */
.greeting-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}
.greeting-body p { margin: 0 0 20px; color: var(--c-ink-soft); }
.greeting-sign {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--c-navy);
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
  display: inline-block;
}
.greeting-media { position: relative; padding: 24px; }
.greeting-media .ph { aspect-ratio: 4/3; }
.spec-tag {
  position: absolute;
  bottom: 0; left: 24px;
  transform: translateY(50%);
  background: var(--c-navy);
  color: #eef1f0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
}

/* ---------- Placeholder image block ---------- */
.ph {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, #dbe3e2, #cbd6d5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--c-steel);
  overflow: hidden;
}
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(61,90,115,0.08) 0 2px, transparent 2px 14px);
}
.ph svg { width: 42px; height: 42px; position: relative; }
.ph-label {
  position: relative;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-steel);
  text-align: center;
  padding: 0 12px;
}

/* ---------- Business cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
}
.service-card .ph { height: 190px; }
.service-card-body { padding: 26px 26px 30px; }
.service-code {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--c-signal-dark);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}
.service-card h3 { font-size: 20px; margin-bottom: 10px; }
.service-card p { color: var(--c-ink-soft); font-size: 14.5px; margin: 0; }

/* ---------- Facility grid ---------- */
.facility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.facility-card { position: relative; }
.facility-card .ph { height: 240px; }
.facility-name {
  position: absolute;
  left: 0; bottom: 0;
  background: rgba(28, 43, 53, 0.88);
  color: #eef1f0;
  padding: 10px 18px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.facility-note {
  margin-top: 20px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-ink-soft);
}

/* ---------- Recruit ---------- */
.recruit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.recruit-copy p { color: #b7c2c5; margin: 0 0 20px; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-line-on-navy);
  vertical-align: top;
}
.section-navy .spec-table th, .section-navy .spec-table td {
  border-bottom: 1px solid var(--c-line-on-navy);
}
.spec-table th {
  font-family: var(--f-mono);
  font-weight: 500;
  width: 34%;
  color: var(--c-signal);
  letter-spacing: 0.04em;
  font-size: 12.5px;
  text-transform: uppercase;
}
.recruit-cta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--c-line-on-navy);
}
.recruit-cta p { color: #dfe6e5; margin: 0 0 18px; }

/* ---------- Contact teaser ---------- */
.contact-band {
  background: var(--c-signal);
  color: var(--c-navy);
}
.contact-band .section { padding: 76px 0; }
.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.contact-inner h2 { color: var(--c-navy); font-size: clamp(26px, 3.4vw, 34px); }
.contact-inner p { margin: 10px 0 0; max-width: 46ch; }
.contact-phone-big {
  font-family: var(--f-mono);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
}
.contact-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ---------- Company profile ---------- */
.profile-table {
  width: 100%;
  border-collapse: collapse;
}
.profile-table th, .profile-table td {
  text-align: left;
  padding: 20px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 15px;
}
.profile-table th {
  width: 220px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-steel);
  vertical-align: top;
  padding-top: 22px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-navy);
  color: #9fb0b8;
  padding: 72px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--c-line-on-navy);
}
.footer-brand .brand-name { color: #f4f6f5; }
.footer-brand .brand-mark svg { color: var(--c-signal); }
.footer-addr {
  margin-top: 18px;
  font-size: 14px;
  line-height: 2;
}
.footer-nav { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-nav h4 {
  color: #6f838c;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-nav ul { display: grid; gap: 12px; }
.footer-nav a { font-size: 14.5px; }
.footer-nav a:hover { color: var(--c-signal); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: #5f727b;
}

/* ---------- Page header (news / contact) ---------- */
.page-hero {
  background: var(--c-navy);
  color: #eef1f0;
  padding: 74px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero .hero-grid { opacity: 0.25; }
.page-hero h1 {
  position: relative;
  color: #f4f6f5;
  font-size: clamp(32px, 4.4vw, 48px);
}
.breadcrumb {
  position: relative;
  font-family: var(--f-mono);
  font-size: 12px;
  color: #8a9aa2;
  margin-top: 14px;
}
.breadcrumb a:hover { color: var(--c-signal); }

/* ---------- News list ---------- */
.news-list { border-top: 1px solid var(--c-line); }
.news-item {
  display: grid;
  grid-template-columns: 160px 100px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--c-line);
}
.news-date { font-family: var(--f-mono); font-size: 13.5px; color: var(--c-ink-soft); }
.news-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--c-signal-dark);
  border: 1px solid var(--c-signal);
  padding: 3px 9px;
  width: fit-content;
}
.news-title { font-size: 15.5px; }
.news-title a:hover { color: var(--c-signal-dark); }
.news-placeholder-note {
  margin-top: 36px;
  padding: 18px 22px;
  background: var(--c-bg-alt);
  border-left: 3px solid var(--c-signal);
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--c-ink-soft);
  line-height: 1.9;
}

/* ---------- Contact form ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
}
.contact-side .side-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--c-line);
}
.contact-side .side-block:first-child { padding-top: 0; }
.side-label {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-steel);
  margin-bottom: 10px;
}
.side-phone { font-family: var(--f-mono); font-size: 24px; font-weight: 700; color: var(--c-navy); }
.side-hours { color: var(--c-ink-soft); font-size: 13.5px; margin-top: 6px; }

.field { margin-bottom: 26px; }
.field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  color: var(--c-navy);
}
.field label .req {
  color: var(--c-signal-dark);
  margin-left: 6px;
  font-size: 11px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--c-line);
  background: var(--c-paper);
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--c-ink);
  border-radius: var(--radius);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--c-signal);
  outline-offset: 1px;
  border-color: var(--c-signal);
}
.field textarea { min-height: 160px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-note {
  font-size: 12.5px;
  color: var(--c-ink-soft);
  margin-bottom: 32px;
}
.form-status {
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 13px;
  padding: 14px 16px;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.ok { background: #e6f3ea; color: #256a3f; border-left: 3px solid #2f9e56; }

/* =========================================================
   Responsive
   Breakpoints: 980 (2-col layouts collapse) /
   860 (nav becomes hamburger) / 640 (compact type & spacing) /
   400 (smallest phones)
   ========================================================= */

@media (max-width: 980px) {
  .greeting-grid, .recruit-grid, .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .card-grid { grid-template-columns: 1fr; }
  .facility-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 36px; }
  .footer-nav { gap: 48px; }
  .hero-inner { padding: 104px 0 88px; }
  .facility-card .ph { height: 210px; }
}

@media (max-width: 860px) {
  /* Row 2 (nav + desktop CTA) is removed from normal flow — its only
     job on mobile is to host .main-nav as a fixed full-screen overlay. */
  .header-bottom { display: contents; }
  .header-top { padding: 14px 0; min-height: 64px; }
  .tel-block { display: none; }
  .btn-cta-desktop { display: none; }
  .btn-cta-mobile { display: inline-flex; }
  .nav-toggle { display: flex; }

  .main-nav { display: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .main-nav {
    display: block;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--c-navy);
    padding: 32px var(--gutter);
    z-index: 99;
    overflow-y: auto;
  }
  body.nav-open .main-nav ul { flex-direction: column; gap: 4px; }
  body.nav-open .main-nav a { color: #eef1f0; display: block; padding: 16px 0; border-bottom: 1px solid var(--c-line-on-navy); font-size: 17px; }

  .header-top-right { gap: 10px; }
  .btn-cta-mobile { padding: 10px 14px; font-size: 12px; }
  .nav-toggle { width: 34px; height: 34px; }
  .brand-mark { gap: 8px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .brand-name { font-size: 15px; line-height: 1.2; }
}



@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .hero-inner { padding: 88px 0 64px; gap: 22px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .hero-coords { position: static; margin-top: 40px; text-align: left; padding: 0 20px 28px; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .news-item { grid-template-columns: 1fr; gap: 8px; }
  .contact-inner { flex-direction: column; align-items: flex-start; }
  .contact-actions { width: 100%; }
  .contact-actions .btn { flex: 1; justify-content: center; }
  .brand-sub { display: none; }

  .greeting-media { padding: 16px; }
  .service-card .ph { height: 160px; }
  .facility-card .ph { height: 190px; }

  /* Stack the two-column spec/profile tables into label-over-value rows */
  .spec-table, .profile-table { display: block; }
  .spec-table tr, .profile-table tr { display: block; padding: 16px 0; }
  .spec-table th, .spec-table td,
  .profile-table th, .profile-table td {
    display: block;
    width: 100%;
    padding: 0;
    border-bottom: none;
  }
  .spec-table th, .profile-table th { margin-bottom: 8px; padding-top: 0; }
  .spec-table tr, .profile-table tr { border-bottom: 1px solid var(--c-line); }
  .section-navy .spec-table tr { border-bottom: 1px solid var(--c-line-on-navy); }

  .recruit-cta .btn { width: 100%; justify-content: center; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 30px; }
  .section-heading { font-size: 26px; }
  .btn { padding: 13px 20px; font-size: 12.5px; }
  .tel-number { font-size: 15px; }
  .contact-phone-big { font-size: 22px; }
  .side-phone { font-size: 20px; }
  .footer-nav { gap: 32px; }

  /* Space is tightest here — go icon-only on the header CTA so the
     full company name always keeps its room on one line. */
  .brand-name { font-size: 14px; }
  .header-top { gap: 8px; }
  .header-top-right { gap: 8px; }
  .btn-cta-mobile { padding: 10px !important; }
  .btn-cta-mobile .btn-text { display: none; }
}
