/* =========================================================
   SAJIRIA — TANAH ROTI THEME (Gabungan Clay + Linen + Kilang)
   "Lain dari biasa" — hangat, mentah, organik, industri Sabah
   ========================================================= */

:root {
  /* === Tanah & Roti Palette (Light) === */
  --tr-bg: #F8F4ED;           /* Warm linen */
  --tr-surface: #F5F0E6;      /* Cream roti */
  --tr-surface-2: #EDE6D9;    /* Light clay */
  --tr-text: #2C2522;         /* Deep earth */
  --tr-muted: #6B5F55;        /* Muted tanah */
  --tr-primary: #A0522D;      /* Sienna / Clay utama */
  --tr-primary-dark: #7A3E22; /* Clay gelap */
  --tr-accent: #3D5A5A;       /* Deep teal kilang */
  --tr-accent-2: #C5A36E;     /* Butter / ochre lembut */
  --tr-line: #D9D0C3;         /* Garis linen */
  --tr-green: #4A5C3D;        /* Hijau sawah lembut */

  /* Spacing & Shape */
  --tr-radius: 14px;
  --tr-radius-lg: 22px;
  --tr-shadow: 0 10px 30px rgba(44, 37, 34, 0.08);
  --tr-shadow-lg: 0 20px 50px rgba(44, 37, 34, 0.12);

  /* Typography */
  --tr-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --tr-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Dark mode — lebih dalam, konkrit + tanah */
html[data-theme="dark"] {
  --tr-bg: #1F1C18;
  --tr-surface: #25221D;
  --tr-surface-2: #2C2823;
  --tr-text: #EDE6D9;
  --tr-muted: #A89B8C;
  --tr-primary: #C17A55;
  --tr-primary-dark: #A0522D;
  --tr-accent: #5E7A7A;
  --tr-accent-2: #C5A36E;
  --tr-line: #3F3932;
  --tr-green: #5C6E4E;
}

/* Base */
body.tr-tanah-roti {
  background: var(--tr-bg);
  color: var(--tr-text);
  font-family: var(--tr-body);
}

.tr-tanah-roti h1, 
.tr-tanah-roti h2, 
.tr-tanah-roti h3, 
.tr-tanah-roti h4 {
  font-family: var(--tr-display);
  letter-spacing: -0.025em;
}

/* ========== NAV — Lebih senyap & hangat ========== */
.j-nav {
  background: rgba(248, 244, 237, 0.92);
  border-bottom: 1px solid var(--tr-line);
}
html[data-theme="dark"] .j-nav {
  background: rgba(31, 28, 24, 0.92);
}
.j-brand-mark {
  background: var(--tr-primary);
  color: #fff;
  border-radius: 10px;
}
.j-nav-links a {
  color: var(--tr-muted);
}
.j-nav-links a:hover {
  color: var(--tr-primary);
}

/* ========== HERO — Lebih dramatik & mentah ========== */
.j-corporate-hero {
  background: var(--tr-surface);
  padding: 100px 24px 80px;
}

/* Inline hero video (video-in-video, right column) */
.j-hero-video-inline {
  position: relative;
  border-radius: var(--tr-radius-lg);
  overflow: hidden;
  box-shadow: var(--tr-shadow-lg);
  border: 1px solid var(--tr-line);
  aspect-ratio: 16 / 9;
  background: #0c0a08;
  max-width: 100%;
}
.j-hero-video-inline iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 150%;
  border: 0;
  transform: translate(-50%, -50%) scale(1.18);
}
.j-corporate-hero-visual .j-hero-video-inline {
  grid-column: 1 / -1;
  max-width: 100%;
}
.j-corporate-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}
.j-corporate-hero-copy h1 {
  font-size: clamp(52px, 7vw, 78px);
  line-height: 0.96;
  font-weight: 800;
  color: var(--tr-text);
}
.j-corporate-hero-copy .j-eyebrow {
  color: var(--tr-primary);
  letter-spacing: 0.14em;
}
.j-hero-actions .j-btn-primary {
  background: var(--tr-primary);
  color: #fff;
  border: none;
}
.j-hero-actions .j-btn-ghost {
  border-color: var(--tr-line);
  color: var(--tr-text);
}
.j-hero-actions .j-btn-ghost:hover {
  border-color: var(--tr-primary);
  color: var(--tr-primary);
}

