/* Ember & Oak Candle Co. — phone first */

/* Self-hosted heading font (SIL Open Font License, see fonts/OFL.txt) */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #14100c;
  --bg-alt: #1d1711;
  --card: #221b14;
  --line: #3a2f22;
  --gold: #d4b46a;
  --gold-hi: #e6cb8a;
  --cream: #f4ead6;
  --muted: #cbbda4;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }

:focus-visible {
  outline: 3px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: .005em;
}
h2 { font-size: clamp(2rem, 7vw, 2.9rem); }
h3 { font-size: 1.65rem; }
p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 12px; color: var(--bg); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--header-h);
  padding: 0 12px 0 16px;
  background: rgba(20, 16, 12, .94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(20, 16, 12, .82); backdrop-filter: blur(8px); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  white-space: nowrap;
}
.brand img { border-radius: 6px; }
.brand:hover { color: var(--cream); }

.site-header ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-header nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
  color: var(--cream);
  text-decoration: none;
  font-size: .95rem;
}
.site-header nav a:hover { color: var(--gold); }

@media (max-width: 479px) {
  .site-header { padding: 0 6px 0 14px; }
  .brand { font-size: 1.25rem; }
  .brand img { display: none; }
  .site-header nav a { padding: 0 7px; font-size: .92rem; }
}
@media (max-width: 350px) {
  .brand img { display: block; }
  .brand span { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  font-weight: 650;
  font-size: 1.05rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--cream); border-color: rgba(244, 234, 214, .55); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: calc(72vh - var(--header-h));
  min-height: calc(72svh - var(--header-h));
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0 0 28% 0;
  z-index: -1;
}
@media (min-width: 960px) {
  .hero-media { inset: 0; }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--bg);
}
.hero-media picture { display: block; width: 100%; height: 100%; }
.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  animation: drift 22s ease-in-out infinite alternate;
  transform-origin: 50% 40%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20, 16, 12, .2) 0%, rgba(20, 16, 12, 0) 35%, rgba(20, 16, 12, .75) 72%, var(--bg) 100%);
}
@keyframes drift {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

.hero-text {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 36px;
}
.hero h1 {
  font-size: clamp(2.9rem, 13vw, 5.6rem);
  margin-bottom: .25em;
}
.hero h1 span {
  display: block;
  font-size: .45em;
  color: var(--gold);
  letter-spacing: .04em;
  margin-top: .15em;
}
.promise {
  font-size: 1.2rem;
  max-width: 30ch;
  margin-bottom: 0;
}
/* On phones the fixed bottom bar carries the order button */
.hero-actions {
  display: none;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 .6em;
  color: var(--gold);
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 0;
  scroll-margin-top: var(--header-h);
}
.section-alt { background: var(--bg-alt); }
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.narrow { max-width: 760px; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 56ch; }

/* Shop */
.products {
  display: grid;
  gap: 24px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 20px 22px;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.card h3 { margin: 0; }
.price {
  margin: 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 600;
}
.note { color: var(--muted); margin: 8px 0 20px; flex: 1; }

/* About */
.about { display: grid; gap: 32px; align-items: center; }
.about-text p:last-child { font-size: 1.15rem; line-height: 1.7; }
.about-img img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  max-height: 520px;
  width: 100%;
}

/* FAQ */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  min-height: 56px;
  padding: 18px 44px 18px 4px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--gold); }
.faq details p { color: var(--muted); padding: 0 4px 6px; }

/* Contact */
.email-link { width: 100%; word-break: break-all; margin: 8px 0 36px; }
.hours-title { font-size: 1.5rem; }
.hours { margin: 0 0 16px; }
.hours div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.hours dt { color: var(--cream); }
.hours dd { margin: 0; color: var(--muted); }
.small { color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
}
.site-footer p { margin: 0 0 6px; }
.footer-brand { font-family: var(--serif); font-size: 1.4rem; color: var(--cream); }
.site-footer a { display: inline-flex; align-items: center; min-height: 48px; }

/* ---------- Larger screens ---------- */
/* Phones: gold order button always one tap away */
.mobile-order {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(20, 16, 12, .96);
  border-top: 1px solid var(--line);
}
.mobile-order .btn { min-height: 52px; font-size: 1.1rem; }
body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
html { scroll-padding-bottom: 84px; }

@media (min-width: 640px) {
  .mobile-order { display: none; }
  body { padding-bottom: 0; }
  html { scroll-padding-bottom: 0; }
  .hero { min-height: calc(86vh - var(--header-h)); }
  .hero-actions { display: flex; margin-top: 1.5em; flex-direction: row; flex-wrap: wrap; }
  .hero-actions .btn { width: auto; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .email-link { width: auto; }
}

@media (min-width: 800px) {
  .site-header { padding: 0 28px; }
  .site-header nav a { padding: 0 14px; font-size: 1rem; }
  .about { grid-template-columns: 1.2fr 1fr; gap: 56px; }
  .section { padding: 96px 0; }
}

@media (min-width: 960px) {
  .products { grid-template-columns: repeat(3, 1fr); }
  .hero { align-items: center; }
  .hero-media img, .hero-media video { object-position: 50% 50%; }
  .hero-media::after {
    background: linear-gradient(to right, var(--bg) 0%, rgba(20, 16, 12, .9) 32%, rgba(20, 16, 12, .35) 58%, rgba(20, 16, 12, .1) 100%);
  }
  .hero-text { padding: 0 28px; }
  .promise { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img, .hero-media video { animation: none; }
  * { transition: none !important; }
}

/* ---------- 404 page ---------- */
.page-404 { padding-bottom: 0; }
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 160px);
  min-height: calc(100svh - var(--header-h) - 160px);
  padding: 64px 20px;
  text-align: center;
}
.notfound img { border-radius: 16px; margin-bottom: 24px; }
.notfound h1 { font-size: clamp(2.4rem, 10vw, 4rem); }
.notfound .lead { margin: 0 auto 28px; max-width: 36ch; }
