/* ============================================================
   POSYANTEK PILAR — Design tokens
   Subject: workshop-built TTG tools (PVC, copper, scrap metal)
   Palette: near-black workshop base, paper cream, moss green,
            copper/rust accent (lifted from the antenna wire),
            faded steel grey.
   Type: JetBrains Mono (technical/spec voice) + Fraunces
         (display serif with personality, used sparingly)
   ============================================================ */

:root {
  --ink: #0B0E0C;
  --ink-soft: #161A17;
  --paper: #F3F0E8;
  --paper-dim: #E7E2D4;
  --moss: #3D5A45;
  --moss-deep: #28392E;
  --copper: #C9692A;
  --copper-bright: #E08438;
  --steel: #8A9A8E;
  --steel-line: rgba(243, 240, 232, 0.14);
  --steel-line-dark: rgba(11, 14, 12, 0.12);

  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-display: 'Fraunces', Georgia, serif;

  --container: 1240px;
  --edge: 6vw;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* subtle paper grain overlay */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(243, 240, 232, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--steel-line-dark);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--edge);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-mark { display: flex; align-items: center; gap: 10px; }
.nav-mark-box {
  font-family: var(--font-mono); font-weight: 800; font-size: 13px;
  background: var(--ink); color: var(--paper);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 3px; letter-spacing: 0.5px;
}
.nav-mark-text {
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  line-height: 1.25; letter-spacing: 0.5px; color: var(--ink);
}
.nav-links { display: flex; gap: 36px; font-size: 13px; font-weight: 500; letter-spacing: 0.3px; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: var(--copper); transition: right 0.25s ease;
}
.nav-links a:hover::after { right: 0; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 110; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px var(--edge) 80px;
  overflow: hidden;
  background: var(--paper);
}
.hero-bg-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(var(--steel-line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--steel-line-dark) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.hero-inner { position: relative; z-index: 2; max-width: 680px; }
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.4px;
  color: var(--moss-deep);
  margin: 0 0 28px;
  text-transform: uppercase;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copper); flex-shrink: 0; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  color: var(--ink);
}
.hero-title-accent { color: var(--copper); font-style: italic; }
.hero-title-ink { color: var(--moss); }
.hero-sub {
  font-size: 15.5px; line-height: 1.7; color: var(--ink-soft);
  max-width: 480px; margin: 0 0 40px; opacity: 0.82;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
  border-radius: 2px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--copper); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.18s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }
.btn-ghost { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.hero-specimen {
  position: absolute;
  right: 6vw; top: 50%; transform: translateY(-50%) rotate(3deg);
  width: min(30vw, 380px);
  border: 1px solid var(--steel-line-dark);
  padding: 10px;
  background: var(--paper-dim);
  box-shadow: 0 30px 60px -20px rgba(11,14,12,0.25);
  display: none;
}
.hero-specimen img { filter: sepia(8%) saturate(85%); }

@media (min-width: 980px) {
  .hero-specimen { display: block; }
}

/* ============================================================
   STAT STRIP
   ============================================================ */
.stat-strip { background: var(--ink); color: var(--paper); }
.stat-strip-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 36px var(--edge);
  display: grid; grid-template-columns: repeat(7, auto);
  align-items: center; gap: 0 28px;
  overflow-x: auto;
}
.stat-item { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--copper-bright); }
.stat-label { font-size: 11px; line-height: 1.4; color: var(--steel); letter-spacing: 0.2px; }
.stat-divider { width: 1px; height: 36px; background: var(--steel-line); }

/* ============================================================
   SECTION HEADERS (shared)
   ============================================================ */
.section-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: var(--copper); margin: 0 0 16px;
}
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15; margin: 0 0 20px; color: var(--ink);
}
.section-desc {
  font-size: 14.5px; line-height: 1.75; color: var(--ink-soft);
  opacity: 0.82; max-width: 560px;
}

.alat-intro {
  max-width: var(--container); margin: 0 auto;
  padding: 110px var(--edge) 60px;
}

/* ============================================================
   TOOL ARTICLES
   ============================================================ */
.tool {
  max-width: var(--container); margin: 0 auto;
  padding: 70px var(--edge);
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center;
  border-top: 1px solid var(--steel-line-dark);
}
.tool-02 .tool-info { order: 2; }
.tool-02 .tool-media { order: 1; }
.tool-04 .tool-info { order: 2; }
.tool-04 .tool-media { order: 1; }

