/* Pelentong Electronic Industries — site styles
   Layout: white pages, one 1200px column, tinted bands for alternating sections.
   Brand: black wire-and-pulse logo, copper accent for the conductor. */
:root {
  --bg: #FFFFFF;
  --ink: #111613;        /* headings, logo black */
  --body: #3F4642;       /* running text */
  --muted: #5C635E;      /* captions, labels */
  --line: #E2E4E2;       /* hairlines, card borders */
  --tint: #F5F6F5;       /* section bands, cards */
  --copper: #B4531C;     /* accent: eyebrows, links, terminals */
  --copper-dark: #8E3F14;
  --on-accent: #FFFFFF;
  --display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --text: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --wrap: 1200px;
  --radius: 8px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: var(--text); font-size: 17px; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--copper); text-underline-offset: 3px; }
a:hover { color: var(--copper-dark); }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0; }
.wrap {
  max-width: calc(var(--wrap) + 2 * 32px); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }

/* labels */
.eyebrow {
  font-family: var(--display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--copper);
}
.mono { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--body); max-width: 62ch; }
.muted { color: var(--muted); }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(255,255,255,0.96); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 10px; }
.brand img { width: 108px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--text); font-size: 0.95rem; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { background: var(--tint); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--copper); }
.nav .btn { margin-left: 8px; }
.menu-toggle {
  display: none; font: 600 0.95rem var(--text); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; cursor: pointer;
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg);
    flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 12px 0 0; text-align: center; }
}