/* ========== SECTION RHYTHM — Lain dari biasa ========== */
.j-section {
  padding: 88px 24px;
}
.j-section-alt {
  background: var(--tr-surface-2);
}

/* Wide horizontal blocks (gabungan idea) */
.tr-wide-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 42px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}
.tr-wide-block.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}
.tr-wide-block .media {
  border-radius: var(--tr-radius-lg);
  overflow: hidden;
  box-shadow: var(--tr-shadow);
}
.tr-wide-block .media img {
  width: 100%;
  height: auto;
  display: block;
}

/* Horizontal story / panel cards */
.tr-horizontal-panel {
  display: flex;
  gap: 28px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius-lg);
  padding: 28px;
  box-shadow: var(--tr-shadow);
}
.tr-horizontal-panel .media {
  flex: 0 0 260px;
  border-radius: 12px;
  overflow: hidden;
}
.tr-horizontal-panel .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tr-horizontal-panel .body {
  flex: 1;
}

/* Distinct card grid — kurang monoton */
.tr-distinct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  max-width: 1280px;
  margin: 0 auto;
}
.tr-distinct-grid .j-content-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tr-distinct-grid .j-content-card:hover {
  transform: translateY(-6px);
  border-color: var(--tr-primary);
  box-shadow: var(--tr-shadow-lg);
}

/* Product cards — lebih lebar & selesa */
.j-product-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius);
  box-shadow: var(--tr-shadow);
}
.j-product-card:hover {
  box-shadow: var(--tr-shadow-lg);
}

/* Buttons */
.j-btn-primary {
  background: var(--tr-primary);
  color: #fff;
}
.j-btn-primary:hover {
  background: var(--tr-primary-dark);
}
.j-text-link {
  color: var(--tr-primary);
  font-weight: 700;
}

/* Quote / highlight cards */
.j-quote-card,
.j-closing-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius-lg);
  box-shadow: var(--tr-shadow);
}

/* ========== NeuralOps tetap halus tapi sesuai tema ========== */
.nops-layer,
.nops-bg {
  opacity: 0.07;
}
.nops-sig,
.nops-micro {
  color: var(--tr-primary);
}

/* NeuralOps accent styles — defined once here, not re-emitted per include */
.nops-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .08;
  z-index: 0;
  border-radius: inherit;
}
.nops-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.nops-sig {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tr-primary);
  opacity: .75;
}
.nops-sig svg {
  flex: 0 0 auto;
}
.nops-sig .nops-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nops-micro {
  display: inline-block;
  color: var(--tr-primary);
  opacity: .65;
  vertical-align: middle;
}
.nops-micro svg {
  display: block;
}
.j-section {
  position: relative;
}
.nops-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.nops-layer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.j-corporate-hero {
  position: relative;
}

/* ========== Footer — lebih padat & berasa kilang ========== */
.j-footer {
  background: #2C2823;
  color: #C9BEB0;
}
.j-footer a {
  color: #C9BEB0;
}
.j-footer a:hover {
  color: #EDE6D9;
}
.j-footer-bottom {
  border-top: 1px solid rgba(201, 190, 176, 0.2);
}

/* ========== Small utilities ========== */
.tr-earthy {
  color: var(--tr-primary);
}
.tr-concrete {
  color: var(--tr-muted);
}

/* Mobile adjustments */
@media (max-width: 900px) {
  .tr-wide-block,
  .tr-wide-block.reverse {
    grid-template-columns: 1fr;
  }
  .tr-horizontal-panel {
    flex-direction: column;
  }
  .tr-horizontal-panel .media {
    flex: none;
    height: 220px;
  }
}

/* ========== Combined Rhythm: Varied blocks ========== */
.tr-story-block {
  max-width: 860px;
  margin: 0 auto;
  font-size: 17.5px;
  line-height: 1.78;
}

