/* ==========================================================================
   พนม เรซซิ่ง — Design tokens
   Color:  asphalt (near-black), paper (warm greige), steel (muted grey text),
           race-red (primary accent), flag-amber (secondary accent)
   Type:   Kanit (display / headings) + Sarabun (body, Thai-optimised)
   Layout: full-bleed hero with angled cut, hairline-bordered blocks,
           chevron divider motif borrowed from checkered racing flags
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@500;600;700;800&family=Sarabun:wght@400;500;600;700&display=swap');

:root{
  --asphalt: #17171a;
  --asphalt-soft: #232327;
  --paper: #efece4;
  --paper-dim: #e4e0d5;
  --white: #ffffff;
  --steel: #6d6f74;
  --steel-dim: #9a9b9f;
  --race-red: #c8102e;
  --race-red-dark: #9c0c23;
  --flag-amber: #f2a900;
  --line-hair: rgba(23,23,26,0.14);
  --line-hair-light: rgba(255,255,255,0.16);

  --font-display: 'Kanit', 'Noto Sans Thai', sans-serif;
  --font-body: 'Sarabun', 'Noto Sans Thai', sans-serif;

  --maxw: 1180px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--asphalt);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  margin: 0 0 0.5em;
  line-height: 1.25;
  font-weight: 700;
}
p{ margin: 0 0 1em; color: var(--asphalt); }
.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.section{ padding: 84px 0; }
.section--tight{ padding: 56px 0; }
.section--dark{ background: var(--asphalt); color: var(--paper); }
.section--dark p{ color: var(--steel-dim); }
.section--dark h2, .section--dark h3{ color: var(--white); }
.section--paper-dim{ background: var(--paper-dim); }

.eyebrow-tag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--race-red);
  margin-bottom: 14px;
}
.eyebrow-tag::before{
  content: "";
  width: 22px;
  height: 3px;
  background: var(--flag-amber);
  display: inline-block;
}

.section-head{
  max-width: 640px;
  margin-bottom: 44px;
}
.section-head h2{ font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head p{ color: var(--steel); font-size: 1.05rem; }

/* ---------------- Header / Nav ---------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239,236,228,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-hair);
}
.nav-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--asphalt);
}
.brand .mark{
  width: 40px; height: 40px;
  background: var(--asphalt);
  color: var(--flag-amber);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
}
.brand small{
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--steel);
  letter-spacing: 0.02em;
}
.nav-links{
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a{
  font-weight: 500;
  font-size: 0.98rem;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after{
  content:"";
  position: absolute; left:0; bottom:-2px;
  height: 2px; width: 0;
  background: var(--race-red);
  transition: width .2s ease;
}
.nav-links a:hover::after, .nav-links a.is-active::after{ width: 100%; }
.nav-links a.is-active{ color: var(--race-red); }

.nav-cta{
  display: flex;
  align-items: center;
  gap: 14px;
}
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary{
  background: var(--race-red);
  color: var(--white);
}
.btn--primary:hover{ background: var(--race-red-dark); }
.btn--ghost{
  border-color: var(--asphalt);
  color: var(--asphalt);
}
.btn--ghost:hover{ background: var(--asphalt); color: var(--paper); }
.btn--amber{
  background: var(--flag-amber);
  color: var(--asphalt);
}
.btn--amber:hover{ background: #d99600; }

.menu-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span{
  width: 24px; height: 2px; background: var(--asphalt);
}

/* ---------------- Hero ---------------- */
.hero{
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--asphalt);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
.hero img.hero-bg{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.62;
}
.hero::before{
  content:"";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,17,20,0.35) 0%, rgba(17,17,20,0.55) 45%, rgba(17,17,20,0.96) 100%);
}
.hero-content{
  position: relative;
  z-index: 2;
  padding-bottom: 76px;
  max-width: 760px;
}
.hero-content .eyebrow-tag{ color: var(--flag-amber); }
.hero-content .eyebrow-tag::before{ background: var(--race-red); }
.hero-content h1{
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  color: var(--white);
}
.hero-content p{
  color: #d8d6cf;
  font-size: 1.15rem;
  max-width: 560px;
}
.hero-actions{
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ---------------- Stat strip ---------------- */
.stat-strip{
  background: var(--asphalt-soft);
  color: var(--white);
}
.stat-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item{
  padding: 30px 20px;
  text-align: center;
  border-left: 1px solid var(--line-hair-light);
}
.stat-item:first-child{ border-left: none; }
.stat-item .num{
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--flag-amber);
}
.stat-item .label{
  font-size: 0.9rem;
  color: var(--steel-dim);
}

/* ---------------- Cards / grids ---------------- */
.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}
.info-card{
  border: 1px solid var(--line-hair);
  background: var(--white);
  padding: 30px 26px;
}
.info-card .icon-tab{
  width: 46px; height: 4px;
  background: var(--race-red);
  margin-bottom: 18px;
}
.info-card h3{ font-size: 1.2rem; }
.info-card p{ color: var(--steel); font-size: 0.98rem; margin-bottom: 0; }

