/* ==========================================================================
   theme-2026.css — "Refined corporate 2026" redesign skin
   --------------------------------------------------------------------------
   Imported LAST (after the legacy vendor style.css), so these rules win by
   source order. It restyles the EXISTING legacy template markup — it does not
   change any JSX. Brand: deep mining green (--green-800) + amber accent
   (--amber-500). Generous whitespace, hairline borders, soft shadows.

   ALL colors/spacing/type come from the design tokens declared in
   globals.css :root — never hardcode hex here. Public-site classes only;
   nothing is scoped to .ant-* so the admin antd UI is untouched.
   ========================================================================== */

/* ==========================================================================
   1. BASE & TYPOGRAPHY
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  font-weight: var(--weight-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { line-height: var(--lh-body); }

a {
  color: var(--green-700);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover,
a:focus {
  color: var(--amber-600);
}

/* Accessible keyboard focus ring across the whole public site. */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   2. BUTTONS — pill, green primary, amber accent modifier
   ========================================================================== */

.btn,
.theme-btn,
a.theme-btn,
.theme-btn-s2,
a.theme-btn-s2,
.btn-style-2,
a.btn-style-2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

/* Primary (green) — .theme-btn, .btn */
.btn,
.theme-btn,
a.theme-btn {
  background-color: var(--green-800);
  color: var(--surface);
  box-shadow: var(--shadow-xs);
}

.btn:hover,
.theme-btn:hover,
a.theme-btn:hover {
  background-color: var(--green-700);
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Accent (amber) — secondary slider button & the style-2 modifier.
   Also available as a generic .theme-btn--accent hook. */
.theme-btn-s2,
a.theme-btn-s2,
.btn-style-2,
a.btn-style-2,
.theme-btn--accent {
  background-color: var(--amber-500);
  color: var(--green-900);
  box-shadow: var(--shadow-xs);
}

.theme-btn-s2:hover,
a.theme-btn-s2:hover,
.btn-style-2:hover,
a.btn-style-2:hover,
.theme-btn--accent:hover {
  background-color: var(--amber-600);
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   3. PAGE HEADER — inner-page hero band
   ========================================================================== */

.page-header {
  position: relative;
  margin: var(--space-8) 0 var(--space-12);
  padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 5vw, 4.5rem);
  background-color: var(--green-800);
  background-image:
    radial-gradient(120% 90% at 85% -10%,
      color-mix(in srgb, var(--amber-500) 28%, transparent) 0%,
      transparent 55%),
    radial-gradient(90% 80% at 0% 120%,
      color-mix(in srgb, var(--green-900) 70%, transparent) 0%,
      transparent 60%);
  color: var(--surface);
  text-align: center;
  overflow: hidden;
  border-radius: 0;
}

/* The heading sits on the dark band — force white over any legacy vendor rule. */
.page-header h1,
.page-header h2,
.page-header .page-title {
  color: var(--surface) !important;
}

/* Hairline bottom edge to separate from the content below. */
.page-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: color-mix(in srgb, var(--amber-500) 35%, transparent);
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  margin: 0;
  color: var(--surface);
  font-size: var(--fs-3xl);
  letter-spacing: var(--tracking-tight);
}

.page-header p,
.page-header .subtitle {
  margin-top: var(--space-4);
  color: color-mix(in srgb, var(--surface) 80%, transparent);
  font-size: var(--fs-lg);
}

/* Breadcrumb sits muted-white under the title. */
.page-header .breadcrumb,
.page-header .breadcrumb a,
.page-header .breadcrumb li {
  color: color-mix(in srgb, var(--surface) 72%, transparent);
  background: transparent;
  font-size: var(--fs-sm);
}

.page-header .breadcrumb a:hover {
  color: var(--amber-400);
}

/* ==========================================================================
   4. SECTION TITLE — small uppercase amber eyebrow + large heading
   ========================================================================== */

