/*
Theme Name:  JAEXI Theme V3
Theme URI:   https://jaexi.com
Author:      PT Java Exim Indonesia
Description: JAEXI V3 — 100% structured after InterAmerican Coffee. Heritage Trade Aesthetic by Google Stitch. Source Serif 4 + Hanken Grotesk. No emojis.
Version:     3.0.0
License:     GPL v2
Text Domain: jaexi
*/

/* ============================================================
   GOOGLE FONTS — Source Serif 4 + Hanken Grotesk
   Loaded via functions.php enqueue
============================================================ */

/* ============================================================
   STITCH DESIGN TOKENS — Heritage Trade Aesthetic
============================================================ */
:root {
  /* Primary Greens */
  --primary:            #004922;
  --primary-mid:        #006330;
  --secondary:          #2d6c06;
  --on-primary:         #ffffff;
  --on-primary-cont:    #89dd9d;

  /* Earth Tones */
  --tertiary:           #503a25;
  --tertiary-cont:      #69513a;
  --on-tertiary:        #ffffff;

  /* Surfaces — Warm Cream Palette */
  --surface:            #fbf9f4;
  --surface-dim:        #dbdad5;
  --surface-low:        #f5f3ee;
  --surface-cont:       #f0eee9;
  --surface-high:       #eae8e3;
  --surface-highest:    #e4e2dd;
  --white:              #ffffff;

  /* Accent Surfaces */
  --parchment:          #F2EFE9;
  --leaf-tint:          #D9E6DB;

  /* Dark / Espresso */
  --espresso:           #2C1E12;
  --espresso-mid:       #30312e;

  /* Text */
  --on-surface:         #1b1c19;
  --on-surface-var:     #3f4940;
  --on-surface-inv:     #f2f1ec;

  /* Borders */
  --outline:            #6f7a6f;
  --outline-var:        #bfc9bd;

  /* State */
  --error:              #ba1a1a;

  /* Typography */
  --serif:  'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:   'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing (Stitch: 8px base, 1280px container, 24px gutters) */
  --container:          1280px;
  --gutter:             24px;
  --section-gap:        100px;
  --section-gap-sm:     64px;

  /* Border Radius (Stitch: soft, not zero) */
  --r-xs:   2px;
  --r-sm:   4px;    /* buttons, inputs */
  --r-md:   8px;    /* cards */
  --r-lg:   12px;
  --r-full: 9999px;

  /* Shadows (Stitch: tonal, very low opacity) */
  --shadow-sm:  0 1px 4px rgba(80, 58, 37, 0.08);
  --shadow-md:  0 4px 16px rgba(80, 58, 37, 0.10);
  --shadow-lg:  0 8px 32px rgba(80, 58, 37, 0.12);

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur:  0.25s;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 18px; /* Stitch body-lg base */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--on-surface);
  background: var(--surface);
  overflow-x: hidden;
}

/* Typography Scale (Stitch spec) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.75rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 3rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 700; }
h6 { font-size: 0.875rem; font-weight: 700; }

p {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--on-surface-var);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--sans);
}

input, select, textarea {
  font-family: var(--sans);
  font-size: 1rem;
}

address { font-style: normal; }

/* ============================================================
   LAYOUT UTILITIES
============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

.container--wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Section spacing */
section {
  padding: var(--section-gap) 0;
}

/* ============================================================
   TYPOGRAPHY UTILITIES
============================================================ */

/* Label — Hanken Grotesk uppercase small */
.label-sm {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-var);
}

/* Section header block */
.sec-eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 12px;
  display: block;
}

.sec-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sec-desc {
  font-size: 1rem;
  color: var(--on-surface-var);
  line-height: 1.65;
  max-width: 600px;
}

.sec-hd { margin-bottom: 56px; }
.sec-hd--center { text-align: center; }
.sec-hd--center .sec-desc { margin: 0 auto; }

