/* Kinkalteck — steel, rack blue, safety yellow */
:root {
  --bg: #f4f6f7;
  --surface: #ffffff;
  --ink: #17202a;
  --ink-2: #4a5866;
  --line: #c9d1d8;
  --rack: #1f5fa8;
  --rack-deep: #154a86;
  --safety: #f2b705;
  --safety-deep: #b58800;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1180px;
  --narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--rack); text-underline-offset: 0.18em; }
a:hover { color: var(--rack-deep); }
:focus-visible { outline: 3px solid var(--rack); outline-offset: 2px; }

h1, h2 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: 0; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); margin-top: 1.6em; }
h3 { font: 600 1.3rem/1.25 var(--text); margin: 0 0 0.4em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.35rem/1 var(--display); }

/* Buttons */
.btn { display: inline-block; padding: 13px 22px; border-radius: 4px; font: 600 1rem/1.2 var(--text); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--rack); color: #fff; }
.btn-primary:hover { background: var(--rack-deep); color: #fff; }
.btn-ghost { border-color: var(--rack); color: var(--rack); background: transparent; }
.btn-ghost:hover { background: rgba(31, 95, 168, 0.08); }
.btn-sm { padding: 9px 16px; font-size: 0.95rem; }
.text-link { font-weight: 600; }

/* Hero */
.hero { background: var(--surface); padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.hero-copy h1 { max-width: 13ch; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-figure { margin: 0; }

/* Elevation drawing */
.elevation { width: 100%; font-family: var(--text); }
.elevation .rack line { stroke: var(--rack); stroke-width: 2.5; }
.elevation .rack .beam { stroke-width: 1.5; }
.elevation .cassette rect { fill: #e6ebef; stroke: var(--ink-2); stroke-width: 1; }
.elevation .cassette line { stroke: #8f9ba6; stroke-width: 1; }
.elevation .cassette.is-live rect { fill: var(--safety); stroke: var(--safety-deep); }
.elevation .cassette.is-live line { stroke: var(--safety-deep); }
.elevation .slot-empty rect { fill: none; stroke: var(--line); stroke-dasharray: 4 3; }
.elevation .cable { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.elevation .machine rect, .elevation .machine line { fill: #d7dde2; stroke: var(--ink); stroke-width: 1.25; }
.elevation .machine .table { fill: var(--ink-2); stroke: none; }
.elevation .floor { stroke: var(--ink); stroke-width: 2; }
.elevation .dim line { stroke: var(--ink-2); stroke-width: 1; }
.elevation .dim-head { fill: var(--ink-2); }
.elevation .dim-bg { fill: var(--surface); }
.elevation .dim-label { font: 600 22px var(--display); fill: var(--ink); }
.elevation .callouts line { stroke: var(--ink-2); stroke-width: 1; }
.elevation .callouts text { font-size: 14px; fill: var(--ink-2); }
.elevation .moving { transform: translateY(0); }
@media (prefers-reduced-motion: no-preference) {
  .elevation .moving { animation: lower 2.6s cubic-bezier(.6, 0, .3, 1) .8s forwards; }
}
@media (prefers-reduced-motion: reduce) {
  .elevation .moving { transform: translateY(132px); }
}
@keyframes lower { to { transform: translateY(132px); } }

/* Nameplate */
.nameplate { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 40px 0 0; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.nameplate::before, .nameplate::after { content: ""; position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.nameplate::before { left: 8px; }
.nameplate::after { right: 8px; }
.nameplate div { padding: 18px 24px; border-left: 1px solid var(--line); }
.nameplate div:first-child { border-left: 0; }
.nameplate dt { font-size: 0.9rem; color: var(--ink-2); }
.nameplate dd { margin: 2px 0 0; font: 600 1.9rem/1.1 var(--display); }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section > .wrap > h2:first-child, .section .split h2:first-child { margin-top: 0; }
.section-lede { color: var(--ink-2); font-size: 1.125rem; }
.problems { list-style: none; padding: 0; margin: 28px 0 0; }
.problems li { padding: 14px 0 14px 20px; border-left: 3px solid var(--rack); margin-bottom: 12px; background: var(--surface); padding-right: 16px; }

.systems { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 24px; }
.system { border-top: 4px solid var(--rack); padding-top: 20px; }
.system h3 a { color: var(--ink); text-decoration: none; }
.system h3 a:hover { color: var(--rack); }
.facts { padding-left: 1.1em; color: var(--ink-2); }
.more-systems { margin-top: 32px; color: var(--ink-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 14px 44px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border: 2px solid var(--rack); border-radius: 50%; display: grid; place-items: center; font: 600 0.95rem/1 var(--display); color: var(--rack); }

/* FAQ */
.faq { margin-top: 40px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* CTA band */
.cta-band { background: var(--rack-deep); color: #fff; padding: 48px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; border-left: 6px solid var(--safety); padding-left: 24px; }
.cta-band h2 { margin: 0 0 0.3em; }
.cta-band p { margin: 0; color: #d7e3f1; max-width: 56ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn-primary { background: var(--safety); color: var(--ink); }
.cta-band .btn-primary:hover { background: #ffc928; color: var(--ink); }
.cta-band .btn-ghost { border-color: #fff; color: #fff; }

/* Inner pages */
.page { padding-top: 40px; padding-bottom: 64px; }
.crumbs { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 20px; }
.crumbs a { color: var(--ink-2); }
.table-wrap { overflow-x: auto; margin: 16px 0 24px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 1rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: #e3e8ec; font-weight: 600; }
table.spec th { width: 42%; font-weight: 500; color: var(--ink-2); }
table.spec td { font-weight: 600; }
.prose h2 { font-size: 1.8rem; }
.prose ul, .prose ol, .page ul, .page ol { padding-left: 1.2em; }
.prose li, .page li { margin-bottom: 6px; }
.byline { color: var(--ink-2); font-size: 0.95rem; }
.post-list { list-style: none; padding: 0; }
.post-list li { border-top: 1px solid var(--line); padding: 20px 0; }
.post-title { font: 600 1.6rem/1.15 var(--display); }
.post-list p { margin: 6px 0; color: var(--ink-2); }
.post-list time { font-size: 0.9rem; color: var(--ink-2); }
code { font-size: 0.95em; }
blockquote { margin: 0 0 1em; padding-left: 16px; border-left: 3px solid var(--line); color: var(--ink-2); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 7fr 4fr; gap: 56px; }
.enquiry { display: grid; gap: 16px; margin-top: 24px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.enquiry label { display: grid; gap: 6px; font-weight: 500; font-size: 0.98rem; }
.opt { color: var(--ink-2); font-weight: 400; }
.enquiry input, .enquiry select, .enquiry textarea { font: inherit; padding: 11px 12px; border: 1px solid #9aa7b3; border-radius: 4px; background: var(--surface); color: var(--ink); width: 100%; }
.enquiry button { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.fine { font-size: 0.9rem; color: var(--ink-2); }
.contact-side { border-left: 1px solid var(--line); padding-left: 32px; }
.contact-side h2:first-child { margin-top: 8px; }
.contact-side ul { list-style: none; padding: 0; }

/* Footer */
.site-footer { background: var(--ink); color: #c4ced7; padding: 48px 0 24px; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand { color: #fff; font: 600 1.3rem/1.2 var(--display); }
.footer-h { color: #fff; font-weight: 600; margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-base { border-top: 1px solid #2f3b47; margin-top: 32px; padding-top: 16px; }
.wa-float { position: fixed; right: 16px; bottom: 16px; background: #1f8f4e; color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .systems, .split, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .hero-grid { gap: 28px; }
  .nameplate { grid-template-columns: 1fr 1fr; }
  .nameplate div:nth-child(3) { border-left: 0; }
  .nameplate div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .contact-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .row2 { grid-template-columns: 1fr; }
  .nameplate dd { font-size: 1.6rem; }
  .section { padding: 48px 0; }
}

/* ===== v2: photo-led layout, utility bar, mobile menu ===== */
.utility { background: var(--ink); color: #b9c4ce; font-size: 0.85rem; }
.utility-inner { display: flex; justify-content: space-between; gap: 16px; min-height: 34px; align-items: center; }
.utility a { color: #e6edf3; text-decoration: none; }
.utility a:hover { color: #fff; text-decoration: underline; }
.utility-links { display: flex; gap: 20px; }
.site-header { position: sticky; top: 0; z-index: 20; }
.brand img { width: 96px; height: auto; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.mobile-menu { display: none; }
.footer-logo { background: #fff; border-radius: 4px; padding: 6px 8px; width: 112px; height: auto; margin-bottom: 14px; }
.btn-yellow { background: var(--safety); color: var(--ink); }
.btn-yellow:hover { background: #ffc928; color: var(--ink); }

/* Hero with real photo */
.hero-grid { grid-template-columns: 6fr 6fr; }
.hero-note { margin-top: 18px; font-size: 0.95rem; color: var(--ink-2); }
.hero-photo { margin: 0; }
.hero-photo img, .hero-photo picture { width: 100%; border-radius: 6px; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-photo figcaption, .before-photos figcaption { font-size: 0.85rem; color: var(--ink-2); margin-top: 8px; }

/* Material selector */
.materials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }
.material { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; color: var(--ink); text-decoration: none; }
.material picture img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.material-name { font: 600 1.35rem/1.15 var(--display); padding: 14px 16px 2px; }
.material-note { color: var(--ink-2); font-size: 0.95rem; padding: 0 16px 16px; }
.material:hover { border-color: var(--rack); }
.material:hover .material-name { color: var(--rack); }
.material-text { justify-content: flex-end; background: var(--rack-deep); border-color: var(--rack-deep); color: #fff; padding-bottom: 4px; }
.material-text .material-note { color: #d7e3f1; }
.material-text .text-link { color: var(--safety); padding: 0 16px 16px; }
.material-text:hover .material-name { color: #fff; }

/* Problems with "before" photos */
.problem-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
.problem-grid h2 { margin-top: 0; }
.problems li { background: var(--bg); }
.before-photos { display: grid; gap: 20px; }
.before-photos figure { margin: 0; }
.before-photos img { width: 100%; border-radius: 6px; aspect-ratio: 16 / 9; object-fit: cover; filter: saturate(0.7); }

/* Embedded layout explainer */
.embed-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: center; }
.embed-grid h2 { margin-top: 0; }
.embed-figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.checks { list-style: none; padding: 0; margin: 20px 0 24px; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 9px; border-left: 3px solid var(--rack); border-bottom: 3px solid var(--rack); transform: rotate(-45deg); }

/* Systems with photos */
.system { border-top: 0; padding-top: 0; background: var(--bg); border-radius: 6px; overflow: hidden; padding-bottom: 24px; }
.system > *:not(.system-photo) { margin-left: 24px; margin-right: 24px; }
.system-photo { display: block; margin-bottom: 20px; }
.system-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.system h3 { font: 600 1.7rem/1.1 var(--display); }

/* Software */
.software-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.software-grid h2 { margin-top: 0; }
.screen { margin: 0; border-radius: 8px; overflow: hidden; border: 8px solid var(--ink); background: var(--ink); }
.screen img { width: 100%; }

/* Dark Singapore band */
.section-dark { background: var(--ink); color: #dbe3ea; }
.section-dark h2 { color: #fff; }
.section-dark .steps li::before { border-color: var(--safety); color: var(--safety); }
.section-dark strong { color: #fff; }

/* Guides */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-head h2 { margin: 0 0 16px; }
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guide-list a { display: block; height: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--rack); border-radius: 4px; text-decoration: none; color: var(--ink); }
.guide-list a:hover { border-color: var(--rack); }
.guide-title { display: block; font: 600 1.35rem/1.15 var(--display); margin-bottom: 8px; }
.guide-desc { color: var(--ink-2); font-size: 0.95rem; }

/* Product gallery */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; margin: 28px 0 8px; }
.gallery picture { display: block; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.gallery .g-main { grid-row: 1 / span 2; }

@media (max-width: 1080px) {
  .main-nav { gap: 16px; font-size: 0.95rem; }
}
@media (max-width: 900px) {
  .main-nav, .header-cta { display: none; }
  .mobile-menu { display: block; margin-left: auto; position: relative; }
  .mobile-menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 8px 14px; border: 2px solid var(--rack); border-radius: 4px; color: var(--rack); }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu[open] summary { background: var(--rack); color: #fff; }
  .mobile-menu nav { position: absolute; right: 0; top: calc(100% + 10px); width: min(84vw, 320px); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 12px; display: grid; gap: 4px; box-shadow: 0 12px 28px rgba(23, 32, 42, 0.18); }
  .mobile-menu nav a { padding: 10px 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
  .mobile-menu nav .btn { margin-top: 8px; text-align: center; color: #fff; }
  .utility-inner > span:first-child { display: none; }
  .utility-inner { justify-content: flex-end; }
  .materials { grid-template-columns: 1fr 1fr; }
  .hero-grid, .problem-grid, .embed-grid, .software-grid { grid-template-columns: 1fr; gap: 28px; }
  .before-photos { grid-template-columns: 1fr 1fr; }
  .guide-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; min-height: 60px; }
  .materials { grid-template-columns: 1fr; }
  .material picture img { aspect-ratio: 16 / 9; }
  .before-photos { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .gallery .g-main { grid-column: 1 / span 2; grid-row: auto; }
  .utility-links a:last-child { display: none; }
  .embed-figure { padding: 10px; }
}