.section-title,
.section-title-s4,
.section-title-s2 {
  margin-bottom: var(--space-8);
}

/* The eyebrow <span> above the heading. */
.section-title > span,
.section-title-s4 > span,
.section-title-s2 > span {
  display: inline-block;
  margin-bottom: var(--space-3);
  color: var(--amber-600);
  font-size: var(--fs-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.section-title h2,
.section-title-s4 h2,
.section-title-s2 h2 {
  margin: 0;
  color: var(--ink-900);
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
}

/* Inline highlight word inside the heading picks up the brand green. */
.section-title h2 span,
.section-title-s4 h2 span,
.section-title-s2 h2 span {
  color: var(--green-600);
}

/* ==========================================================================
   5. FOOTER — modern dark columns
   ========================================================================== */

.site-footer {
  background-color: var(--green-900);
  color: color-mix(in srgb, var(--surface) 78%, transparent);
  font-size: var(--fs-sm);
}

.site-footer .upper-footer {
  padding: clamp(3rem, 6vw, 5rem) 0 var(--space-12);
}

.site-footer .lower-footer {
  padding: var(--space-6) 0;
}

.site-footer a {
  color: color-mix(in srgb, var(--surface) 78%, transparent);
  transition: color var(--dur-fast) var(--ease-out);
}

.site-footer a:hover {
  color: var(--amber-400);
}

/* The legacy style.css sets `.site-footer .link-widget ul a { color: black }`
   (specificity 0,0,3,1) which beats the plain `.site-footer a` above and makes
   the footer links unreadable on the dark green. Match that specificity here
   (theme-2026.css loads after style.css, so equal specificity wins by order). */
.site-footer .link-widget ul a,
.site-footer .contact-widget ul a,
.site-footer .about-widget a {
  color: color-mix(in srgb, var(--surface) 80%, transparent);
}

.site-footer .link-widget ul a:hover,
.site-footer .contact-widget ul a:hover,
.site-footer .about-widget a:hover {
  color: var(--amber-400);
}

/* style.css also sets `.site-footer p, .site-footer li { color: #000 }`
   (specificity 0,0,1,1), which beats the base `.site-footer` color and blacks
   out non-link text — e.g. the plain address line in the contact widget. Match
   the specificity here to keep that text readable on the dark green. */
.site-footer p,
.site-footer li {
  color: color-mix(in srgb, var(--surface) 78%, transparent);
}

/* Widget columns */
.site-footer .widget {
  margin-bottom: var(--space-8);
}

.site-footer .widget-title h3,
.site-footer .widget-title {
  margin: 0 0 var(--space-6);
  color: var(--surface);
  font-size: var(--fs-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}

.site-footer .about-widget p {
  color: color-mix(in srgb, var(--surface) 70%, transparent);
}

.site-footer .link-widget ul,
.site-footer .contact-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .link-widget li,
.site-footer .contact-widget li {
  margin-bottom: var(--space-3);
  line-height: var(--lh-snug);
}

/* Social icons — 38px rounded squares. */
.site-footer .social ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .social li {
  margin: 0;
}

.site-footer .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--surface) 12%, transparent);
  color: color-mix(in srgb, var(--surface) 85%, transparent);
  transition: background-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}

.site-footer .social a:hover {
  background: var(--amber-500);
  color: var(--green-900);
  transform: translateY(-2px);
}

/* Legacy `.about-widget .social ul li a { color: black }` (specificity 0,0,5,1)
   beats the rule above (0,0,2,1) and renders the icon glyphs black on the dark
   square. Match its specificity to restore the light glyph (and dark-on-amber
   on hover). */
.site-footer .about-widget .social ul li a {
  color: color-mix(in srgb, var(--surface) 85%, transparent);
}

.site-footer .about-widget .social ul li a:hover {
  color: var(--green-900);
}

/* Hairline divider between the upper footer and copyright row. */
.site-footer .separator {
  width: 100%;
  height: 1px;
  margin: 0 0 var(--space-6);
  background: color-mix(in srgb, var(--surface) 12%, transparent);
}