.tr-media-led {
  display: grid;
  gap: 18px;
}
.tr-media-led figure {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--tr-line);
}

.tr-section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--tr-line), transparent);
  margin: 52px 0;
}

/* Product listing more spacious */
.j-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* Make cards feel more like "kilang panels" */
.j-content-card {
  border-radius: 14px;
  border-color: var(--tr-line);
  background: var(--tr-surface);
}

/* Product detail — earthy panel style */
.j-product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
}
.j-product-gallery {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: 18px;
  padding: 18px;
}
.j-product-main-img img {
  border-radius: 12px;
  width: 100%;
}
.j-product-info h1 {
  font-size: clamp(32px, 4vw, 44px);
}
.j-product-story-block {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--tr-surface-2);
  border: 1px solid var(--tr-line);
  border-radius: 12px;
}
.j-product-story-label {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--tr-primary);
  font-weight: 800;
}

/* Stronger earthy forms */
input, textarea, select {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  color: var(--tr-text);
  border-radius: 10px;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--tr-primary);
  outline: none;
}

/* Today cards + note cards earthy */
.j-today-card,
.j-note-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: 14px;
}
.j-today-card span,
.j-note-card span {
  color: var(--tr-primary);
}

/* Manufacturing two-image block on home */
.j-split-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.j-split-story img {
  border-radius: 16px;
  border: 1px solid var(--tr-line);
}

/* Make the innovation/newsroom on home use better rhythm */
.j-split-story p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--tr-text);
}

/* Shop sidebar earthy */
.j-shop-sidebar a.active {
  background: var(--tr-primary);
  color: #fff;
  border-radius: 8px;
}
.j-shop-toolbar {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
}

/* Recognition & similar pages */
.tr-timeline-like {
  max-width: 980px;
  margin: 0 auto;
}

/* =========================================================
   LEGACY GRID HARMONIZATION — Tanah Roti earthy rhythm
   Replace repetitive corporate grids with warm, varied panels
   ========================================================= */

.j-moment-grid,
.j-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.j-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}

.j-history-card,
.j-content-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius);
  padding: 18px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.j-history-card:hover,
.j-content-card:hover {
  transform: translateY(-4px);
  border-color: var(--tr-primary);
  box-shadow: var(--tr-shadow);
}

.j-subtle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
}

.j-subtle-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.j-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
}

.j-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  color: var(--tr-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}

.j-chip:hover {
  border-color: var(--tr-primary);
  color: var(--tr-primary);
}

/* Make section heads earthy */
.j-section-head {
  max-width: 1280px;
  margin: 0 auto 28px;
}

.j-section-head h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  color: var(--tr-text);
}

.j-eyebrow {
  color: var(--tr-primary);
  font-weight: 700;
  letter-spacing: .12em;
  font-size: 11px;
}

/* Rich text & prose for policy/faq */
.j-rich-text,
.j-prose {
  font-size: 17px;
  line-height: 1.78;
  color: var(--tr-text);
}

.j-prose h2, .j-prose h3 {
  color: var(--tr-primary);
  margin-top: 32px;
}

/* FAQ cards */
.j-today-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius);
  padding: 20px 22px;
}

.j-today-card strong {
  color: var(--tr-primary);
  display: block;
  margin-bottom: 8px;
}

/* Policy page hero harmonize */
.j-page-hero,
.j-page-hero-inner {
  background: var(--tr-surface);
  color: var(--tr-text);
}

.j-page-hero h1 {
  color: var(--tr-text);
}

/* Cart / enquiry table polish */
.j-cart-table .j-cart-row {
  border-bottom: 1px solid var(--tr-line);
}

.j-cart-summary,
.j-checkout-summary {
  background: var(--tr-surface);
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius);
  padding: 20px;
}

/* Make sure product grid uses tr spacing */
.j-product-grid {
  max-width: 1280px;
  margin: 0 auto;
}

/* Ensure NeuralOps accents stay visible on earthy bg */
.nops-micro,
.nops-sig {
  opacity: .55;
}
