/* =========================================================
   NY อินเตอร์กรุ๊ป — Design Tokens
   ห้างหุ้นส่วน สินค้าอุปโภคบริโภค | นราธิวาส
   ========================================================= */

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

:root{
  /* --- color --- */
  --green-deep:   #1F4A3D;   /* primary — ความน่าเชื่อถือ/ความสด */
  --green-mid:    #2E6650;
  --gold:         #C9962B;   /* accent — ข้าว/เครื่องเทศ */
  --gold-soft:    #E4B85A;
  --clay:         #B04A32;   /* accent รอง ใช้เท่าที่จำเป็น */
  --paper:        #F6F2E7;   /* พื้นหลังอุ่น */
  --paper-alt:    #EFE8D6;
  --ink:          #26241E;   /* ตัวอักษรหลัก */
  --ink-soft:     #5B584C;
  --line:         #D9D0B8;
  --white:        #FFFFFF;

  /* --- type --- */
  --f-head: 'Kanit', 'Sarabun', sans-serif;
  --f-body: 'Sarabun', 'Kanit', sans-serif;

  /* --- layout --- */
  --maxw: 1160px;
  --radius: 4px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{
  font-family: var(--f-head);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 .6em;
  color: var(--green-deep);
}
p{ margin: 0 0 1.1em; max-width: 68ch; }
.container{
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior:auto !important; }
}

/* =========== Top announcement strip =========== */
.topbar{
  background: var(--green-deep);
  color: var(--paper);
  font-size: .85rem;
}
.topbar .container{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:16px;
  padding-top:8px;
  padding-bottom:8px;
  flex-wrap:wrap;
}
.topbar a{ color: var(--gold-soft); }
.topbar .reg{ color: rgba(246,242,231,.75); }

/* =========== Header / Nav =========== */
header.site{
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 16px 0;
}
.logo{
  display:flex;
  align-items:center;
  gap:12px;
  font-family: var(--f-head);
}
.logo .mark{
  width:42px; height:42px;
  border-radius: 50%;
  background: var(--green-deep);
  color: var(--gold-soft);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:1.05rem;
  flex-shrink:0;
}
.logo .name{
  font-weight:700;
  font-size:1.12rem;
  color: var(--green-deep);
  line-height:1.2;
}
.logo .sub{
  display:block;
  font-family: var(--f-body);
  font-weight:400;
  font-size:.72rem;
  color: var(--ink-soft);
}
nav.primary ul{
  display:flex;
  gap: 6px;
  align-items:center;
}
nav.primary a{
  display:block;
  padding: 10px 16px;
  font-size: .96rem;
  font-weight:500;
  border-radius: var(--radius);
  color: var(--ink);
}
nav.primary a:hover{ color: var(--green-deep); background: var(--paper-alt); }
nav.primary a.current{
  color: var(--green-deep);
  font-weight:600;
  box-shadow: inset 0 -2px 0 var(--gold);
}
.nav-toggle{
  display:none;
  background:none;
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor:pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:'';
  display:block;
  width:20px; height:2px;
  background: var(--ink);
  position:relative;
  transition: transform .2s ease;
}
.nav-toggle span::before{ position:absolute; top:-6px; }
.nav-toggle span::after{ position:absolute; top:6px; }

@media (max-width: 860px){
  .nav-toggle{ display:block; }
  nav.primary{
    position:absolute;
    top: 100%; left:0; right:0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display:none;
  }
  nav.primary.open{ display:block; }
  nav.primary ul{ flex-direction:column; align-items:stretch; padding: 8px 24px 18px; gap:2px; }
  nav.primary a{ padding: 12px 8px; }
  nav.primary a.current{ box-shadow:none; background: var(--paper-alt); }
}