.site-footer .copyright {
  margin: 0;
  color: color-mix(in srgb, var(--surface) 62%, transparent);
  font-size: var(--fs-xs);
}

.site-footer .short-links ul {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
}

/* ==========================================================================
   6. CARDS & SECTIONS — white cards, soft shadow, hover lift
   ========================================================================== */

.service,
.feature,
.feature-grids .grid,
.funfact,
.counter,
.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--line);  /* hairline */
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

.service:hover,
.feature:hover,
.feature-grids .grid:hover,
.funfact:hover,
.counter:hover,
.contact-info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--green-500) 30%, var(--line));
}

.service h3,
.feature h3,
.feature-grids .grid h3 {
  margin-top: var(--space-4);
  color: var(--ink-900);
  font-size: var(--fs-lg);
}

/* Funfact / counter numerals get the brand emphasis. */
.funfact h2,
.funfact .odometer,
.counter h2 {
  color: var(--green-600);
  font-size: var(--fs-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}

/* Contact info cards centre their icon + text. */
.contact-info-card {
  text-align: center;
  height: 100%;
}

.contact-info-card .contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--green-50);
  color: var(--green-700);
}

/* ==========================================================================
   7. FORMS — hairline inputs, focus ring, green active border
   ========================================================================== */

/* Gated to the public site (admin renders antd .ant-layout, which we leave to
   antd's own input/button styling — these zero-specificity :where() styles would
   otherwise be overridden by the bare element selectors below). */
body:not(:has(.ant-layout)) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body:not(:has(.ant-layout)) textarea,
body:not(:has(.ant-layout)) select,
body:not(:has(.ant-layout)) .form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

body:not(:has(.ant-layout)) input::placeholder,
body:not(:has(.ant-layout)) textarea::placeholder,
body:not(:has(.ant-layout)) .form-control::placeholder {
  color: var(--ink-300);
}

body:not(:has(.ant-layout)) input:not([type="checkbox"]):not([type="radio"]):focus,
body:not(:has(.ant-layout)) textarea:focus,
body:not(:has(.ant-layout)) select:focus,
body:not(:has(.ant-layout)) .form-control:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: var(--focus-ring);
}

body:not(:has(.ant-layout)) textarea,
body:not(:has(.ant-layout)) textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

/* Form submit buttons reuse the primary .theme-btn look (public site only). */
body:not(:has(.ant-layout)) .submit-btn,
body:not(:has(.ant-layout)) button[type="submit"],
body:not(:has(.ant-layout)) input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background-color: var(--green-800);
  color: var(--surface);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}