/* buttons */
.btn {
  display: inline-block; font: 600 0.98rem var(--text); text-decoration: none; cursor: pointer;
  padding: 12px 20px; border-radius: 6px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
}
.btn:hover { background: #2A322D; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); }
.nav a.btn { color: #fff; padding: 9px 16px; }
.nav a.btn:hover { background: #2A322D; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* sections */
section { padding-block: 72px; }
.band { background: var(--tint); }
.sec-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split.wide-left { grid-template-columns: 1.2fr 1fr; } .split.wide-right { grid-template-columns: 1fr 1.3fr; } }
.split > * { min-width: 0; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack ul { margin: 0; padding-left: 1.2em; }
.stack li + li { margin-top: 4px; }

/* page hero (inner pages) */
.page-hero { padding-block: 56px 40px; border-bottom: 1px solid var(--line); }
.page-hero .stack > * { max-width: 820px; }

/* home hero */
.hero {
  position: relative; padding-block: 88px 96px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.93) 42%, rgba(255,255,255,0.42) 72%, rgba(255,255,255,0.06) 100%),
    url("../img/building.jpg") 70% 55% / cover no-repeat;
}
.hero .stack { max-width: 640px; gap: 22px; }
.hero .lead { color: #2F3531; }
@media (max-width: 760px) {
  .hero { background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.88)), url("../img/building.jpg") 70% 50% / cover no-repeat; padding-block: 56px 64px; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li {
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink); background: rgba(255,255,255,0.8);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stats div { padding: 24px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.stats dt { font-family: var(--display); font-size: 2.3rem; font-weight: 700; color: var(--ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
.stats dt span { color: var(--copper); }
.stats dd { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.4; }

/* cards */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.band .card { background: var(--bg); }
.card figure { margin: 0; background: #fff; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.card figure img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.card figure.photo img { object-fit: cover; object-position: center 35%; padding: 0; }
.card figure.zoom-out img { width: auto; height: 50%; padding: 0; }
.gallery img, .plain img { background: var(--tint); }
.card .body { padding: 22px; display: grid; gap: 8px; align-content: start; flex: 1; }
.card a.more { font-weight: 600; text-decoration: none; margin-top: 6px; }
.card a.more::after { content: " →"; }

/* wire timeline (process) */
.wire { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: step; position: relative; }
.wire li { position: relative; padding-left: 40px; counter-increment: step; }
.wire li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--copper); }
.wire li::after { content: ""; position: absolute; left: 12px; top: 22px; bottom: -26px; width: 2px; background: var(--copper); }
.wire li:last-child::after { display: none; }
.wire .num { font-family: var(--mono); font-size: 0.8rem; color: var(--copper); }
.wire .num::before { content: counter(step, decimal-leading-zero); }
.wire h3 { font-size: 1.1rem; margin-top: 2px; }
.wire p { color: var(--muted); font-size: 0.95rem; }
@media (min-width: 900px) {
  .wire { grid-template-columns: repeat(var(--steps, 5), 1fr); gap: 16px; padding-top: 34px; }
  .wire li { padding-left: 0; text-align: center; }
  .wire li::before { left: 50%; top: -34px; transform: translateX(-50%); width: 16px; height: 16px; }
  .wire li::after { left: 50%; right: auto; top: -27px; bottom: auto; width: calc(100% + 16px); height: 2px; }
  .wire li:last-child::after { display: none; }
}

/* gallery */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 0; padding: 0; list-style: none; }
.gallery figure { margin: 0; display: grid; gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.gallery figcaption { font-size: 0.9rem; color: var(--muted); }

/* figure blocks */
.frame { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.frame img { width: 100%; }
.frame figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.plain { margin: 0; }
.plain figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.rounded { border-radius: var(--radius); }

/* feature rows (industrial page) */
.features { display: grid; gap: 0; }
.feature { display: grid; gap: 28px; align-items: center; padding-block: 40px; border-top: 1px solid var(--line); }
.feature:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .feature { grid-template-columns: 1.15fr 1fr; gap: 56px; } .feature.flip > :first-child { order: 2; } }
.feature > * { min-width: 0; }
.feature .art { display: grid; place-items: center; }
.feature .art img { max-height: 320px; width: auto; }

/* facts list */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.facts dt { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; color: var(--ink); }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }

/* certificates */
.certs { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cert { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 24px; display: grid; gap: 14px; align-content: start; }
.cert img { width: 100%; }
.cert .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.cert .note { font-size: 0.8rem; font-style: italic; color: var(--muted); }

/* brands */
.brands { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; list-style: none; margin: 0; }
.brands img { height: 34px; width: auto; max-width: 130px; object-fit: contain; }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: 0.8rem; font-weight: 500; color: var(--muted); background: var(--tint); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* news */
.news { display: grid; gap: 0; }
.news article { display: grid; gap: 24px; padding-block: 40px; border-top: 1px solid var(--line); }
.news article:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .news article { grid-template-columns: 180px 1fr 1fr; gap: 40px; align-items: start; } }
.news article > * { min-width: 0; }
.news time { font-family: var(--mono); font-size: 0.85rem; color: var(--copper); }

/* contact */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.contact-grid > * { min-width: 0; }
form { display: grid; gap: 16px; }
.row2 { display: grid; gap: 16px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--ink); }
label input, label textarea { display: block; margin-top: 6px; }
label .req { color: var(--copper); }
input, textarea {
  font: 400 1rem var(--text); color: var(--ink); background: #fff; width: 100%;
  border: 1px solid #C9CDCA; border-radius: 6px; padding: 11px 12px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--copper); outline-offset: 0; border-color: var(--copper); }
.form-status { font-size: 0.95rem; padding: 12px 14px; border-radius: 6px; background: var(--tint); color: var(--ink); }
.form-status[data-state="error"] { background: #FBEDE6; color: #6E2E0D; }
.hp { position: absolute; left: -9999px; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 18px; background: var(--bg); }
.contact-card address { font-style: normal; color: var(--ink); line-height: 1.55; }
.copyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.copyrow .value { color: var(--ink); font-weight: 600; user-select: all; }
.copy-btn { font: 500 0.8rem var(--mono); color: var(--muted); background: var(--tint); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; cursor: pointer; }

/* CTA band */
.cta { background: var(--ink); color: #E7EAE8; }
.cta h2 { color: #fff; }
.cta .eyebrow { color: #E5793B; }
.cta .lead { color: #C9CEC9; }
.cta .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta .btn:hover { background: #E7EAE8; }
.cta .btn-ghost { background: transparent; color: #fff; border-color: #6B736E; }
.cta .btn-ghost:hover { background: #1F2723; color: #fff; }
.cta .split { align-items: end; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 28px; font-size: 0.93rem; }
.foot { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.foot h3 { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--copper); }
.foot address { font-style: normal; color: var(--body); }
.foot .brand img { width: 120px; margin-bottom: 12px; }
.legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 0.85rem; }
.gallery.three { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
