/*
Theme Name: Ember Hearth
Theme URI: https://example.local/ember-hearth
Author: Nathan + ChatGPT
Author URI: https://example.local
Description: A lightweight, conversion-focused WordPress theme for fireplace showrooms and home heating retailers.
Version: 1.0.1
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ember-hearth
Tags: custom-logo, custom-menu, featured-images, e-commerce, one-column, two-columns
*/

:root {
  --eh-bg: #100d0b;
  --eh-bg-soft: #18120f;
  --eh-panel: #211914;
  --eh-panel-light: #f7f2ec;
  --eh-text: #f7efe7;
  --eh-text-dark: #201713;
  --eh-muted: #bba99a;
  --eh-muted-dark: #6d5b50;
  --eh-accent: #d47a3d;
  --eh-accent-dark: #9e4f24;
  --eh-gold: #d4b16a;
  --eh-border: rgba(255,255,255,.12);
  --eh-border-dark: rgba(32,23,19,.13);
  --eh-radius: 24px;
  --eh-radius-sm: 14px;
  --eh-max: 1180px;
  --eh-shadow: 0 30px 80px rgba(0,0,0,.28);
  --eh-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --eh-serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--eh-bg);
  color: var(--eh-text);
  font-family: var(--eh-font);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header { top: 32px; }

img, svg, video { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }

a:hover { color: var(--eh-accent); }

button, input, textarea, select { font: inherit; }

.screen-reader-text {
  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: -999px;
  top: 1rem;
  z-index: 9999;
  padding: .8rem 1rem;
  background: #fff;
  color: #000;
  border-radius: 8px;
}

.skip-link:focus { left: 1rem; }

.container {
  width: min(calc(100% - 2rem), var(--eh-max));
  margin-inline: auto;
}

.site-topbar {
  background: #0b0807;
  border-bottom: 1px solid var(--eh-border);
  color: var(--eh-muted);
  font-size: .9rem;
}

.site-topbar__inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-topbar a { text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16,13,11,.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--eh-border);
}

.site-header__inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  min-width: max-content;
}

.custom-logo { max-height: 52px; width: auto; }

.site-title {
  display: block;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.035em;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1;
}

.site-description {
  display: block;
  color: var(--eh-muted);
  font-size: .82rem;
  margin-top: .18rem;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .55rem .8rem;
  color: var(--eh-text);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 650;
  font-size: .94rem;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--eh-border);
  border-radius: 999px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 19px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  content: "";
}

.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(4px); }

.button,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 48px;
  padding: .85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--eh-accent), #e4a15f);
  color: #1b100b !important;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 16px 35px rgba(212,122,61,.24);
  cursor: pointer;
}

.button:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background: linear-gradient(135deg, #e09156, #efbd7d);
  color: #1b100b !important;
}

.button--ghost {
  background: rgba(255,255,255,.07);
  color: #fff !important;
  border-color: var(--eh-border);
  box-shadow: none;
}

