/* ============================================================================
   NIWANA TRADING — Industrial Blueprint design system
   Plain CSS, multi-page. POC build.
   Palette: warm paper · navy ink · brand blue · logo red accent
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* brand */
  --blue: #4bb8fa;          /* Niwana Blue (primary)        */
  --blue-deep: #0a2a4a;     /* deep navy-blue for depth      */
  --blue-tint: #c4e2f5;     /* Sky Tint (secondary)          */
  --red: #e62e27;           /* Niwana Red (logo / accent)    */
  --red-deep: #b81f1a;

  /* surfaces */
  --paper: #f4f0e7;         /* warm spec-sheet paper         */
  --paper-2: #ece6d8;
  --card: #fbf9f4;
  --ink: #14181f;           /* near-black ink                */
  --ink-soft: #41464f;
  --line: #d4cdbd;          /* hairline on paper             */
  --line-blue: rgba(10, 42, 74, .14);

  /* type */
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* metrics */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(10, 42, 74, .5);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  /* blueprint grid + warm wash */
  background-image:
    linear-gradient(var(--line-blue) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-blue) 1px, transparent 1px),
    radial-gradient(120% 80% at 80% -10%, rgba(75, 184, 250, .12), transparent 60%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Layout helpers ---------- */
.wrap { width: min(100% - var(--gutter) * 2, var(--maxw)); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section--tint { background: linear-gradient(180deg, rgba(196, 226, 245, .35), rgba(196, 226, 245, 0)); }

/* technical label / kicker */
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--red);
}

