/* =========================================================
   XE TRƯỜNG — blog xe hơi
   Design tokens
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  /* --- color --- */
  --ink:        #15181B;   /* asphalt, near-black */
  --steel:      #3C4550;   /* secondary dark / borders on dark */
  --paper:      #ECEAE2;   /* technical paper, cool neutral (not warm cream) */
  --paper-dim:  #DEDCD2;
  --signal:     #FF6B35;   /* turn-signal amber-orange — primary accent */
  --signal-dim: #C94E22;
  --route:      #1F6F54;   /* highway-sign green — secondary accent */
  --chrome:     #B8BEC4;   /* muted light gray, for text on dark */
  --white:      #FFFFFF;

  /* --- type --- */
  --f-display: 'Oswald', 'Roboto Condensed', sans-serif;
  --f-body:    'Be Vietnam Pro', system-ui, sans-serif;
  --f-mono:    'IBM Plex Mono', 'Roboto Mono', monospace;

  /* --- scale --- */
  --step-0: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --step-3: clamp(2.5rem, 2rem + 2vw, 3.75rem);

  --radius: 6px;
  --border: 1px solid rgba(21,24,27,0.12);
  --border-dark: 1px solid rgba(255,255,255,0.14);

  --max-w: 1160px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ 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(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,svg{ display:block; max-width:100%; }
a{ color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

.wrap{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

h1,h2,h3{
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.08;
  margin: 0;
}

.eyebrow{
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-dim);
}

/* =========================================================
   Signature element: dashed lane-divider
   ========================================================= */
.lane-divider{
  height: 10px;
  margin: 0 0 4px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--signal) 0 34px,
    transparent 34px 58px
  );
  background-position: 0 center;
  background-size: 58px 3px;
  background-repeat: repeat-x;
  background-position-y: center;
  opacity: 0.9;
}
.lane-divider.animate{
  animation: drive 5s linear infinite;
}
@keyframes drive{
  from{ background-position-x: 0; }
  to{ background-position-x: -58px; }
}

/* =========================================================
   Header
   ========================================================= */
.site-header{
  background: var(--ink);
  color: var(--paper);
  border-bottom: 4px solid var(--signal);
}
.site-header .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}
.logo{
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration:none;
  color: var(--white);
  display:flex;
  align-items:center;
  gap:10px;
}
.logo .dial{ width: 30px; height: 30px; }
.logo span.accent{ color: var(--signal); }

.main-nav ul{
  list-style:none;
  display:flex;
  gap: 28px;
  margin:0; padding:0;
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.main-nav a{
  text-decoration:none;
  color: var(--chrome);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.main-nav a:hover, .main-nav a.active{
  color: var(--white);
  border-color: var(--signal);
}

/* =========================================================
   Hero
   ========================================================= */
.hero{
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0 48px;
}
.hero .wrap{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items:center;
}
.hero h1{
  font-size: var(--step-3);
  color: var(--white);
}
.hero h1 em{
  font-style: normal;
  color: var(--signal);
}
.hero p.lede{
  font-size: 1.1rem;
  color: var(--chrome);
  max-width: 46ch;
  margin-top: 16px;
}
.hero .art{
  justify-self:end;
}
.hero .art svg{ width: 100%; max-width: 320px; }

/* =========================================================
   Category strip
   ========================================================= */
.cat-strip{
  background: var(--paper);
  padding: 22px 0;
}
.cat-strip .wrap{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}
.chip{
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  text-decoration:none;
  color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.chip:hover, .chip.active{
  background: var(--ink);
  color: var(--paper);
}

/* =========================================================
   Section headings
   ========================================================= */
.section{ padding: 12px 0 56px; }
.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom: 22px;
}
.section-head h2{ font-size: var(--step-2); }

/* =========================================================
   Article grid / cards
   ========================================================= */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card{
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  text-decoration:none;
  color: var(--ink);
  display:flex;
  flex-direction:column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(21,24,27,0.14);
}
.card .thumb{
  aspect-ratio: 16/10;
  background: var(--paper-dim);
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom: 3px solid var(--signal);
}
.card .thumb svg{ width: 46%; }
.card .body{ padding: 18px 18px 22px; display:flex; flex-direction:column; gap:10px; flex:1; }
.card .tag{
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--route);
}
.card h3{
  font-size: 1.2rem;
  text-transform: none;
}
.card p{ margin:0; color: var(--steel); font-size: 0.92rem; flex:1; }
.card .meta{
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--steel);
  margin-top: 6px;
}

