:root {
  --bg: #f7ead9;
  --bg-accent: #f4c98a;
  --surface: rgba(255, 250, 243, 0.78);
  --surface-strong: #fff9f1;
  --ink: #26160d;
  --ink-soft: #674b39;
  --line: rgba(38, 22, 13, 0.12);
  --brand: #da5d2f;
  --brand-deep: #8f2d15;
  --highlight: #ffd46b;
  --shadow: 0 22px 70px rgba(92, 51, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 212, 107, 0.7), transparent 26%),
    radial-gradient(circle at top right, rgba(218, 93, 47, 0.16), transparent 24%),
    linear-gradient(180deg, #fff6e8 0%, var(--bg) 45%, #fbeee2 100%);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.ad-banner,
.card,
.content-panel {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero-copy {
  padding: 40px;
}

.eyebrow,
.result-kicker,
.ad-label {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--brand-deep);
}

h1,
h2 {
  font-family: "Fraunces", serif;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.8rem, 2vw, 2.6rem);
}

.lede,
.section-copy,
.result-narrative,
.content-panel p,
.ad-copy,
li {
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 1rem;
}

.ad-banner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
  border-style: dashed;
  border-color: rgba(143, 45, 21, 0.25);
}

.calculator-section,
.seo-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card,
.content-panel {
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.calculator-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 10px;
  font-weight: 700;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  border-radius: 16px;
  padding: 14px 16px;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), #f28a55);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 25px rgba(218, 93, 47, 0.28);
}

.secondary-button {
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.result-card {
  min-height: 100%;
  display: flex;
}

.orbital-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.75;
}

.orb-one {
  width: 190px;
  height: 190px;
  right: -38px;
  top: -30px;
  background: radial-gradient(circle at 35% 35%, #fff4cb, #ffb961 58%, rgba(255, 185, 97, 0));
  animation: drift 8s ease-in-out infinite;
}

.orb-two {
  width: 170px;
  height: 170px;
  left: -34px;
  bottom: -24px;
  background: radial-gradient(circle at 50% 50%, #ffdcb4, #da5d2f 62%, rgba(218, 93, 47, 0));
  animation: drift 10s ease-in-out infinite reverse;
}

.pulse-ring {
  position: absolute;
  inset: 18% 16%;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  animation: pulse 3.6s ease-in-out infinite;
}

.result-empty,
.result-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.result-empty {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.result-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.hidden {
  display: none;
}

.metric-emphasis {
  color: var(--brand-deep);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 22px 0;
}

.metric-box {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(38, 22, 13, 0.08);
}

.metric-box strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: "Fraunces", serif;
}

.ghost-metrics {
  margin-top: 26px;
}

.ghost-box,
.ghost-life-meter {
  background: rgba(255, 255, 255, 0.44);
}

.ghost-box {
  position: relative;
  overflow: hidden;
}

.ghost-box strong,
.ghost-life-meter strong {
  color: rgba(38, 22, 13, 0.42);
}

.ghost-box::after,
.ghost-life-meter-track::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2.8s ease-in-out infinite;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.life-meter {
  margin: 6px 0 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(38, 22, 13, 0.08);
}

.life-meter-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.life-meter-topline strong {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  color: var(--ink);
}

.ghost-life-meter .life-meter-topline strong {
  color: rgba(38, 22, 13, 0.42);
}

.life-meter-track {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(63, 160, 92, 0.18) 0%, rgba(237, 191, 74, 0.18) 56%, rgba(207, 77, 58, 0.18) 100%),
    rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(38, 22, 13, 0.08);
}

.life-meter-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #47a163 0%, #eab54b 58%, #cf4d3a 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ghost-life-meter {
  margin-top: 0;
}

.ghost-life-meter-track {
  position: relative;
}

.ghost-life-meter-fill {
  width: 22%;
  opacity: 0.38;
  background: linear-gradient(90deg, #47a163 0%, #85c27e 100%);
  animation: previewFill 3.2s ease-in-out infinite;
}

.share-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.share-actions button {
  flex: 1 1 0;
}

.seo-section {
  margin-top: 24px;
}

.site-footer {
  margin-top: 24px;
  padding: 22px 28px;
  border-radius: 24px;
  background: rgba(255, 249, 241, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.footer-brand {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.footer-copy {
  margin: 0;
  color: var(--ink-soft);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-nav a {
  color: var(--brand-deep);
  text-decoration: none;
  font-weight: 700;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.faq-panel ul {
  margin: 0;
  padding-left: 18px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.legal-panel {
  max-width: 860px;
  margin: 0 auto;
}

.legal-panel h1 {
  max-width: none;
  margin-bottom: 8px;
}

.legal-panel h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.legal-panel ul {
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.legal-panel a {
  color: var(--brand-deep);
}

.article-layout {
  display: grid;
  gap: 24px;
}

.article-hero,
.article-section,
.article-faq,
.article-cta {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 32px;
}

.article-hero h1 {
  max-width: 12ch;
}

.article-meta {
  margin-top: 18px;
  color: var(--ink-soft);
  max-width: 70ch;
  line-height: 1.7;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-list,
.faq-list {
  margin: 16px 0 0;
  padding-left: 20px;
}

.article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
}

.article-links a {
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
}

.article-links a:hover {
  text-decoration: underline;
}

.faq-item + .faq-item {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 8px;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
}

.compact-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #f28a55);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 12px 25px rgba(218, 93, 47, 0.2);
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-8px, 12px, 0) scale(1.06);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.01);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes previewFill {
  0%,
  100% {
    width: 18%;
    opacity: 0.28;
  }
  50% {
    width: 34%;
    opacity: 0.46;
  }
}

@media (max-width: 900px) {
  .hero,
  .calculator-section,
  .seo-section {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .card,
  .content-panel,
  .ad-banner {
    padding: 24px;
  }

  h1 {
    max-width: none;
  }

  .share-actions {
    flex-wrap: wrap;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
