/*
Theme Name: TNGAP Gate
Theme URI: https://thenewgate.com
Author: TheNewGate Inc.
Author URI: https://thenewgate.com
Description: Minimal, plugin-free WordPress theme powering thenewgate.com/news/* (Gate v7 design system, ported from the static Next.js site at redesign/gate-v7) and the /wp-json/tngap/v1/contact enquiry endpoint consumed by that site's /contact page. No custom post type — built-in posts only, tagged "news".
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: Proprietary — TheNewGate Inc. internal use only.
*/

/* ============================================================
   TOKENS — ported verbatim from thenewgate-global's
   src/app/globals.css "GATE v7 — FOUNDATION LAYER" (:root block).
   Keep in sync if the static site's palette changes.
   ============================================================ */
:root {
  --g-navy: #12162c;
  --g-navy-2: #1b2044;
  --g-ink: #4c5163;
  --g-ink-soft: #767c8d;
  --g-red: #F0402A;
  --g-red-2: #d8351f;
  --g-blue: #1257EE;
  --g-blue-2: #0d3fb0;
  --g-bg: #f8f9fb;
  --g-bg-2: #f2f4f7;
  --g-card: #ffffff;
  --g-line: #e4e7ee;
  --g-dark: #0b1122;
  --g-dark-2: #080e1c;
  --g-footer: #080d1a;
  --gate-ease: cubic-bezier(.22, 1, .36, 1);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--g-bg);
  color:var(--g-navy);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Sans","Noto Sans JP","Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-x:clip;
}
img{max-width:100%;display:block;}
h1,h2,h3,h4{text-wrap:initial;}
a{color:inherit;text-decoration:none;}
.wrap{max-width:1240px;margin:0 auto;padding:0 40px;}
@media (max-width:900px){ .wrap{padding:0 24px;} }

.eyebrow{
  display:block;font-size:12px;font-weight:700;letter-spacing:.08em;
  color:var(--g-red);margin-bottom:14px;
}
h2.sec{
  font-size:clamp(28px,3.4vw,40px);
  line-height:1.12;font-weight:600;letter-spacing:-.01em;
  color:var(--g-navy);margin:0 0 16px;
}

section{position:relative;}
.sec-pad{padding:60px 0;}
@media (max-width:900px){ .sec-pad{padding:64px 0;} }

