/*
Theme Name: ESI Indonesia
Theme URI: https://rombak.media/esi
Author: Rombak
Author URI: https://rombak.media
Description: Custom theme for ESI Indonesia — Energy Savings Insurance. Bilingual (EN/ID). Visual style mirrors GoSafe ESI Europe.
Version: 2.0.0
License: Private
Text Domain: esi-indonesia
*/

/* ============================================================
   BRAND TOKENS — CSS Custom Properties
   ============================================================ */

:root {
  /* Colors */
  --color-teal:        #2AA79B;
  --color-teal-deep:   #1F8F86;
  --color-lime:        #A6C63A;
  --color-lime-dark:   #6A7D0A;
  --color-black:       #000000;
  --color-graphite:    #333333;
  --color-grey-cool:   #BDBDBD;
  --color-grey-light:  #F2F2F2;
  --color-grey-mid:    #EBEBEB;
  --color-white:       #FFFFFF;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Roboto Condensed', sans-serif;

  /* Spacing scale (8px base) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  16px;
  --space-4:  24px;
  --space-5:  32px;
  --space-6:  48px;
  --space-7:  64px;
  --space-8:  80px;
  --space-9:  96px;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 40px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-med:  300ms ease;
  --transition-slow: 500ms ease;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-nav:  0 2px 16px rgba(0, 0, 0, 0.10);

  /* Border radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  background-repeat: no-repeat;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.25;
  color: var(--color-graphite);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-heading);
}

h1 { font-weight: 700; }
h2, h3, h4, h5, h6 { font-weight: 400; }

p {
  margin: 0;
}

button {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  border: none;
  background: none;
  padding: 0;
}

/* ============================================================
   TYPOGRAPHY UTILITY CLASSES (matching GoSafe structure)
   ============================================================ */

.headlines {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 700;
  font-size: 50px;
  line-height: 1;
}

.headlines--big {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 700;
  font-size: 84px;
  line-height: 1.1;
}

.highlights {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
}

.highlights--bold {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
}

.text {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
}

.text--bold {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
}

/* Color modifiers */
.text--white  { color: var(--color-white); }
.text--teal   { color: var(--color-teal); }
.text--lime   { color: var(--color-lime); }
.text--grey   { color: #666666; }

/* Background modifiers */
.bg--grey-light { background-color: var(--color-grey-light); }
.bg--teal       { background-color: var(--color-teal); }
.bg--white      { background-color: var(--color-white); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container--wide {
  max-width: 1400px;
}

.flex {
  display: flex;
}

/* ============================================================
   CTA / BUTTON STYLES (matching GoSafe .cta class)
   ============================================================ */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  border-radius: 15px;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  background-color: var(--color-teal);
  color: var(--color-white);
  border: 2px solid var(--color-teal);
}

.cta:hover {
  background-color: var(--color-teal-deep);
  border-color: var(--color-teal-deep);
  color: var(--color-white);
}

.cta--white {
  background-color: #2AA79B;
  color: #FFFFFF;
  border-color: #2AA79B;
}

.cta--white:hover {
  background-color: var(--color-grey-light);
  border-color: var(--color-grey-light);
  color: var(--color-teal-deep);
}

.cta--outline {
  background-color: var(--color-white);
  color: var(--color-teal);
  border-color: var(--color-teal);
}

.cta--outline:hover {
  background-color: var(--color-teal);
  color: var(--color-white);
}

/* Small CTA — used inside document cards on the Downloads page */
.cta--sm {
  font-size: 14px;
  padding: 8px 20px;
  border-radius: var(--radius-md);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.screen-reader-text {
  position: absolute;
  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;
  top: -100px;
  left: var(--space-3);
  background: var(--color-teal);
  color: var(--color-white);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-3);
}

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

/* ============================================================
   MOBILE BREAKPOINTS
   ============================================================ */

@media (max-width: 990px) {
  :root {
    --container-pad: 24px;
  }
}

@media (max-width: 578px) {
  :root {
    --container-pad: 20px;
  }

  .headlines        { font-size: 28px; }
  .headlines--big   { font-size: 60px; }
  .highlights       { font-size: 20px; }
  .highlights--bold { font-size: 20px; }
  .text             { font-size: 15px; }
  .text--bold       { font-size: 15px; }
}

/* ============================================================
   HOME — PARTNERS SECTION
   ============================================================ */

.home-partners {
  padding-top: var(--space-9); /* 96px — breathing room above */
}

/* ============================================================
   HOME — WHO IS IT FOR SECTION
   ============================================================ */

.home-why {
  position: relative;
  overflow: hidden;
  padding-bottom: var(--space-9); /* 96px — keeps decor from touching next section */
}

.home-why__decor {
  position: absolute;
  top: -40px;
  right: -60px;
  width: 340px;   /* fixed size — does not stretch to container */
  height: auto;
  pointer-events: none;
}

/* ============================================================
   CONTACT PAGE — HERO
   ============================================================ */

.contact-hero {
  padding: var(--space-7) 0 var(--space-6);
  border-bottom: 1px solid var(--color-grey-mid);
}

.contact-hero__eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-grey-cool);
  margin-bottom: var(--space-2);
}