.button--ghost:hover { background: rgba(255,255,255,.12); color: #fff !important; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 14%, rgba(212,122,61,.32), transparent 34%),
    linear-gradient(145deg, #100d0b 0%, #1b120f 48%, #2b1710 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% -20%;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(212,122,61,.22), transparent 62%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, .82fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1rem;
  color: var(--eh-gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.hero h1,
.page-hero h1,
.entry-title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  letter-spacing: -.075em;
  line-height: .92;
}

.hero h1 em {
  color: var(--eh-accent);
  font-style: normal;
}

.hero__lead {
  max-width: 620px;
  margin: 1.4rem 0 0;
  color: #decfc2;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.hero__trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 2.3rem;
  max-width: 680px;
}

.trust-card {
  padding: 1rem;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--eh-border);
  border-radius: 18px;
}

.trust-card strong { display: block; color: #fff; line-height: 1.2; }
.trust-card span { display: block; color: var(--eh-muted); font-size: .9rem; margin-top: .2rem; }

.hero-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  border: 1px solid var(--eh-border);
  border-radius: 34px;
  padding: clamp(1rem, 3vw, 1.4rem);
  box-shadow: var(--eh-shadow);
}

.hero-card__visual {
  min-height: 420px;
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0/44px 44px,
    linear-gradient(0deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0/44px 44px,
    radial-gradient(circle at 50% 68%, rgba(238,137,72,.38), transparent 18%),
    linear-gradient(160deg, #332019, #15100e 70%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.fireplace-mark {
  width: min(82%, 390px);
  aspect-ratio: 1.25;
  border: 14px solid #473127;
  border-radius: 12px 12px 24px 24px;
  background:
    radial-gradient(circle at 45% 70%, #ffd27f 0 7%, #df6b37 10% 20%, transparent 28%),
    radial-gradient(circle at 58% 67%, #ffd27f 0 6%, #d85a2a 9% 19%, transparent 27%),
    linear-gradient(#0f0d0c, #1b1311);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.04), 0 32px 70px rgba(0,0,0,.45);
}

.hero-card__note {
  position: absolute;
  left: clamp(1.2rem, 3vw, 2rem);
  right: clamp(1.2rem, 3vw, 2rem);
  bottom: clamp(1.2rem, 3vw, 2rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: rgba(16,13,11,.78);
  border: 1px solid var(--eh-border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
}

.hero-card__note span { color: var(--eh-muted); font-size: .88rem; }
.hero-card__note strong { color: #fff; display: block; }

.section {
  padding: clamp(4rem, 7vw, 7rem) 0;
}

.section--light {
  background: var(--eh-panel-light);
  color: var(--eh-text-dark);
}

.section--soft { background: var(--eh-bg-soft); }

.section__head {
  max-width: 760px;
  margin-bottom: clamp(2rem, 5vw, 3.4rem);
}

.section__head h2,
.content-area h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.section__head p {
  color: var(--eh-muted-dark);
  font-size: 1.08rem;
  margin: 1rem 0 0;
}

.section--soft .section__head p,
.section:not(.section--light) .section__head p { color: var(--eh-muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  background: rgba(255,255,255,.055);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius);
  padding: clamp(1.25rem, 3vw, 1.8rem);
}

.section--light .feature-card {
  background: #fff;
  border-color: var(--eh-border-dark);
  box-shadow: 0 18px 45px rgba(42,24,15,.08);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(212,122,61,.15);
  color: var(--eh-accent-dark);
  font-weight: 900;
}

.feature-card h3 { margin: 1rem 0 .45rem; line-height: 1.15; font-size: 1.25rem; }
.feature-card p { margin: 0; color: inherit; opacity: .75; }

.split {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.split__panel {
  min-height: 420px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 62% 48%, rgba(255,198,103,.2), transparent 25%),
    linear-gradient(135deg, #2a1a15, #0f0d0b);
  border: 1px solid var(--eh-border);
  box-shadow: var(--eh-shadow);
  position: relative;
  overflow: hidden;
}

.split__panel::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: .8rem;
}

.check-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: .65rem;
  align-items: start;
}

.check-list li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(212,122,61,.18);
  color: var(--eh-accent);
  font-weight: 900;
}

.page-hero {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  background:
    radial-gradient(circle at 70% 5%, rgba(212,122,61,.25), transparent 35%),
    linear-gradient(135deg, #17100d, #100d0b);
  border-bottom: 1px solid var(--eh-border);
}

.page-hero p { max-width: 760px; color: var(--eh-muted); font-size: 1.08rem; }

.site-main { min-height: 52vh; }

.content-area {
  width: min(calc(100% - 2rem), 920px);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.content-area--wide { width: min(calc(100% - 2rem), var(--eh-max)); }

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content a { color: var(--eh-accent); }
.entry-content img { border-radius: var(--eh-radius-sm); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.post-card {
  background: rgba(255,255,255,.055);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius);
  overflow: hidden;
}

.post-card__body { padding: 1.25rem; }
.post-card h2 { font-size: 1.35rem; line-height: 1.2; margin: 0 0 .45rem; }
.post-card a { text-decoration: none; }

.cta-band {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  background: linear-gradient(135deg, #2a1710, #c76632);
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-band h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1; letter-spacing: -.045em; }
.cta-band p { margin: .65rem 0 0; color: rgba(255,255,255,.78); }

.site-footer {
  background: #0b0807;
  border-top: 1px solid var(--eh-border);
  color: var(--eh-muted);
}

.site-footer__inner {
  padding: clamp(3rem, 6vw, 5rem) 0;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 2rem;
}

.site-footer h2,
.site-footer h3 { color: #fff; margin-top: 0; }
.site-footer a { color: var(--eh-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }

.footer-menu,
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }

.site-footer__bottom {
  border-top: 1px solid var(--eh-border);
  padding: 1.1rem 0;
  font-size: .9rem;
}

.site-footer__bottom .container { display: flex; justify-content: space-between; gap: 1rem; }

/* WooCommerce */
.woocommerce-page .content-area,
.woocommerce .content-area { width: min(calc(100% - 2rem), var(--eh-max)); }

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  background: #fff;
  color: var(--eh-text-dark);
  border-radius: var(--eh-radius);
  overflow: hidden;
  border: 1px solid var(--eh-border-dark);
  box-shadow: 0 18px 45px rgba(42,24,15,.08);
}

.woocommerce ul.products li.product a img {
  margin: 0;
  aspect-ratio: 1.05;
  object-fit: cover;
  background: #eee6dc;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button { margin-left: 1rem; margin-right: 1rem; }

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--eh-text-dark);
  font-size: 1.08rem;
  line-height: 1.25;
  margin-top: 1rem;
}

.woocommerce ul.products li.product .price { color: var(--eh-accent-dark); font-weight: 900; }
.woocommerce ul.products li.product .button { margin-bottom: 1rem; }
.woocommerce span.onsale { background: var(--eh-accent); color: #1b100b; font-weight: 900; }

.woocommerce div.product {
  color: var(--eh-text-dark);
  background: var(--eh-panel-light);
  border-radius: 32px;
  padding: clamp(1rem, 3vw, 2rem);
}

.woocommerce div.product .product_title { color: var(--eh-text-dark); letter-spacing: -.04em; }
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--eh-accent-dark); font-weight: 900; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: #fff; }

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: var(--eh-accent);
  color: var(--eh-text-dark);
}

.woocommerce-message::before,
.woocommerce-info::before { color: var(--eh-accent); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--eh-border-dark);
  border-radius: 14px;
  padding: .85rem 1rem;
  background: #fff;
  color: var(--eh-text-dark);
}

label { font-weight: 750; }

@media (max-width: 980px) {
  body.admin-bar .site-header { top: 46px; }
  .site-header__inner { min-height: 70px; }
  .nav-toggle { display: inline-flex; }
  .main-navigation {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + .7rem);
    display: none;
    padding: .8rem;
    background: rgba(16,13,11,.98);
    border: 1px solid var(--eh-border);
    border-radius: 20px;
    box-shadow: var(--eh-shadow);
  }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { display: grid; gap: .2rem; }
  .main-navigation a { width: 100%; }
  .hero__inner,
  .split { grid-template-columns: 1fr; }
  .hero__inner { min-height: auto; }
  .hero-card { max-width: 640px; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-topbar__inner,
  .cta-band__inner,
  .site-footer__bottom .container { flex-direction: column; align-items: flex-start; }
  .site-topbar__inner { padding: .55rem 0; }
  .hero__trust,
  .card-grid,
  .posts-grid,
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .hero-card__visual { min-height: 320px; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-description { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