/* ---------------- header ---------------- */
header{
  position:sticky;top:0;z-index:50;
  background:rgba(248,249,251,.86);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(18,22,44,.06);
  transition:background 250ms var(--gate-ease),backdrop-filter 250ms var(--gate-ease),box-shadow 250ms var(--gate-ease),border-color 250ms var(--gate-ease);
}
header.is-scrolled{
  background:rgba(248,249,251,.92);
  backdrop-filter:saturate(1.2) blur(12px);
  -webkit-backdrop-filter:saturate(1.2) blur(12px);
  border-bottom-color:rgba(18,22,44,.1);
  box-shadow:0 12px 28px -20px rgba(18,22,44,.22);
}
.hd-row{display:flex;align-items:center;justify-content:space-between;height:78px;gap:22px;}
.brand{display:flex;align-items:center;gap:12px;flex-shrink:0;}
.brand img{height:42px;width:auto;}
.brand .bd-text{display:flex;flex-direction:column;line-height:1.35;padding-left:12px;border-left:1px solid rgba(18,22,44,.14);}
.brand .tag{font-size:9.5px;letter-spacing:.03em;color:var(--g-ink-soft);white-space:nowrap;}
nav.pri{display:flex;gap:18px;flex:1;justify-content:flex-end;min-width:0;}
nav.pri a{font-size:10.5px;font-weight:600;letter-spacing:.08em;color:#454E63;white-space:nowrap;}
.hd-right{display:flex;align-items:center;gap:18px;flex-shrink:0;}
.cta-pill{
  display:inline-flex;align-items:center;gap:8px;background:var(--g-dark);color:#fff;
  padding:12px 20px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.06em;
  white-space:nowrap;
}
.cta-pill svg{width:12px;height:12px;}
@media (max-width:1239px){ nav.pri{display:none;} .burger{margin-left:auto;} }
@media (max-width:900px){ .brand .bd-text{display:none;} .cta-pill{padding:9px 14px;font-size:10px;} }
@media (max-width:640px){ .cta-pill{padding:10px 14px;font-size:9.5px;} .cta-pill svg{width:10px;height:10px;} }
@media (max-width:480px){ .cta-pill{display:none;} .hd-right{display:none;} }
@media (max-width:360px){ .cta-pill span.ctxt{display:none;} }

.burger{display:none;flex-direction:column;gap:5px;background:none;border:0;padding:8px;cursor:pointer;}
@media (max-width:1239px){ .burger{display:flex;} }
.burger span{display:block;width:22px;height:2px;background:var(--g-navy);border-radius:2px;transition:transform 250ms var(--gate-ease),opacity 200ms var(--gate-ease);}
.burger.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.burger.is-open span:nth-child(2){opacity:0;}
.burger.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
@media (max-width:640px){ .burger{min-width:44px;min-height:44px;align-items:center;justify-content:center;margin-right:-10px;} }

.m-nav{
  position:fixed;inset:0;background:rgba(248,249,251,.98);z-index:99;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:26px;
  opacity:0;visibility:hidden;pointer-events:none;transform:translateY(14px);
  transition:opacity 200ms var(--gate-ease),transform 200ms var(--gate-ease),visibility 0s linear 200ms;
}
.m-nav.open{
  opacity:1;visibility:visible;pointer-events:auto;transform:none;
  transition:opacity 280ms var(--gate-ease),transform 280ms var(--gate-ease),visibility 0s linear 0s;
}
.m-nav a{font-size:15px;font-weight:700;letter-spacing:.1em;color:var(--g-navy);}
.m-nav .close{position:absolute;top:22px;right:22px;font-size:26px;background:none;border:0;color:var(--g-navy);cursor:pointer;}

/* ---------------- footer ---------------- */
footer{background:var(--g-footer);color:#8892a8;padding:60px 0 28px;margin-top:0;}
.ft-top{display:grid;grid-template-columns:1.3fr repeat(4,1fr);gap:24px;margin-bottom:48px;}
@media (max-width:900px){ .ft-top{grid-template-columns:1fr 1fr;} }
@media (max-width:640px){
  .ft-top{grid-template-columns:1fr 1fr;row-gap:32px;column-gap:20px;margin-bottom:40px;}
  .ft-brand,.ft-col:last-child{grid-column:1 / -1;}
  .ft-brand{margin-bottom:4px;}
  .ft-social{margin-top:14px;}
}
.ft-brand img{height:22px;margin-bottom:10px;}
.ft-brand .tag{font-size:10px;color:#5c6580;}
.ft-col h6{font-size:11px;font-weight:700;letter-spacing:.07em;color:#fff;margin:0 0 16px;}
.ft-col a,.ft-col span{display:block;font-size:12.5px;color:#8892a8;margin-bottom:11px;line-height:1.5;}
.ft-social{display:flex;gap:12px;margin-top:16px;}
.ft-social span{width:30px;height:30px;border-radius:50%;border:1px solid #232b42;display:flex;align-items:center;justify-content:center;}
.ft-social svg{width:14px;height:14px;color:#8892a8;}
.ft-bottom{border-top:1px solid #1b2338;padding-top:22px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;font-size:11px;color:#535c76;}
@media (max-width:640px){ .ft-col a,.ft-col span{padding:12px 0;margin-bottom:0;} .ft-social span{width:38px;height:38px;} }

/* ---------------- hero-mini (shared /news + /news/<post> hero band) ----------------
   Ported from globals.css "GATE v7 — /about, /markets" §hero-mini base +
   "GATE v7 — /news, /contact" §.legal variant. The decorative gate/trail
   SVG art layered on top of this gradient in the static site's hero
   components is intentionally NOT reproduced here (per-page bespoke
   artwork, out of scope for this theme) — the two radial-gradient washes
   below already give the same warm/cool ambient background. */
.hero-mini{
  position:relative;min-height:220px;display:flex;align-items:center;overflow:hidden;
  padding:56px 0 40px;
  background:
    radial-gradient(85% 65% at 76% 28%, rgba(214,226,242,.5), rgba(248,249,251,0) 70%),
    radial-gradient(55% 45% at 22% 88%, rgba(250,236,231,.45), rgba(248,249,251,0) 70%),
    var(--g-bg);
}
.hero-mini .wrap{position:relative;z-index:1;width:100%;}
.hero-mini .eyebrow{margin-bottom:16px;}
.hero-mini h1{
  display:inline-block;max-width:none;
  font-size:clamp(32px,4.6vw,52px);line-height:1.1;font-weight:600;letter-spacing:-.01em;margin:0 0 18px;
  background:linear-gradient(117deg,#12162C 0%,#191A36 16%,#4E2B4C 30%,#B8452F 40%,#63334E 54%,#181E3E 76%,#12162C 100%);
  -webkit-background-clip:text;color:transparent;
}
.hero-mini .body,.hero-mini .ins-meta-row{font-size:15px;line-height:1.75;color:var(--g-ink);max-width:600px;margin:0;}
.hero-mini .ins-meta-row{font-size:12.5px;font-weight:600;color:var(--g-ink-soft);letter-spacing:.02em;}
@media (max-width:900px){ .hero-mini{min-height:0;padding:36px 0 28px;} }

/* ---------------- /news §01: announcement list (`.news-rail`) ----------------
   Ported verbatim from globals.css "GATE v7 — /news, /contact". */
.news-rail{position:relative;margin-top:44px;max-width:760px;}
.news-rail::before{
  content:"";position:absolute;left:5px;top:6px;bottom:6px;width:2px;
  background:linear-gradient(180deg,var(--g-red),var(--g-blue));border-radius:2px;
}
.news-item{position:relative;padding:0 0 40px 40px;}
.news-item:last-child{padding-bottom:0;}
.news-item::before{
  content:"";position:absolute;left:0;top:5px;width:12px;height:12px;border-radius:50%;
  background:var(--g-card);border:3px solid var(--g-red);z-index:1;
}
.news-item.completed::before{border-color:var(--g-blue);}
.news-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px;}
.news-date{font-size:13px;font-weight:700;color:var(--g-ink-soft);letter-spacing:.04em;}
.news-badge{
  display:inline-flex;align-items:center;font-size:10px;font-weight:700;letter-spacing:.06em;
  padding:4px 11px;border-radius:999px;border:1px solid;white-space:nowrap;
}
.news-badge.completed{color:var(--g-blue);border-color:var(--g-blue);background:rgba(18,87,238,.06);}
.news-title{font-size:18px;font-weight:700;color:var(--g-navy);margin:0 0 6px;line-height:1.35;max-width:560px;}
.news-title a{color:inherit;}
.news-title a:hover{color:var(--g-red);}
.news-desc{font-size:13.5px;color:var(--g-ink-soft);line-height:1.65;margin:0;max-width:520px;}
.news-note{margin-top:36px;font-size:11.5px;color:var(--g-ink-soft);line-height:1.6;max-width:520px;}
.news-note a{color:var(--g-blue);font-weight:600;}
@media (max-width:640px){
  .news-item{padding-left:32px;}
  .news-rail::before{left:4px;}
  .news-item::before{width:10px;height:10px;}
}

/* ---------------- pagination (WP core the_posts_pagination markup) ---------------- */
.pagination{margin-top:40px;display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.pagination .page-numbers{
  display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;
  padding:0 10px;border:1px solid var(--g-line);border-radius:999px;font-size:12px;font-weight:700;
  color:var(--g-navy);background:var(--g-card);
}
.pagination .page-numbers.current{background:var(--g-navy);border-color:var(--g-navy);color:#fff;}
.pagination .page-numbers.dots{border:none;background:none;}

/* ---------------- /news/<post> §single: reading body ----------------
   Grammar ported from globals.css's /insights article typography
   (.legal-wrap width, .ins-article paragraph/list rhythm) with the
   numbered `.ins-h2-num` badge intentionally dropped — news posts read
   as a plain article, not a spec-style numbered doc. */
.legal-wrap{max-width:760px;}
.tngap-article-body{font-size:14.5px;line-height:1.9;color:var(--g-ink);}
.tngap-article-body p{margin:0 0 18px;max-width:720px;}
.tngap-article-body h2{
  font-size:20px;font-weight:700;color:var(--g-navy);letter-spacing:-.01em;
  margin:44px 0 14px;padding-top:32px;border-top:1px solid var(--g-line);
}
.tngap-article-body h2:first-child{margin-top:0;padding-top:0;border-top:none;}
.tngap-article-body h3{font-size:16px;font-weight:700;color:var(--g-navy);margin:28px 0 10px;}
.tngap-article-body ul,.tngap-article-body ol{margin:0 0 18px;padding-left:22px;max-width:720px;}
.tngap-article-body ul{list-style:disc;}
.tngap-article-body ol{list-style:decimal;}
.tngap-article-body li{margin-bottom:10px;line-height:1.85;}
.tngap-article-body a{color:var(--g-blue);font-weight:600;text-decoration:underline;text-underline-offset:2px;}
.tngap-article-body img{border-radius:12px;margin:28px 0;height:auto;}
.tngap-article-body blockquote{
  border-left:3px solid var(--g-red);background:var(--g-card);padding:22px 28px;margin:24px 0;
  border-radius:0 14px 14px 0;font-style:normal;color:var(--g-ink);max-width:720px;
}

/* ---------------- 404 ---------------- */
.hero-mini .body a{color:var(--g-blue);font-weight:600;text-decoration:underline;text-underline-offset:2px;}