.contact-hero__title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.contact-hero__intro {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-graphite);
  max-width: 560px;
}

/* ============================================================
   CONTACT PAGE — DETAILS SECTION
   ============================================================ */

.contact-section {
  padding: var(--space-7) 0;
}

.contact-section__heading {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--color-graphite);
  margin-bottom: var(--space-6);
}

/* Two-column grid: details left, map right */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}

/* Contact items list */
.contact-details__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Each row: icon box + text */
.contact-details__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

/* Grey rounded icon box */
.contact-details__icon-box {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--color-grey-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-graphite);
}

/* Text content beside icon box */
.contact-details__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px; /* align text baseline with icon center */
}

/* Caps label above value (EMAIL, ADDRESS, SOCIAL & WEB) */
.contact-details__label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-grey-cool);
}

/* Actual value text */
.contact-details__value {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-graphite);
  font-style: normal; /* override browser default on <address> */
}

/* Clickable email link */
.contact-details__value--link {
  color: var(--color-teal);
  text-decoration: underline;
}
.contact-details__value--link:hover {
  color: var(--color-teal-deep);
}

/* Placeholder values (pending from BASE) */
.contact-details__value--placeholder {
  color: var(--color-grey-cool);
}

/* "(Pending from BASE)" note */
.contact-details__note {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-grey-cool);
  font-style: italic;
}

/* Social / web pill buttons */
.contact-social__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.contact-social__btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1.5px solid var(--color-teal);
  border-radius: 20px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 13px;
  color: var(--color-teal);
  text-decoration: none;
  line-height: 1.4;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.contact-social__btn:hover {
  background: var(--color-teal);
  color: var(--color-white);
}

/* Placeholder state — URL not yet set (points to #) */
.contact-social__btn[aria-disabled="true"] {
  border-color: var(--color-grey-cool);
  color: var(--color-grey-cool);
  cursor: not-allowed;
}
.contact-social__btn[aria-disabled="true"]:hover {
  background: transparent;
  color: var(--color-grey-cool);
}

/* ============================================================
   CONTACT PAGE — MAP PLACEHOLDER
   ============================================================ */

.contact-map__placeholder {
  width: 100%;
  height: 340px;
  background: var(--color-grey-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4);
}

.contact-map__placeholder-text {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-grey-cool);
  line-height: 1.8;
}

.contact-map__placeholder-sub {
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* ============================================================
   CONTACT PAGE — PARTNERS SECTION
   ============================================================ */

.contact-partners {
  background-image: url('/wp-content/themes/esi-indonesia/assets/images/partners-bg.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: var(--space-8) 0 420px;
  text-align: center;
}

.contact-partners::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.contact-partners .container {
  position: relative;
  z-index: 1;
}

.contact-partners__eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-2);
}

.contact-partners__heading {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-7);
}

/* Three logo items in a row */
.contact-partners__logos {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

/* Individual logo item */
.partner-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 180px;
}

/* Logo container box — grey bg until real logo is loaded */
.partner-logo-item__img-wrap {
  width: 160px;
  height: 90px;
  background: var(--color-grey-mid);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Actual logo image, fills the box */
.partner-logo-item__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-3);
}

/* Role / organisation name below logo */
.partner-logo-item__role {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  color: #ffffff;
  text-align: center;
}

/* Attribution text at bottom of partners section */
.contact-partners__attribution {
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
}

/* ============================================================
   CONTACT PAGE — RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .contact-hero__title {
    font-size: 36px;
  }

  /* Stack contact details and map vertically on mobile */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  /* Shorter map placeholder on mobile */
  .contact-map__placeholder {
    height: 220px;
  }

  .contact-partners__logos {
    gap: var(--space-4);
  }

  .partner-logo-item {
    max-width: 140px;
  }

  .partner-logo-item__img-wrap {
    width: 130px;
    height: 75px;
  }
}
