/* ==========================================================================
   DERMAX LAB ACADEMY — GLOBAL FOOTER
   LIGHT + DARK THEME
   ========================================================================== */

/* --------------------------------------------------------------------------
   Footer theme tokens — LIGHT is the default.
   -------------------------------------------------------------------------- */
:root {
  --footer-bg:
    radial-gradient(circle at 14% 15%, rgba(183, 138, 67, .08), transparent 27%),
    linear-gradient(135deg, #fbf8f2 0%, #fffdfa 54%, #f5efe5 100%);

  --footer-text: #6d675e;
  --footer-text-soft: #8b847a;
  --footer-heading: #956b2d;
  --footer-link: #5f5a53;
  --footer-link-hover: #171717;

  --footer-border: rgba(183, 138, 67, .18);
  --footer-social-bg: rgba(183, 138, 67, .035);
  --footer-social-color: #6d675e;
  --footer-social-hover-bg: rgba(183, 138, 67, .10);

  --footer-newsletter-bg: rgba(255, 255, 255, .62);
  --footer-newsletter-text: #171717;
  --footer-newsletter-placeholder: #8b847a;

  --footer-bottom-text: #8b847a;
  --footer-decor-border: rgba(183, 138, 67, .08);
}


/* --------------------------------------------------------------------------
   DARK theme tokens
   -------------------------------------------------------------------------- */
html[data-theme="dark"] {
  --footer-bg:
    radial-gradient(circle at 14% 15%, rgba(216, 183, 118, .07), transparent 26%),
    linear-gradient(135deg, #181a1b 0%, #232323 54%, #171819 100%);

  --footer-text: rgba(255, 255, 255, .62);
  --footer-text-soft: rgba(255, 255, 255, .46);
  --footer-heading: #d8b776;
  --footer-link: rgba(255, 255, 255, .66);
  --footer-link-hover: #ffffff;

  --footer-border: rgba(255, 255, 255, .08);
  --footer-social-bg: rgba(255, 255, 255, .025);
  --footer-social-color: rgba(255, 255, 255, .74);
  --footer-social-hover-bg: rgba(183, 138, 67, .10);

  --footer-newsletter-bg: rgba(255, 255, 255, .035);
  --footer-newsletter-text: #ffffff;
  --footer-newsletter-placeholder: rgba(255, 255, 255, .42);

  --footer-bottom-text: rgba(255, 255, 255, .46);
  --footer-decor-border: rgba(216, 183, 118, .06);
}


/* ==========================================================================
   FOOTER BASE
   ========================================================================== */

.site-footer {
  position: relative;
  overflow: hidden;

  margin-top: 0;

  background: var(--footer-bg);
  color: var(--footer-text);

  border-top: 1px solid var(--footer-border);

  transition:
    background 320ms ease,
    color 220ms ease,
    border-color 220ms ease;
}

.site-footer::before {
  content: "";

  position: absolute;
  top: -220px;
  right: -140px;

  width: 520px;
  height: 520px;

  border: 1px solid var(--footer-decor-border);
  border-radius: 50%;

  box-shadow:
    0 0 0 70px color-mix(in srgb, var(--footer-decor-border) 35%, transparent),
    0 0 0 145px color-mix(in srgb, var(--footer-decor-border) 18%, transparent);

  pointer-events: none;
}

.footer-shell {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns:
    minmax(235px, 1.35fr)
    repeat(3, minmax(130px, .7fr))
    minmax(260px, 1.15fr);

  gap: clamp(28px, 3.4vw, 58px);

  padding-top: 62px;
  padding-bottom: 44px;
}


/* ==========================================================================
   BRAND + LOGO THEME SWITCH
   ========================================================================== */

.footer-brand-column {
  max-width: 330px;
}

.footer-brand {
  position: relative;

  width: min(270px, 100%);
  height: 72px;

  display: block;
}

.footer-logo {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;
  object-position: left center;

  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

/* ----------------------------------------------------------
   Footer logo switching — explicit and cache/conflict safe

   LIGHT MODE:
   dark-colour logo visible, light-colour logo hidden.

   DARK MODE:
   light-colour logo visible, dark-colour logo hidden.
   ---------------------------------------------------------- */

html[data-theme="light"] .site-footer .footer-logo-dark,
html:not([data-theme="dark"]) .site-footer .footer-logo-dark {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html[data-theme="light"] .site-footer .footer-logo-light,
html:not([data-theme="dark"]) .site-footer .footer-logo-light {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

html[data-theme="dark"] .site-footer .footer-logo-dark {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

html[data-theme="dark"] .site-footer .footer-logo-light {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.footer-brand:hover .footer-logo {
  transform: translateY(-1px);
}

.footer-brand-copy {
  max-width: 295px;

  margin: 18px 0 0;

  color: var(--footer-text);

  font-size: 13px;
  line-height: 1.7;
}


/* ==========================================================================
   SOCIALS
   ========================================================================== */

.footer-socials {
  display: flex;
  align-items: center;
  gap: 9px;

  margin-top: 22px;
}

.footer-socials a {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  border: 1px solid var(--footer-border);
  border-radius: 50%;

  background: var(--footer-social-bg);
  color: var(--footer-social-color);

  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

.footer-socials a:hover {
  transform: translateY(-3px);

  border-color: rgba(183, 138, 67, .45);

  background: var(--footer-social-hover-bg);
  color: var(--color-gold-dark);
}

html[data-theme="dark"] .footer-socials a:hover {
  color: var(--color-gold-light);
}

.footer-socials svg {
  width: 16px;
  height: 16px;

  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.7;
}

.footer-socials rect,
.footer-socials circle {
  fill: none;
}

.footer-socials .footer-social-play {
  fill: currentColor;
  stroke: none;
}


/* ==========================================================================
   LINKS / TITLES
   ========================================================================== */

.footer-column-title {
  margin: 2px 0 18px;

  color: var(--footer-heading);

  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .04em;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  width: fit-content;

  color: var(--footer-link);

  font-size: 12px;
  line-height: 1.5;

  transition:
    color var(--transition-fast),
    transform var(--transition-fast);
}

.footer-links a:hover {
  transform: translateX(3px);
  color: var(--footer-link-hover);
}


/* ==========================================================================
   NEWSLETTER
   ========================================================================== */

.footer-newsletter-copy {
  max-width: 310px;

  margin: 0;

  color: var(--footer-text);

  font-size: 12px;
  line-height: 1.65;
}

.footer-newsletter-form {
  margin-top: 18px;
}

.footer-newsletter-field {
  display: grid;
  grid-template-columns: 1fr 48px;

  min-height: 48px;

  overflow: hidden;

  border: 1px solid var(--footer-border);
  border-radius: 9px;

  background: var(--footer-newsletter-bg);

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.footer-newsletter-field:focus-within {
  border-color: rgba(183, 138, 67, .58);
  box-shadow: 0 0 0 3px rgba(183, 138, 67, .08);
}

.footer-newsletter-field input {
  min-width: 0;
  width: 100%;

  padding: 0 14px;

  border: 0;
  outline: none;

  background: transparent;
  color: var(--footer-newsletter-text);

  font-size: 12px;
}

.footer-newsletter-field input::placeholder {
  color: var(--footer-newsletter-placeholder);
}

.footer-newsletter-field button {
  display: grid;
  place-items: center;

  padding: 0;

  border: 0;

  background:
    linear-gradient(
      135deg,
      var(--color-gold-dark),
      var(--color-gold)
    );

  color: #ffffff;

  cursor: pointer;

  transition:
    filter var(--transition-fast),
    transform var(--transition-fast);
}

.footer-newsletter-field button:hover {
  filter: brightness(1.08);
}

.footer-newsletter-field button:active {
  transform: scale(.96);
}

.footer-newsletter-field button svg {
  width: 18px;
  height: 18px;
}

.footer-newsletter-status {
  min-height: 18px;

  margin: 7px 0 0;

  color: var(--footer-text-soft);

  font-size: 10px;
  line-height: 1.5;
}


/* ==========================================================================
   FOOTER BOTTOM
   ========================================================================== */

.footer-bottom {
  min-height: 66px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding-block: 18px;

  border-top: 1px solid var(--footer-border);

  color: var(--footer-bottom-text);

  font-size: 10px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-bottom-links a {
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--footer-heading);
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1180px) {
  .footer-grid {
    grid-template-columns:
      minmax(240px, 1.3fr)
      repeat(3, minmax(120px, .7fr));

    gap: 34px;
  }

  .footer-newsletter-column {
    grid-column: 1 / -1;

    display: grid;
    grid-template-columns: minmax(230px, .8fr) minmax(320px, 1.2fr);
    align-items: end;

    gap: 28px;

    padding-top: 4px;
  }

  .footer-newsletter-column .footer-column-title {
    grid-column: 1;
  }

  .footer-newsletter-copy {
    grid-column: 1;
  }

  .footer-newsletter-form {
    grid-column: 2;
    grid-row: 1 / span 2;

    width: 100%;
    max-width: 500px;

    margin-top: 0;
  }
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;

    gap: 34px 28px;

    padding-top: 52px;
  }

  .footer-brand-column {
    grid-column: 1 / -1;
    max-width: none;
  }

  .footer-brand-copy {
    max-width: 420px;
  }

  .footer-newsletter-column {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;

    gap: 34px 22px;

    padding-top: 44px;
    padding-bottom: 34px;
  }

  .footer-brand-column,
  .footer-newsletter-column {
    grid-column: 1 / -1;
  }

  .footer-brand {
    width: 220px;
    height: 60px;
  }

  .footer-brand-copy {
    max-width: 330px;
  }

  .footer-newsletter-column {
    display: block;
  }

  .footer-newsletter-form {
    max-width: none;
    margin-top: 17px;
  }

  .footer-bottom {
    min-height: auto;

    flex-direction: column;
    align-items: flex-start;

    gap: 8px;

    padding-block: 18px 24px;
  }
}

@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-link-column,
  .footer-newsletter-column {
    grid-column: 1;
  }
}