/* ============================================================
   CHIP / BADGE UTILITIES
============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.chip--leaf     { background: var(--leaf-tint); color: var(--primary); }
.chip--organic  { background: #d8f0de; color: #1a5c27; }
.chip--halal    { background: #dce8f8; color: #1a3a6b; }
.chip--fair     { background: #e6e0f0; color: #3a1f6b; }
.chip--rain     { background: #d8f0ec; color: #0f4a3e; }
.chip--project  { background: #e8edd8; color: #3a4a1a; }
.chip--grade    { background: var(--leaf-tint); color: var(--primary); }

/* Status dot */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--on-surface-var);
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status--available .status__dot  { background: #22c55e; }
.status--low       .status__dot  { background: #f59e0b; }
.status--coming    .status__dot  { background: #94a3b8; }

/* ============================================================
   BUTTON UTILITIES
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--r-sm);
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.btn--primary:hover {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--outline:hover {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
  padding-left: 0;
}
.btn--ghost:hover { color: var(--primary-mid); gap: 14px; }

.btn--sm { padding: 8px 18px; font-size: 0.82rem; }
.btn--lg { padding: 16px 36px; font-size: 0.95rem; }

/* ============================================================
   REVEAL ANIMATION
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE LAYOUT UTILITIES
============================================================ */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.grid-split-contact {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-card {
  background: var(--white);
  padding: 48px;
  border-radius: var(--r-lg);
  border: 1px solid var(--outline-var);
  box-shadow: var(--shadow-lg);
}

.cert-detail-card {
  background: var(--surface-low);
  border: 1px solid var(--outline-var);
  padding: 32px;
  border-radius: var(--r-md);
  display: flex;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .grid-2-col,
  .grid-split-contact {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .container--wide {
    padding: 0 20px;
  }
}

@media (max-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .form-card {
    padding: 24px 20px;
  }
  .cert-detail-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    gap: 16px;
  }
  .cert-detail-card > div {
    width: 100%;
  }
  .cert-detail-card img {
    margin: 0 auto;
  }
}

/* ============================================================
   SINGLE POST CONTENT TYPOGRAPHY (Premium Reading Experience)
   ============================================================ */
.entry-content {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--on-surface-var);
  padding: 0 24px;
}

.entry-content p {
  margin-bottom: 24px;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--on-surface-var);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--serif);
  color: var(--primary);
  font-weight: 600;
  line-height: 1.25;
  margin: 40px 0 16px;
}

.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.45rem; }
.entry-content h4 { font-size: 1.25rem; }

.entry-content ul,
.entry-content ol {
  margin-bottom: 28px;
  padding-left: 28px;
}

.entry-content ul {
  list-style-type: disc;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--surface-low);
  padding: 20px 28px;
  margin: 36px 0;
  font-style: italic;
  font-family: var(--serif);
  color: var(--espresso);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.entry-content blockquote p {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.entry-content img {
  border-radius: var(--r-md);
  border: 1px solid var(--outline-var);
  box-shadow: var(--shadow-sm);
  margin: 36px auto;
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .entry-content {
    padding: 0 16px;
  }
}

/* ============================================================
   SITEMAP PAGE TEMPLATE STYLING (Premium B2B layout)
   ============================================================ */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: start;
}

.sitemap-card {
  background: var(--white);
  border: 1px solid var(--outline-var);
  border-top: 4px solid var(--primary);
  border-radius: var(--r-md);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.sitemap-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.sitemap-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--outline-var);
}

.sitemap-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--leaf-tint);
  color: var(--primary);
  border-radius: var(--r-full);
}

.sitemap-card__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.sitemap-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-item {
  position: relative;
  padding-left: 20px;
  transition: transform var(--dur) var(--ease);
}

.sitemap-item::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--secondary);
  font-weight: bold;
  opacity: 0.7;
  transition: transform var(--dur) var(--ease);
}

.sitemap-item:hover {
  transform: translateX(6px);
}

.sitemap-item:hover::before {
  transform: scale(1.2);
  color: var(--primary);
}

.sitemap-link {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--on-surface-var);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
  display: inline-block;
  line-height: 1.4;
}

.sitemap-link:hover {
  color: var(--primary);
}

.sitemap-meta {
  display: block;
  font-size: 0.76rem;
  color: var(--outline);
  margin-top: 2px;
  font-weight: 400;
}

@media (max-width: 1024px) {
  .sitemap-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .sitemap-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .sitemap-card {
    padding: 28px 24px;
  }
}