body:not(:has(.ant-layout)) .submit-btn:hover,
body:not(:has(.ant-layout)) button[type="submit"]:hover,
body:not(:has(.ant-layout)) input[type="submit"]:hover {
  background-color: var(--green-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

body:not(:has(.ant-layout)) .submit-btn:disabled,
body:not(:has(.ant-layout)) button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   8. RESPONSIVE — < 768px tightening for header / footer / cards
   ========================================================================== */

@media (max-width: 767.98px) {
  .page-header {
    padding: clamp(2.25rem, 9vw, 3.25rem) 0;
    text-align: center;
  }

  .page-header h1 {
    font-size: var(--fs-2xl);
  }

  .site-footer .upper-footer {
    padding-top: var(--space-12);
  }

  .site-footer .widget {
    margin-bottom: var(--space-6);
  }

  .site-footer .short-links ul {
    flex-wrap: wrap;
  }

  .service,
  .feature,
  .feature-grids .grid,
  .funfact,
  .counter,
  .contact-info-card {
    padding: var(--space-6);
  }
}

/* ==========================================================================
   9. REDUCED MOTION — kill transforms for users who ask
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .btn,
  .theme-btn,
  .theme-btn-s2,
  .btn-style-2,
  .theme-btn--accent,
  .service,
  .feature,
  .feature-grids .grid,
  .funfact,
  .counter,
  .contact-info-card,
  .site-footer .social a,
  .submit-btn,
  button[type="submit"],
  input[type="submit"] {
    transition: background-color var(--dur) var(--ease-out),
                color var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease-out),
                border-color var(--dur) var(--ease-out);
  }

  .btn:hover,
  .theme-btn:hover,
  .theme-btn-s2:hover,
  .btn-style-2:hover,
  .theme-btn--accent:hover,
  .service:hover,
  .feature:hover,
  .feature-grids .grid:hover,
  .funfact:hover,
  .counter:hover,
  .contact-info-card:hover,
  .site-footer .social a:hover,
  .submit-btn:hover,
  button[type="submit"]:hover,
  input[type="submit"]:hover {
    transform: none;
  }
}

/* ==========================================================================
   10. HOMEPAGE SECTIONS — About / Contact rhythm + media framing
   ========================================================================== */

/* Consistent vertical rhythm for the legacy section wrappers. */
.about-us-section-s2,
.contact-section,
.section-padding {
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

.about-us-section-s2.p-t-0 {
  padding-top: 0;
}

/* Section media (About / Contact images) — rounded, soft elevation. */
.about-image img,
.about-us-section-s2 .img-holder img,
.contact-section .img-holder img,
.section-media {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.about-details .details p,
.contact-section .contact-form p {
  color: var(--ink-700);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

/* Contact form: space the stacked fields evenly. */
.contact-form form > div {
  margin-bottom: var(--space-4);
}

.contact-form .submit-area {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* Inline submit spinner (replaces the old themify ti-reload icon). */
.contact-spinner {
  display: inline-flex;
  align-items: center;
  color: var(--green-600);
  font-size: 1.25rem;
  animation: kapan-spin 0.8s linear infinite;
}

@keyframes kapan-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-spinner { animation-duration: 1.6s; }
}

/* ==========================================================================
   11. RICH-TEXT CONTENT — typography inside admin-authored text blocks
   --------------------------------------------------------------------------
   `.rich-text-block` wraps admin HTML (BlockRenderer → TextBlock). The wrapper
   carries the admin's chosen color/size; these rules style the inner elements
   (links, lists, headings, quotes) that the admin HTML rarely sets itself, so
   they pick up sensible token-based defaults without overriding admin choices.
   ========================================================================== */

.rich-text-block {
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

.rich-text-block > * + * {
  margin-top: var(--space-4);
}

.rich-text-block h1,
.rich-text-block h2,
.rich-text-block h3,
.rich-text-block h4 {
  margin-top: var(--space-8);
  color: var(--ink-900);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
}

.rich-text-block h2 { font-size: var(--fs-xl); }
.rich-text-block h3 { font-size: var(--fs-lg); }

.rich-text-block a {
  color: var(--green-700);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--green-700) 35%, transparent);
  transition: color var(--dur-fast) var(--ease-out);
}

.rich-text-block a:hover {
  color: var(--amber-600);
  text-decoration-color: currentColor;
}

.rich-text-block ul,
.rich-text-block ol {
  padding-left: var(--space-6);
}

.rich-text-block li {
  margin-bottom: var(--space-2);
}

/* Brand-tint the list markers. */
.rich-text-block ul li::marker {
  color: var(--amber-500);
}

.rich-text-block ol li::marker {
  color: var(--green-600);
  font-weight: var(--weight-semibold);
}

.rich-text-block blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-2) var(--space-6);
  border-left: 3px solid var(--amber-500);
  color: var(--ink-700);
  font-style: italic;
}

.rich-text-block img {
  border-radius: var(--radius-md);
}

.rich-text-block strong,
.rich-text-block b {
  font-weight: var(--weight-semibold);
  color: var(--ink-900);
}

.rich-text-block hr {
  margin: var(--space-8) 0;
  border: 0;
  border-top: 1px solid var(--line);
}
