﻿/* ============================================================
   DENJA - Engineering / Industrial Design System
   Light "engineering paper" · hairlines · mono annotations
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* --- Surfaces --- */
  --paper:        #ECEAE3;   /* warm engineering paper (page bg) */
  --paper-2:      #E3E0D7;   /* slightly deeper panel */
  --card:         #FBFAF6;   /* near-white card */
  --card-edge:    #FFFFFF;

  /* --- Ink --- */
  --ink:          #15171C;   /* technical drawing ink (near-black) */
  --ink-2:        #44474F;   /* secondary text */
  --ink-3:        #797C84;   /* tertiary / captions */

  /* --- Lines --- */
  --line:         rgba(21,23,28,0.14);
  --line-strong:  rgba(21,23,28,0.30);
  --line-faint:   rgba(21,23,28,0.07);

  /* --- Accent: signal red-orange --- */
  --signal:       #DE4124;
  --signal-deep:  #C1301C;
  --signal-tint:  rgba(222,65,36,0.10);

  /* --- Secondary technical colors (sparse) --- */
  --steel:        #2C5C82;   /* engineering blue, data */
  --steel-tint:   rgba(44,92,130,0.10);
  --good:         #2E7D52;   /* positive deltas */
  --good-tint:    rgba(46,125,82,0.10);

  /* --- Type --- */
  --display: 'Archivo', system-ui, sans-serif;
  --sans:    'IBM Plex Sans', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  /* --- Geometry --- */
  --radius:   8px;
  --radius-lg: 12px;
  --maxw:     1240px;
  --gutter:   clamp(20px, 5vw, 64px);

  --shadow-card: 0 1px 0 rgba(21,23,28,0.04), 0 12px 30px -18px rgba(21,23,28,0.30);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* faint engineering grid */
  background-image:
    linear-gradient(var(--line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  background-position: -1px -1px;
}

::selection { background: var(--signal); color: #fff; }

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

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }

.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ============================================================
   Mono tags / technical annotations
   ============================================================ */
.tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tag::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--signal);
  display: inline-block;
}
.tag--plain::before { display: none; }
.tag--signal { color: var(--signal); }

.coord {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* eyebrow index like [ 01 ] */
.idx {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--signal);
  letter-spacing: 0.08em;
}

/* ============================================================
   Section heading block
   ============================================================ */
.shead { max-width: 760px; }
.shead .tag { margin-bottom: 20px; }
.shead h2 {
  font-size: clamp(30px, 4.4vw, 52px);
}
.shead p {
  margin-top: 20px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-2);
  max-width: 62ch;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  --bg: var(--ink);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--bg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--signal { --bg: var(--signal); --fg: #fff; }
.btn--signal:hover { --bg: var(--signal-deep); }

.btn--ghost {
  --bg: transparent; --fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--card); }

.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--signal) 75%, #fff);
  outline-offset: 3px;
}

/* Subtle button microinteraction on desktop + touch-safe fallback */
.btn--ghost { transition-property: transform, background, border-color, color; }

/* Links and nav microinteraction */
.nav__link {
  position: relative;
  isolation: isolate;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .2s ease;
}

.nav__link:hover::after,
.nav__link:focus-visible::after { transform: scaleX(1); }

/* Reusable reveal state and soft micro lifts */
.reveal {
  --reveal-delay: 0ms;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(2px);
  transition:
    opacity .7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform .7s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter .7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.micro-card {
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.micro-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -18px rgba(21, 23, 28, 0.35);
}

.micro-card:active { transform: translateY(-2px); }

/* Apply soft lift to commonly repeated components */
.service,
.module,
.step,
.person,
.value,
.symptom,
.kpi,
.ba__note,
.case,
.contact-block,
.cta-card,
.booking-section,
.faq-item {
  border-color: var(--line);
}

.service,
.module,
.step,
.person,
.value,
.symptom,
.kpi,
.ba__note,
.case,
.contact-block,
.cta-card,
.booking-section,
.faq-item {
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.service:hover,
.module:hover,
.step:hover,
.person:hover,
.value:hover,
.symptom:hover,
.kpi:hover,
.ba__note:hover,
.case:hover,
.contact-block:hover,
.cta-card:hover,
.booking-section:hover,
.faq-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -18px rgba(21, 23, 28, 0.35);
}

.service:active,
.module:active,
.step:active,
.person:active,
.value:active,
.symptom:active,
.kpi:active,
.ba__note:active,
.case:active,
.contact-block:active,
.cta-card:active,
.booking-section:active,
.faq-item:active {
  transform: translateY(-2px);
}

.faq-item h3 { transition: color .2s ease; }
.faq-item h3:hover { color: var(--signal); }

/* ============================================================
   Header / nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  font-family: var(--display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}
.brand .ja { color: var(--signal); }

.nav__links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav__link {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color .15s ease, background .15s ease;
}
.nav__link:hover { color: var(--ink); background: var(--card); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--signal);
  margin-top: 4px;
}
.nav__cta { margin-left: 10px; }

.nav__burger { display: none; margin-left: auto; padding: 9px 16px; }

.nav__mobile[hidden] { display: none; }
.nav__mobile {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 10px var(--gutter) 18px;
  display: grid;
  gap: 2px;
}
.nav__mobile a {
  font-family: var(--mono);
  font-size: 15px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-faint);
  color: var(--ink);
}
.nav__mobile a:last-child { color: var(--signal); border-bottom: 0; }

.lang-switch {
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.lang-switch__btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
}

.lang-switch__btn.is-active {
  background: var(--ink);
  color: #fff;
}

.lang-switch__btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--signal) 75%, #fff);
  outline-offset: 1px;
}

/* ============================================================
   Cards & panels
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* corner ticks decoration - removed for modern look */
.ticks { position: relative; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--ink);
  color: #C9CBD1;
  border-top: 3px solid var(--signal);
}
.footer a { color: #C9CBD1; }
.footer a:hover { color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-block: 64px;
}
.footer .brand { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: 22px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #8A8D95;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ============================================================
   Utility
   ============================================================ */
.mono { font-family: var(--mono); }
.signal { color: var(--signal); }
.muted { color: var(--ink-2); }
.center { text-align: center; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .lang-switch { margin-left: auto; }
  .lang-switch__btn { padding: 6px 9px; }
}