.tool-media-frame {
  position: relative;
  border: 1px solid var(--steel-line-dark);
  background: var(--ink);
  padding: 14px;
  box-shadow: 0 24px 50px -28px rgba(11,14,12,0.35);
}
.tool-media-frame img { width: 100%; height: 420px; object-fit: cover; }
.tool-media-frame-wide img { height: 340px; object-fit: cover; }
.tool-media-tag {
  position: absolute; top: 26px; left: 26px;
  background: var(--paper); color: var(--ink);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px;
  padding: 5px 10px;
}

.tool-index {
  display: inline-block;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.6px;
  color: var(--moss); margin-bottom: 18px;
}
.tool-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.12; margin: 0 0 14px; color: var(--ink);
}
.tool-tagline {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 16px; color: var(--copper); margin: 0 0 22px; line-height: 1.5;
}
.tool-desc {
  font-size: 14px; line-height: 1.75; color: var(--ink-soft);
  opacity: 0.85; margin: 0 0 28px;
}

.tool-specs {
  border-top: 1px solid var(--steel-line-dark);
  margin-bottom: 26px;
}
.spec-row {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--steel-line-dark);
  font-size: 12.5px;
}
.spec-k { color: var(--steel); flex-shrink: 0; }
.spec-v { color: var(--ink); text-align: right; font-weight: 500; }

.tool-benefits { display: flex; flex-direction: column; gap: 10px; }
.tool-benefits li {
  list-style: none;
  position: relative;
  padding-left: 20px;
  font-size: 13px; line-height: 1.6; color: var(--ink-soft);
}
.tool-benefits li::before {
  content: '＋';
  position: absolute; left: 0; top: 0;
  color: var(--copper); font-weight: 700; font-size: 13px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--moss-deep); color: var(--paper); }
.about-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 110px var(--edge);
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 60px;
  align-items: start;
}
.about .section-tag { color: var(--copper-bright); }
.about .section-title { color: var(--paper); }
.about .section-desc { color: var(--paper); opacity: 0.78; }

.about-points { margin-top: 40px; display: flex; flex-direction: column; gap: 22px; }
.about-point { display: flex; gap: 18px; align-items: flex-start; }
.about-point-num {
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  color: var(--copper-bright); border: 1px solid var(--steel-line);
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.about-point p { margin: 0; font-size: 13.5px; line-height: 1.6; opacity: 0.88; padding-top: 4px; }

.about-visual { display: flex; justify-content: center; align-items: center; }
.about-visual-card {
  border: 1px solid var(--steel-line);
  width: 100%; aspect-ratio: 1; max-width: 280px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background:
    radial-gradient(circle at 30% 30%, rgba(201,105,42,0.18), transparent 60%),
    repeating-linear-gradient(45deg, rgba(243,240,232,0.05) 0 2px, transparent 2px 14px);
}
.about-visual-mono { font-size: 11px; letter-spacing: 1px; color: var(--steel); }

/* ============================================================
   CTA
   ============================================================ */
.cta { background: var(--paper); text-align: center; }
.cta-inner { max-width: 720px; margin: 0 auto; padding: 120px var(--edge); }
.cta-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 20px;
}
.cta-sub { font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); opacity: 0.82; margin: 0 0 40px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: var(--paper); }
.footer-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 50px var(--edge) 40px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.footer-mark { display: flex; align-items: center; gap: 10px; }
.footer-mark .nav-mark-box { background: var(--paper); color: var(--ink); }
.footer-mark .nav-mark-text { color: var(--paper); }
.footer-loc { font-size: 12.5px; color: var(--steel); margin: 0; }
.footer-copy { font-size: 11px; color: rgba(243,240,232,0.4); margin: 0; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(280px, 80vw);
    background: var(--paper); flex-direction: column; gap: 0;
    padding: 100px 32px 32px;
    transform: translateX(100%); transition: transform 0.3s ease;
    box-shadow: -10px 0 30px rgba(11,14,12,0.1);
    font-size: 16px;
    display: flex;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--steel-line-dark); }
  .nav-toggle { display: flex; }
  .tool { grid-template-columns: 1fr; gap: 36px; }
  .tool-02 .tool-info, .tool-04 .tool-info { order: 1; }
  .tool-02 .tool-media, .tool-04 .tool-media { order: 2; }
  .tool-media-frame img, .tool-media-frame-wide img { height: 300px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { display: none; }
  .stat-strip-inner { grid-template-columns: repeat(7, auto); justify-content: flex-start; }
}

@media (max-width: 640px) {
  .hero { padding-top: 110px; min-height: auto; }
  .hero-title { font-size: 2.2rem; }
  .stat-divider:nth-of-type(2) { display: none; }
  .tool { padding: 50px var(--edge); }
  .spec-row { font-size: 11.5px; }
}