/* =========== Buttons =========== */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--f-head);
  font-weight:500;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor:pointer;
}
.btn-primary{ background: var(--green-deep); color: var(--paper); }
.btn-primary:hover{ background: var(--green-mid); }
.btn-outline{ background:transparent; border-color: var(--green-deep); color: var(--green-deep); }
.btn-outline:hover{ background: var(--green-deep); color: var(--paper); }
.btn-gold{ background: var(--gold); color: var(--ink); }
.btn-gold:hover{ background: var(--gold-soft); }

/* =========== Hero (asymmetric split) =========== */
.hero{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  align-items:stretch;
  gap:0;
  background: var(--white);
}
.hero-copy{
  padding: 76px 48px 76px 24px;
  max-width: 620px;
  margin: 0 auto 0 0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.hero-copy .kicker{
  font-family: var(--f-head);
  font-weight:600;
  color: var(--gold);
  letter-spacing: .02em;
  margin-bottom: 14px;
  font-size: .98rem;
}
.hero-copy h1{
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: .5em;
}
.hero-copy .lead{
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions{
  display:flex;
  gap:14px;
  margin-top: 18px;
  flex-wrap:wrap;
}
.hero-figure{
  position:relative;
  overflow:hidden;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%);
  min-height: 420px;
}
.hero-figure img{
  width:100%; height:100%;
  object-fit:cover;
  position:absolute; inset:0;
}
@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
  .hero-copy{ padding: 44px 24px; max-width:none; }
  .hero-figure{ clip-path:none; min-height: 260px; order:-1; }
}

/* Page hero (secondary pages, image band + heading) */
.page-hero{
  position:relative;
  min-height: 260px;
  display:flex;
  align-items:flex-end;
  overflow:hidden;
  background: var(--green-deep);
}
.page-hero img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  opacity:.42;
}
.page-hero::after{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(31,74,61,.15) 0%, rgba(31,74,61,.86) 100%);
}
.page-hero .container{
  position:relative;
  z-index:2;
  padding-top: 64px;
  padding-bottom: 34px;
}
.page-hero .crumb{
  color: var(--gold-soft);
  font-family: var(--f-head);
  font-size:.9rem;
  margin-bottom:10px;
  display:block;
}
.page-hero h1{ color: var(--white); margin-bottom:.3em; }
.page-hero p{ color: rgba(255,255,255,.86); max-width:60ch; }