.product-card{
  border: 1px solid var(--line-hair);
  background: var(--white);
  overflow: hidden;
}
.product-card .thumb{
  aspect-ratio: 4/3;
  overflow: hidden;
}
.product-card img{
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.product-card:hover img{ transform: scale(1.05); }
.product-card .body{ padding: 22px 24px 26px; }
.product-card .cat{
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--race-red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.product-card h3{ font-size: 1.15rem; margin: 6px 0 8px; }
.product-card p{ color: var(--steel); font-size: 0.95rem; margin-bottom: 0; }

/* ---------------- Steps (real sequence only) ---------------- */
.step-row{
  display: flex;
  gap: 22px;
  counter-reset: step;
}
.step-row .step{
  flex: 1;
  position: relative;
  padding-top: 46px;
  border-top: 3px solid var(--line-hair);
}
.step-row .step::before{
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -3px; left: 0;
  width: 46px; height: 46px;
  transform: translateY(-50%);
  background: var(--race-red);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
}
.step-row .step h4{ font-size: 1.05rem; }
.step-row .step p{ color: var(--steel); font-size: 0.93rem; }

/* ---------------- Quote / values block ---------------- */
.value-list{ list-style: none; margin: 0; padding: 0; }
.value-list li{
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line-hair);
}
.value-list li:last-child{ border-bottom: 1px solid var(--line-hair); }
.value-list .tag{
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--flag-amber);
  background: var(--asphalt);
  min-width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.value-list h4{ margin: 0 0 4px; font-size: 1.05rem; }
.value-list p{ margin: 0; color: var(--steel); font-size: 0.95rem; }

/* ---------------- CTA banner ---------------- */
.cta-banner{
  background: var(--race-red);
  color: var(--white);
  padding: 56px 0;
}
.cta-banner .container{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.cta-banner h2{ color: var(--white); font-size: 1.7rem; margin: 0; }
.cta-banner p{ color: rgba(255,255,255,0.85); margin: 6px 0 0; }
.cta-banner .btn--amber{ }

/* ---------------- Table (hours / info) ---------------- */
.info-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.info-table th, .info-table td{
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-hair);
  vertical-align: top;
}
.info-table th{
  width: 200px;
  color: var(--steel);
  font-weight: 500;
}

/* ---------------- Footer ---------------- */
.site-footer{
  background: var(--asphalt);
  color: var(--steel-dim);
  padding: 64px 0 28px;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-hair-light);
}
.footer-grid h4{
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}
.footer-grid p, .footer-grid a{
  color: var(--steel-dim);
  font-size: 0.93rem;
  display: block;
  margin-bottom: 8px;
}
.footer-grid a:hover{ color: var(--flag-amber); }
.footer-brand .brand{ color: var(--white); margin-bottom: 14px; }
.footer-brand .brand small{ color: var(--steel-dim); }
.footer-bottom{
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--steel-dim);
}
.footer-bottom a:hover{ color: var(--flag-amber); }

/* ---------------- Page hero (inner pages) ---------------- */
.page-hero{
  background: var(--asphalt);
  color: var(--white);
  padding: 60px 0 46px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 96%);
}
.page-hero .eyebrow-tag{ color: var(--flag-amber); }
.page-hero .eyebrow-tag::before{ background: var(--race-red); }
.page-hero h1{ color: var(--white); font-size: clamp(1.9rem, 4vw, 2.7rem); }
.page-hero p{ color: var(--steel-dim); max-width: 620px; font-size: 1.05rem; }

.breadcrumb{
  font-size: 0.85rem;
  color: var(--steel-dim);
  margin-bottom: 16px;
}
.breadcrumb a:hover{ color: var(--flag-amber); }

/* ---------------- Map / contact ---------------- */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.map-frame{
  border: 1px solid var(--line-hair);
  overflow: hidden;
  height: 100%;
  min-height: 420px;
}
.map-frame iframe{ width: 100%; height: 100%; border: 0; display: block; }

.channel-card{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line-hair);
  background: var(--white);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.channel-card .tag{
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  background: var(--asphalt);
  min-width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}
.channel-card h4{ margin: 0 0 4px; font-size: 1.02rem; }
.channel-card p{ margin: 0; color: var(--steel); font-size: 0.95rem; }
.channel-card a{ color: var(--race-red); font-weight: 600; }

/* ---------------- Policy content ---------------- */
.policy-body h2{
  font-size: 1.35rem;
  margin-top: 2.2em;
  padding-top: 0.6em;
  border-top: 1px solid var(--line-hair);
}
.policy-body h2:first-child{ margin-top: 0; border-top: none; padding-top: 0; }
.policy-body p, .policy-body li{ color: var(--steel); font-size: 1rem; }
.policy-body ul{ padding-left: 1.2em; }
.policy-body .updated{
  color: var(--steel-dim);
  font-size: 0.9rem;
  margin-bottom: 2em;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px){
  .grid-3{ grid-template-columns: 1fr 1fr; }
  .stat-grid{ grid-template-columns: repeat(2,1fr); }
  .stat-item:nth-child(3){ border-left: none; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .step-row{ flex-direction: column; }
}
@media (max-width: 720px){
  .nav-links, .nav-cta .btn--ghost{ display: none; }
  .menu-toggle{ display: flex; }
  .grid-3{ grid-template-columns: 1fr; }
  .stat-grid{ grid-template-columns: 1fr 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .cta-banner .container{ flex-direction: column; align-items: flex-start; }
  .hero{ min-height: 86vh; }
}

/* Mobile nav drawer */
.nav-links.open{
  display: flex;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--paper);
  flex-direction: column;
  padding: 20px 24px 26px;
  border-bottom: 1px solid var(--line-hair);
  gap: 16px;
}
