/*
Theme Name: Daring Heart Astra Child
Theme URI: https://daringhearthk.com
Author: Daring Heart Limited
Description: DARING HEART / 萬聯的 Astra 子主題，配合 WooCommerce 使用。
Version: 1.1.2
Requires at least: 6.4
Requires PHP: 7.4
Template: astra
Text Domain: daring-heart-astra-child
*/

:root {
  --dh-sand: #e8dcc7;
  --dh-oat: #d4b895;
  --dh-gold: #b68a4a;
  --dh-moss: #606c38;
  --dh-clay: #b08b6e;
  --dh-ink: #2c261f;
  --dh-ink-soft: #5b4e41;
  --dh-line: rgba(44, 38, 31, 0.22);
  --dh-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --dh-body: "Avenir Next", Avenir, "Gill Sans", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--dh-sand);
  color: var(--dh-ink);
  font-family: var(--dh-body);
}

a {
  transition: color 300ms ease, background-color 300ms ease, border-color 300ms ease;
}

:focus-visible {
  outline: 3px solid var(--dh-gold);
  outline-offset: 4px;
}

/* Astra owns the site header, footer and global navigation. */
.ast-primary-header-bar,
.site-primary-header-wrap {
  background: rgba(232, 220, 199, 0.96);
}

.ast-primary-header-bar {
  min-height: 78px;
  border-bottom-color: var(--dh-line);
}

.site-header-primary-section-left .custom-logo-link img {
  width: auto;
  max-width: 250px;
  max-height: 58px;
  height: auto;
}

/* Safe fallback until the approved Logo is assigned in Site Identity. */
body:not(.wp-custom-logo) .site-branding .site-title {
  margin: 0;
  line-height: 1;
}

body:not(.wp-custom-logo) .site-branding .site-title a {
  width: 250px;
  height: 58px;
  display: block;
  overflow: hidden;
  background: url("assets/brand/logo-header.svg") left center / contain no-repeat;
  color: transparent;
  font-size: 0;
}

body:not(.wp-custom-logo) .site-branding .site-description {
  display: none;
}

.main-header-menu > .menu-item > .menu-link {
  color: var(--dh-ink);
  font-family: var(--dh-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (min-width: 922px) {
  .main-header-menu {
    flex-wrap: nowrap;
    align-items: center;
  }

  .main-header-menu > .dh-menu-item > .menu-link {
    padding-inline: clamp(9px, 1.1vw, 16px);
    white-space: nowrap;
  }
}

.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .current-menu-item > .menu-link,
.main-header-menu > .current-menu-ancestor > .menu-link {
  color: var(--dh-gold);
}

.ast-header-button-1 .ast-custom-button {
  border-color: var(--dh-moss);
  border-radius: 24px;
  background: var(--dh-moss);
  color: var(--dh-sand);
}

.daring-heart-organic .site-footer {
  display: none;
}

.dh-global-footer {
  position: relative;
  padding: clamp(56px, 7vw, 96px) 24px;
  overflow: hidden;
  border-radius: 0;
  background: #2f3820;
  color: #fffaf0;
}

.dh-global-footer::before {
  content: none;
}

.dh-global-footer__inner {
  position: relative;
  width: min(100%, 1392px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  align-items: end;
  gap: clamp(40px, 8vw, 120px);
}

.dh-global-footer__logo {
  width: min(100%, 340px);
  display: block;
}

.dh-global-footer__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.dh-global-footer__name,
.dh-global-footer__description {
  margin: 0;
}

.dh-global-footer__name {
  font-family: var(--dh-display);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
}

.dh-global-footer__description {
  margin-top: 18px;
  color: rgba(255, 250, 240, 0.7);
}

.dh-global-footer__contact {
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: rgba(255, 250, 240, 0.7);
  font-size: 13px;
}

.dh-global-footer__contact a {
  color: #fffaf0;
  text-underline-offset: 0.25em;
}

.dh-global-footer__nav {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.dh-global-footer__nav a {
  color: #fffaf0;
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 0.25em;
}

.dh-global-footer__nav a:hover,
.dh-global-footer__nav a:focus {
  color: var(--dh-oat);
}

.dh-global-footer__nav--policies {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 250, 240, 0.2);
}

/* Public information and policy pages created by v1.0.3. */
.dh-public-page {
  max-width: 860px;
  margin-inline: auto;
  color: var(--dh-ink);
  font-size: 16px;
  line-height: 1.75;
}

.dh-public-page h2,
.dh-public-page h3 {
  color: var(--dh-ink);
  font-family: var(--dh-display);
  letter-spacing: -0.02em;
}

.dh-public-page h2 {
  margin-top: 2.4em;
  font-size: clamp(28px, 4vw, 42px);
}

.dh-public-page h3 {
  margin-top: 1.8em;
  font-size: clamp(21px, 3vw, 28px);
}

.dh-public-page p,
.dh-public-page li {
  color: var(--dh-ink-soft);
}

.dh-public-page a,
.dh-public-page code {
  color: var(--dh-moss);
}

.daring-heart-public-info .site-content {
  padding: clamp(48px, 7vw, 96px) 24px;
  background: var(--dh-sand);
}

.daring-heart-public-info .site-content > .ast-container {
  width: min(100%, 1180px);
  max-width: 1180px;
  margin-inline: auto;
  padding: 0;
  display: block;
}

.daring-heart-public-info #primary {
  width: 100%;
  margin: 0;
}

.daring-heart-public-info .site-main > .page {
  margin: 0;
  padding: clamp(34px, 6vw, 76px);
  border: 1px solid var(--dh-line);
  border-radius: 32px;
  background: rgba(212, 184, 149, 0.28);
}

.daring-heart-public-info .entry-header,
.daring-heart-public-info .entry-content {
  max-width: 900px;
  margin-inline: auto;
}

.daring-heart-public-info .entry-title {
  margin-bottom: clamp(40px, 6vw, 72px);
  color: var(--dh-ink);
  font-family: var(--dh-display);
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.dh-public-page code {
  padding: 0;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
}

/* The custom front page supplies its own inner layout. */
.home .site-content > .ast-container {
  width: 100%;
  max-width: none;
  padding: 0;
  display: block;
}

.home .site-content,
.home #primary.dh-site {
  margin: 0;
  padding: 0;
  background: var(--dh-sand);
}

@media (max-width: 921px) {
  .site-header-primary-section-left .custom-logo-link img {
    max-width: 220px;
  }

  body:not(.wp-custom-logo) .site-branding .site-title a {
    width: 220px;
    height: 54px;
    background-image: url("assets/brand/logo-mobile.svg");
  }

  .dh-global-footer__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .daring-heart-public-info .site-main > .page {
    border-radius: 24px;
  }
}

@media (max-width: 544px) {
  body:not(.wp-custom-logo) .site-branding .site-title a {
    width: 180px;
    height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