.eyebrow-num { font-family: var(--font-mono); color: var(--red); font-size: 13px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: .98; letter-spacing: -.02em; }
.h-xl { font-size: clamp(2.6rem, 7vw, 5.6rem); }
.h-lg { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.h-md { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.05; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg); color: var(--fg);
  padding: 14px 22px; border: 2px solid var(--ink);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 600;
  border-radius: var(--radius);
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn--red { --bg: var(--red); --fg: #fff; border-color: var(--red); }
.btn--red:hover { box-shadow: 4px 4px 0 var(--red-deep); }
.btn--ghost { --bg: transparent; --fg: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 240, 231, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 42px; width: auto; }
.brand b { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -.01em; line-height: 1; }
.brand span { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; color: var(--blue-deep); text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); position: relative; padding-block: 6px; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--red); transition: width .25s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: var(--ink); color: #fff; border: none; border-radius: var(--radius); padding: 10px 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(56px, 8vw, 120px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(28px, 5vw, 64px); align-items: end; }
.hero h1 { margin-top: 18px; }
.hero h1 .accent { color: var(--red); }
.hero h1 .stroke { -webkit-text-stroke: 2px var(--blue-deep); color: transparent; }
.hero .lead { margin-top: 24px; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }

/* spec card on the right */
.spec {
  border: 1.5px solid var(--ink);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.spec-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--ink); color: #fff; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.spec-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 16px 0 0 var(--blue), 32px 0 0 var(--blue-tint); margin-right: 28px; }
.spec dl { display: grid; grid-template-columns: auto 1fr; }
.spec dt, .spec dd { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.spec dt { font-family: var(--font-mono); color: var(--blue-deep); letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.spec dd { text-align: right; font-weight: 600; }

/* ---------- Marquee ---------- */
.marquee { border-block: 2px solid var(--ink); background: var(--ink); color: var(--paper); overflow: hidden; }
.marquee__track { display: flex; gap: 0; white-space: nowrap; width: max-content; animation: slide 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.9rem); padding: 14px 28px; display: inline-flex; align-items: center; gap: 28px; }
.marquee span::after { content: "✦"; color: var(--red); font-size: .7em; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Section heading ---------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head p.lead { margin-top: 14px; }

/* ---------- Help / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { background: var(--card); padding: clamp(24px, 3vw, 40px); transition: background .3s var(--ease); }
.step:hover { background: #fff; }
.step .n { font-family: var(--font-mono); color: var(--red); font-size: 13px; letter-spacing: .1em; }
.step h3 { margin: 18px 0 10px; font-size: 1.5rem; }
.step .ic { width: 40px; height: 40px; color: var(--blue-deep); margin-bottom: 18px; }
.step p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Product grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; background: var(--card);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -26px rgba(10, 42, 74, .6); }
.card__media {
  aspect-ratio: 16 / 11; position: relative; display: grid; place-items: center;
  background:
    linear-gradient(135deg, rgba(75, 184, 250, .18), rgba(196, 226, 245, .35)),
    repeating-linear-gradient(0deg, var(--line-blue) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, var(--line-blue) 0 1px, transparent 1px 22px);
  border-bottom: 1.5px solid var(--ink);
}
.card__media svg { width: 64px; height: 64px; color: var(--blue-deep); }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__tag { position: absolute; top: 10px; left: 10px; z-index: 4; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 4px 8px; border-radius: 2px; }
.card__ph { position: absolute; bottom: 8px; right: 10px; z-index: 4; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-deep); opacity: .7; background: rgba(244,240,231,.7); padding: 2px 6px; border-radius: 2px; }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__body h3 { font-size: 1.25rem; }
.card__body p { font-size: .92rem; color: var(--ink-soft); flex: 1; }
.card__link { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--red); display: inline-flex; align-items: center; gap: 8px; }
.card:hover .card__link { gap: 14px; }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255, 255, 255, .14); border-radius: var(--radius); overflow: hidden; }
.stats .stat { background: var(--blue-deep); color: #fff; padding: clamp(24px, 3vw, 40px); }
.stat b { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.2rem); display: block; line-height: 1; }
.stat span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-tint); }

/* ---------- Split / feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.ticklist { display: grid; gap: 14px; margin-top: 24px; }
.ticklist li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; font-size: 1rem; }
.ticklist .mk { width: 26px; height: 26px; border: 2px solid var(--red); border-radius: 4px; display: grid; place-items: center; color: var(--red); font-size: 14px; flex: none; }
.figure-blue { border: 1.5px solid var(--ink); border-radius: var(--radius); aspect-ratio: 4/3; background:
    linear-gradient(135deg, var(--blue), var(--blue-deep));
  position: relative; display: grid; place-items: center; box-shadow: var(--shadow); overflow: hidden; }
.figure-blue::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.1) 0 1px, transparent 1px 30px), repeating-linear-gradient(90deg, rgba(255,255,255,.1) 0 1px, transparent 1px 30px); }
.figure-blue svg { width: 40%; color: #fff; position: relative; z-index: 1; opacity: .92; }
.figure-blue img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.media-frame { border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--red); color: #fff; border-radius: var(--radius); padding: clamp(40px, 6vw, 80px); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 40px); }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.cta-band .btn--red { background: #fff; color: var(--red); border-color: #fff; }
.cta-band .btn--red:hover { box-shadow: 4px 4px 0 var(--red-deep); }
.cta-band .btn--ghost { color: #fff; border-color: #fff; }
.cta-band .btn--ghost:hover { background: #fff; color: var(--red); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); }
.info-card { border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--card); }
.info-row { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); align-items: start; }
.info-row:last-child { border-bottom: 0; }
.info-row .ic { width: 26px; height: 26px; color: var(--red); }
.info-row .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-deep); }
.info-row .v { font-weight: 600; font-size: 1.05rem; }
.info-row .v a:hover { color: var(--red); }
.map-embed { border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; min-height: 320px; height: 100%; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 4px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.35rem); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { font-family: var(--font-mono); color: var(--red); font-size: 1.5rem; transition: transform .25s var(--ease); flex: none; }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq p { padding: 0 4px 24px; color: var(--ink-soft); max-width: 70ch; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-top: 16px; }
.crumbs { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.crumbs a:hover { color: var(--red); }

/* prose */
.prose p { margin-bottom: 1.1em; color: var(--ink-soft); font-size: 1.06rem; max-width: 68ch; }
.prose p strong { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(48px, 6vw, 80px) 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer .brand b { color: #fff; }
.site-footer .brand span { color: var(--blue-tint); }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-tint); margin-bottom: 16px; }
.footer-col a, .footer-col p { color: #cdd2da; font-size: .95rem; display: block; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: #9aa1ac; text-transform: uppercase; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(20px); animation: rise .7s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta .btn--ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open { display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav-links.open a { padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Detail-page range nav (chips) ---------- */
.range-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 9px 16px; color: var(--ink);
  transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}
.chip:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.chip[aria-current="page"] { background: var(--red); border-color: var(--red); color: #fff; }

/* detail spec sheet */
.specsheet { border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--shadow); }
.specsheet .spec-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--ink); color: #fff; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.specsheet dl { display: grid; grid-template-columns: auto 1fr; margin: 0; }
.specsheet dt, .specsheet dd { padding: 13px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.specsheet dt { font-family: var(--font-mono); color: var(--blue-deep); letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.specsheet dd { text-align: right; font-weight: 600; }
