/* ==========================================================================
   Taman Jugra Cemerlang — static rebuild of starfield.com.my
   No framework, no build step. Edit freely.
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable weight) ---------- */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/roboto-var.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto Slab";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/roboto-slab-var.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --red: #c33007;          /* accent: headings, icons, submit */
  --salmon: #e17c60;       /* CTA buttons */
  --navy: #042551;         /* CTA button text */
  --brown: #524442;        /* hero + intro text */
  --slate: #54595f;        /* section headings */
  --grey: #7a7a7a;         /* body copy */
  --mint: #eff4ed;         /* alternating section bg */
  --sand: #c5baa6;         /* footer bg */
  --line: #d9d2c6;         /* form borders */
  --white: #ffffff;
  --wa: #25d366;

  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-slab: "Roboto Slab", Georgia, "Times New Roman", serif;

  --container: 1140px;
  --gutter: 20px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
h1, h2, h3, h4, p, ul { margin: 0; }
p + p { margin-top: 1em; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: 10px 16px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  font: 600 16px/1 var(--font);
  color: var(--navy);
  background: var(--salmon);
  border: 0; border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--red); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 28px; }

/* ---------- Shape dividers (from original design) ---------- */
.shape {
  position: absolute; left: 0; width: 100%;
  line-height: 0; pointer-events: none; overflow: hidden;
  z-index: 1;
}
.shape svg { display: block; width: calc(100% + 1.3px); position: relative; left: 50%; transform: translateX(-50%); }
.shape svg { fill: var(--white); }
.shape--top { top: -1px; }
.shape--bottom { bottom: -1px; transform: rotate(180deg); }
.shape--wave svg { height: 135px; }
.shape--tilt svg { height: 68px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 40px 150px;
  background: var(--sand);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero__box {
  position: relative; z-index: 2;
  width: 100%; max-width: 800px;
  padding: 25px;
  text-align: center;
  background: rgba(239, 244, 237, .87);
}
.hero__eyebrow { font: 600 18px/1.5 var(--font); color: var(--red); }
.hero__title { margin-top: 8px; font: 600 36px/1.1 var(--font); color: var(--brown); }
.hero__tagline { margin-top: 12px; font: 400 28px/1.5 var(--font-slab); color: var(--brown); }
.hero .btn { margin-top: 22px; }

/* ---------- Section headings ---------- */
.eyebrow { font: 600 18px/1.5 var(--font); color: var(--brown); }
.h-slab { font: 400 28px/1.2 var(--font-slab); color: var(--slate); }
.intro .h-slab { color: var(--brown); margin-top: 10px; }
.subhead { margin-top: 18px; font: 600 16px/1.3 var(--font); color: var(--slate); }

/* Divider with home icon */
.divider {
  display: flex; align-items: center; gap: 10px;
  width: 300px; max-width: 100%;
  margin: 16px 0 20px;
  color: var(--red);
}
.divider::before,
.divider::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.divider svg { width: 20px; height: 20px; flex: none; }

/* ---------- Intro ---------- */
.intro { padding: 70px 0 90px; }
.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 50px;
  align-items: start;
}
.intro__copy p { color: var(--brown); }
.intro__copy .lead-strong { font-weight: 600; }

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px 40px;
  padding-top: 20px;
}
.feature { display: flex; gap: 15px; align-items: flex-start; }
.feature__icon {
  flex: none;
  width: 51px; height: 51px;
  display: grid; place-items: center;
  border: 3px solid var(--red); border-radius: 50%;
  color: var(--red);
}
.feature__icon svg { width: 25px; height: 25px; }
.feature__title { margin-top: 12px; font: 600 18px/1.5 var(--font); color: var(--red); }
.feature__text { margin-top: 10px; color: var(--grey); }
.feature__text strong { color: var(--brown); }

/* ---------- Product blocks ---------- */
.product { position: relative; padding: 110px 0; }
.product--mint { background: var(--mint); }
.product--plain { padding: 70px 0; }
.product__grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 50px;
  align-items: center;
}
.product--reverse .product__media { order: 2; }

.product__media { position: relative; padding: 20px 0 0 15px; }
.product__media picture img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.product__label {
  position: absolute; top: 0; left: 0;
  width: 230px; max-width: 45%;
  z-index: 2;
  transform: rotate(-2deg);
}
.product__copy ul { margin-top: 14px; padding-left: 40px; }
.product__copy li + li { margin-top: 24px; }
.product__copy p + ul { margin-top: 16px; }
.product__copy .subhead + .divider { margin-top: 20px; }
.product__copy strong { color: var(--slate); }