/* list layout (latest posts) */
.list{ display:flex; flex-direction:column; }
.list-item{
  display:grid;
  grid-template-columns: 90px 1fr auto;
  gap: 20px;
  align-items:center;
  padding: 18px 0;
  border-top: var(--border);
  text-decoration:none;
  color: var(--ink);
}
.list-item:last-child{ border-bottom: var(--border); }
.list-item .rank{
  font-family: var(--f-display);
  font-size: 2rem;
  color: var(--paper-dim);
  -webkit-text-stroke: 1.5px var(--ink);
  color: transparent;
}
.list-item h3{ font-size: 1.05rem; text-transform:none; margin-bottom:4px; }
.list-item .tag{ font-family: var(--f-mono); font-size: 0.7rem; color: var(--route); text-transform:uppercase; }
.list-item .go{ font-family: var(--f-mono); font-size: 0.78rem; color: var(--signal-dim); white-space:nowrap; }

/* =========================================================
   Gauge (rating dial) — signature micro-element
   ========================================================= */
.gauge{ display:inline-flex; align-items:center; gap:8px; }
.gauge svg{ width: 34px; height: 34px; }
.gauge .label{ font-family: var(--f-mono); font-size: 0.72rem; color: var(--steel); }

/* =========================================================
   Post detail
   ========================================================= */
.post-head{
  background: var(--ink);
  color: var(--paper);
  padding: 48px 0 40px;
}
.post-head .eyebrow{ color: var(--signal); }
.post-head h1{
  color: var(--white);
  font-size: var(--step-3);
  margin-top: 10px;
  max-width: 22ch;
}
.post-meta{
  display:flex;
  gap: 18px;
  flex-wrap:wrap;
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  color: var(--chrome);
}

.post-body{
  max-width: 74ch;
  margin: 44px auto;
  padding: 0 24px;
}
.post-body h2{
  font-size: var(--step-1);
  margin-top: 44px;
  margin-bottom: 14px;
  text-transform: none;
  border-bottom: 3px solid var(--signal);
  display:inline-block;
  padding-bottom: 4px;
}
.post-body p{ margin: 0 0 18px; }
.post-body ul{ margin: 0 0 18px; padding-left: 1.2em; }
.post-body li{ margin-bottom: 8px; }
.post-body .imgslot{
  margin: 28px 0;
  border: 2px dashed var(--steel);
  border-radius: var(--radius);
  background: var(--paper-dim);
  padding: 32px 20px;
  text-align:center;
  color: var(--steel);
  font-family: var(--f-mono);
  font-size: 0.82rem;
}
.post-body .imgslot svg{ width:64px; margin: 0 auto 10px; }

/* spec table — dashboard readout */
.spec-table{
  width:100%;
  border-collapse: collapse;
  margin: 22px 0 30px;
  font-family: var(--f-mono);
  font-size: 0.85rem;
}
.spec-table th, .spec-table td{
  border: var(--border);
  padding: 10px 12px;
  text-align:left;
}
.spec-table thead th{
  background: var(--ink);
  color: var(--white);
  font-family: var(--f-display);
  text-transform:uppercase;
  letter-spacing:0.03em;
}
.spec-table tbody tr:nth-child(odd){ background: var(--white); }
.spec-table tbody tr:nth-child(even){ background: var(--paper); }

.callout{
  border-left: 4px solid var(--signal);
  background: var(--white);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95rem;
}
.callout strong{ color: var(--signal-dim); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{
  background: var(--ink);
  color: var(--chrome);
  padding: 36px 0;
  margin-top: 40px;
  border-top: 4px solid var(--signal);
  font-size: 0.88rem;
}
.site-footer .wrap{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 16px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 880px){
  .hero .wrap{ grid-template-columns: 1fr; }
  .hero .art{ justify-self:start; }
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .main-nav ul{ gap: 16px; }
}
@media (max-width: 600px){
  .grid{ grid-template-columns: 1fr; }
  .list-item{ grid-template-columns: 56px 1fr; }
  .list-item .go{ display:none; }
  .main-nav{ display:none; }
  .site-header .wrap{ justify-content:center; }
}