/* =========== Section rhythm =========== */
section{ padding: 72px 0; }
section.tight{ padding: 48px 0; }
.section-head{
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head .kicker{
  font-family: var(--f-head);
  color: var(--gold);
  font-weight:600;
  font-size:.92rem;
  margin-bottom:8px;
  display:block;
}
.section-head h2{ font-size: clamp(1.5rem, 2.6vw, 2rem); }
.section-alt{ background: var(--paper-alt); }
.section-deep{ background: var(--green-deep); color: var(--paper); }
.section-deep h2, .section-deep h3{ color: var(--white); }
.section-deep p{ color: rgba(246,242,231,.82); }

.rule{
  border:0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* =========== Grids & cards =========== */
.grid{ display:grid; gap: 28px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){
  .grid-3, .grid-4{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 620px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; }
}

.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
}
.card .card-media{
  aspect-ratio: 4/3;
  overflow:hidden;
}
.card .card-media img{ width:100%; height:100%; object-fit:cover; }
.card .card-body{ padding: 22px 24px 26px; }
.card h3{ font-size: 1.15rem; margin-bottom:.4em; }
.card p{ color: var(--ink-soft); font-size: .96rem; margin-bottom:0; }

.stat{
  border-left: 3px solid var(--gold);
  padding-left: 18px;
}
.stat .num{
  font-family: var(--f-head);
  font-weight:700;
  font-size: 2.1rem;
  color: var(--green-deep);
  display:block;
  line-height:1;
  margin-bottom: 6px;
}
.stat .label{ color: var(--ink-soft); font-size:.92rem; }

.feature-row{
  display:grid;
  grid-template-columns: 30px 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.feature-row .ico{
  width:30px; height:30px;
  color: var(--green-deep);
}
.feature-row h4{ margin-bottom:.3em; font-size:1.04rem; }
.feature-row p{ color: var(--ink-soft); margin-bottom:0; font-size:.95rem; }

/* company facts / info list */
.fact-list{ margin:0; }
.fact-list li{
  display:grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: .97rem;
}
.fact-list li:last-child{ border-bottom: 1px solid var(--line); }
.fact-list .k{ color: var(--ink-soft); font-weight:500; }
.fact-list .v{ color: var(--ink); }
@media (max-width: 560px){
  .fact-list li{ grid-template-columns: 1fr; gap:2px; }
}

/* contact tiles */
.contact-tile{
  display:flex;
  gap:16px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-tile .ico{
  width:26px; height:26px;
  color: var(--green-deep);
  flex-shrink:0;
  margin-top:2px;
}
.contact-tile h4{ margin-bottom:.25em; font-size: 1rem; }
.contact-tile .note{ color: var(--ink-soft); font-size: .88rem; }
.pending{
  display:inline-block;
  margin-top:6px;
  font-size:.78rem;
  color: var(--clay);
  background: rgba(176,74,50,.08);
  border: 1px solid rgba(176,74,50,.25);
  border-radius: 20px;
  padding: 2px 10px;
}

/* CTA band */
.cta-band{
  background: var(--gold);
  color: var(--ink);
}
.cta-band .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 24px;
  flex-wrap:wrap;
}
.cta-band h2{ color: var(--ink); margin-bottom:.2em; }
.cta-band p{ margin-bottom:0; color: rgba(38,36,30,.75); }

/* map */
.map-wrap{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  height: 380px;
}
.map-wrap iframe{ width:100%; height:100%; border:0; }

/* form */
.form-grid{ display:grid; gap:18px; grid-template-columns: 1fr 1fr; }
.form-grid .full{ grid-column: 1 / -1; }
@media (max-width:620px){ .form-grid{ grid-template-columns:1fr; } }
label{ display:block; font-size:.88rem; font-weight:500; margin-bottom:6px; color: var(--ink-soft); }
input, textarea{
  width:100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  font-family: var(--f-body);
  font-size: .96rem;
  background: var(--white);
  color: var(--ink);
}
input:focus, textarea:focus{ border-color: var(--green-deep); }
textarea{ resize: vertical; min-height:120px; }
.form-note{
  font-size:.85rem;
  color: var(--ink-soft);
  background: var(--paper-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 16px;
}

/* footer */
footer.site{
  background: var(--green-deep);
  color: rgba(246,242,231,.82);
  padding: 56px 0 26px;
}
footer.site h4{ color: var(--white); font-size: 1rem; margin-bottom: 14px; }
footer.site a:hover{ color: var(--gold-soft); }
.foot-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(246,242,231,.15);
}
.foot-grid li{ margin-bottom:9px; font-size:.92rem; }
.foot-brand .name{ font-family: var(--f-head); font-weight:700; color: var(--white); font-size:1.1rem; }
.foot-brand p{ color: rgba(246,242,231,.68); font-size:.9rem; margin-top:10px; }
.foot-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  padding-top: 22px;
  font-size:.82rem;
  color: rgba(246,242,231,.6);
}
@media (max-width: 780px){
  .foot-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px){
  .foot-grid{ grid-template-columns: 1fr; }
}

/* value / timeline strip for about page */
.timeline{ position:relative; padding-left: 26px; border-left: 2px solid var(--line); }
.timeline li{ position:relative; padding-bottom: 30px; }
.timeline li:last-child{ padding-bottom:0; }
.timeline li::before{
  content:'';
  position:absolute;
  left:-32px; top:4px;
  width:12px; height:12px;
  border-radius:50%;
  background: var(--gold);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline h4{ margin-bottom:.25em; }
.timeline p{ color: var(--ink-soft); margin-bottom:0; }