/* ---------- Contact ---------- */
.contact { padding: 80px 0 90px; scroll-margin-top: 20px; }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 50px;
  align-items: start;
}
.map {
  position: relative;
  width: 100%; aspect-ratio: 575 / 300; min-height: 300px;
  background: var(--mint);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contact__title { margin-bottom: 22px; }
.contact__title strong { font-weight: 700; }

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field--full { grid-column: 1 / -1; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 16px;
  font: 400 16px/1.4 var(--font);
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 84px; resize: vertical; }
.field select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2354595f'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
.field select:invalid { color: #9a9a9a; }
.field ::placeholder { color: #9a9a9a; opacity: 1; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(195, 48, 7, .12); }
.field.is-invalid input,
.field.is-invalid select { border-color: var(--red); }

/* Honeypot: hidden from people, visible to naive bots */
.hp {
  position: absolute !important;
  left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.form-actions { margin-top: 22px; text-align: center; }
.btn-submit {
  min-width: 141px;
  padding: 12px 40px;
  font: 600 16px/1 var(--font);
  color: var(--white);
  background: var(--red);
  border: 1px solid var(--white);
  border-radius: 15px;
  cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}
.btn-submit:hover { background: #a42805; }
.btn-submit[disabled] { opacity: .65; cursor: progress; }

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  font-size: 15px;
  text-align: center;
}
.form-status:empty { display: none; }
.form-status.is-success { background: var(--mint); color: #2f5d2a; border: 1px solid #cfe0c9; }
.form-status.is-error { background: #fdf0ec; color: var(--red); border: 1px solid #f2c9bd; }

.recaptcha-note { margin-top: 14px; font-size: 12px; color: #9a9a9a; text-align: center; }
.recaptcha-note a { color: inherit; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 17px 10px;
  background: var(--sand);
  color: var(--white);
  text-align: center;
  font: 300 14px/1.5 var(--font);
}

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; left: 40px; bottom: 40px; z-index: 50;
  width: 51px; height: 51px;
  display: grid; place-items: center;
  background: var(--wa); color: var(--white);
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: transform .3s ease;
}
.wa-float:hover { transform: translateY(-6px); }
.wa-float svg { width: 32px; height: 32px; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(96vw, 1100px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(20, 16, 15, .86); }
.lightbox__figure { margin: 0; text-align: center; }
.lightbox__img {
  max-width: 100%; max-height: calc(94vh - 60px);
  width: auto; margin-inline: auto;
  background: var(--white);
}
.lightbox__caption { margin-top: 12px; color: var(--white); font-size: 15px; }
.lightbox__close {
  position: absolute; top: -44px; right: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 30px; line-height: 1;
  color: var(--white); background: none; border: 0; cursor: pointer;
}

/* ---------- Reveal on scroll (JS only) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* reCAPTCHA badge sits bottom-right; keep it clear of nothing else */
.grecaptcha-badge { z-index: 40; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .intro__grid,
  .product__grid,
  .contact__grid { gap: 36px; }
  .features { gap: 40px 24px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }

  .hero { min-height: 520px; padding: 40px 16px 110px; }
  .shape--wave svg { height: 70px; }
  .shape--tilt svg { height: 40px; }
  .hero__eyebrow { font-size: 16px; }
  .hero__title { font-size: 26px; }
  .hero__tagline { font-size: 21px; }

  .intro { padding: 50px 0 60px; }
  .intro__grid,
  .product__grid,
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .intro__head { text-align: center; }
  .intro__head .divider,
  .product__copy .divider { margin-inline: auto; }
  .h-slab { font-size: 24px; }

  .features { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 0; }

  .product { padding: 70px 0; }
  .product--plain { padding: 50px 0; }
  .product--reverse .product__media { order: 0; }
  .product__copy { text-align: left; }
  .product__copy .h-slab,
  .product__copy .subhead { text-align: center; }
  .product__copy ul { padding-left: 22px; }
  .product__copy li + li { margin-top: 12px; }
  .btn-row { justify-content: center; gap: 12px; }

  .contact { padding: 50px 0 70px; }
  .contact__title { text-align: center; }
  .contact__form { order: -1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }

  .wa-float { left: 16px; bottom: 16px; }
}
