/* ========= Base ========= */

:root {
  --bg: #fdf5f8;
  --bg-alt: #ffffff;
  --accent: #b76e79;
  --accent-soft: rgba(183, 110, 121, 0.08);
  --accent-dark: #8b4c57;
  --navy: #22253a;
  --text-main: #2a2a36;
  --text-muted: #7b7b8c;
  --border-subtle: #e4dde4;
  --card-shadow: 0 18px 40px rgba(15, 10, 20, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --transition-fast: 180ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #fff9fc 0, var(--bg) 40%, #f6eef5 100%);
}

/* ========= Layout ========= */

.container {
  width: min(1120px, 100% - 2.5rem);
  margin: 0 auto;
}

.section {
  padding: 4rem 0 4.5rem;
}

.alt-section {
  background: #fff;
}

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-heading h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 2.5vw + 1.5rem, 2.7rem);
  margin: 0 0 0.75rem;
  color: var(--navy);
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
}

/* ========= Header ========= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 250, 252, 0.96);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #ffeef6, #f2cad8 50%, #fbe8f2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(183, 110, 121, 0.4);
}

.logo-mark svg {
  width: 22px;
  height: 22px;
}

.logo-ring {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
}

.logo-diamond {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--navy);
}

.logo-text span {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.main-nav a:hover {
  color: var(--accent-dark);
  border-color: var(--accent-soft);
}

/* ========= Hero ========= */

.hero {
  padding-top: 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent-dark);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 3vw + 1.6rem, 3.1rem);
  margin: 0 0 1rem;
  color: var(--navy);
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0, #f3a6ba 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(183, 110, 121, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(183, 110, 121, 0.65);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent-dark);
  border: 1px solid var(--accent-soft);
}

.btn-ghost:hover {
  background: #ffffff;
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-image-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transform-origin: center;
}

.hero-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image-overlay {
  position: absolute;
  inset: auto 1.2rem 1.2rem 1.2rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(15, 9, 21, 0.74);
  color: #fff;
  backdrop-filter: blur(14px);
}

.hero-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.85;
}

.hero-stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.15rem 0 0.3rem;
}

.hero-stat-footnote {
  font-size: 0.78rem;
  opacity: 0.86;
}


.hero-image-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: radial-gradient(circle at 10% 0, #fff5fb 0, #f3cad9 35%, #f7edf5 70%, #ffffff 100%);
  min-height: 280px;
  display: flex;
  align-items: stretch;
}

.hero-visual {
  position: relative;
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.hero-visual-top {
  display: flex;
  justify-content: flex-start;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.hero-visual-main {
  margin-top: 0.7rem;
}

.hero-visual-rings {
  position: relative;
  width: 78px;
  height: 48px;
  margin-bottom: 0.7rem;
}

.hero-visual-rings .ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 25px rgba(120, 50, 70, 0.35);
  background: radial-gradient(circle at 30% 0, #ffeef8, #f4c9da 55%, #fef7fb);
}

.hero-visual-rings .ring-left {
  left: 0;
  top: 4px;
}

.hero-visual-rings .ring-right {
  right: 0;
  top: 0;
}

.hero-visual-title {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
  color: var(--navy);
}

.hero-visual-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual-bottom {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.hero-visual-stat {
  flex: 1 1 min(140px, 100%);
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(19, 10, 25, 0.72);
  backdrop-filter: blur(16px);
  color: #fff;
}

.hero-visual-stat .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.78;
}

.hero-visual-stat .value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

@media (max-width: 720px) {
  .hero-image-card {
    min-height: 230px;
  }
}
/* ========= Cards & Fields ========= */

.card {
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.7rem;
  box-shadow: 0 14px 26px rgba(23, 14, 34, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.calc-card h3,
.breakdown-card h3,
.info-card h3,
.tip-card h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}

.mt-lg {
  margin-top: 1.6rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.field.small {
  margin-bottom: 0.6rem;
}

.field.tiny {
  margin-bottom: 0.5rem;
}

.field span {
  font-weight: 500;
}

.field-input-prefix {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.7rem;
  background: #fff;
}

.field-input-prefix span:first-child {
  color: var(--text-muted);
  font-size: 0.9rem;
}

input[type="number"] {
  border: none;
  outline: none;
  font-size: 0.95rem;
  width: 100%;
  background: transparent;
  font-family: inherit;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0;
}

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

.percent-total {
  margin: 0.6rem 0;
  font-size: 0.85rem;
}

.percent-warning {
  margin-left: 0.4rem;
  font-weight: 600;
}

/* ========= Calculator Layout ========= */

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: flex-start;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 0.6rem;
}

/* Custom scroll */
.breakdown-list::-webkit-scrollbar {
  width: 6px;
}
.breakdown-list::-webkit-scrollbar-track {
  background: transparent;
}
.breakdown-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
}

.breakdown-row {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 0.9rem 1rem 0.9rem;
  background: linear-gradient(135deg, #ffffff 0, #fff7fb 40%, #ffffff 100%);
  box-shadow: 0 6px 16px rgba(15, 10, 21, 0.06);
}

.breakdown-label h4 {
  margin: 0 0 0.1rem;
  font-size: 0.98rem;
  color: var(--navy);
}

.breakdown-label .muted {
  margin: 0;
  font-size: 0.8rem;
}

.breakdown-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem 0.8rem;
  margin-top: 0.8rem;
  align-items: center;
}

.value-pair {
  font-size: 0.85rem;
}

.value-pair .label {
  color: var(--text-muted);
}

.value-pair .value {
  font-weight: 600;
}

.over-under .value.positive {
  color: #118a4d;
}

.over-under .value.negative {
  color: #c93f4b;
}

.progress-wrapper {
  margin-top: 0.6rem;
}

.progress-bar-bg {
  height: 6px;
  border-radius: 999px;
  background: rgba(183, 110, 121, 0.12);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0, #f4aabf 100%);
  transition: width 220ms ease-out;
}

/* Summary */

.summary {
  margin-top: 1.4rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.07);
  padding-top: 0.9rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.summary-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.summary-highlight span:last-child {
  font-weight: 700;
  color: var(--accent-dark);
}

.summary-actions {
  margin-top: 1rem;
  text-align: left;
}

.print-note {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========= Info & Tips ========= */

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

.info-card,
.tip-card {
  padding: 1.3rem 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(250, 240, 246, 0.8);
  box-shadow: 0 10px 28px rgba(23, 14, 35, 0.06);
}

.info-card p,
.tip-card p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========= FAQ ========= */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 0.8rem 1rem;
  background: #ffffff;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========= Footer ========= */

.site-footer {
  border-top: 1px solid rgba(230, 220, 230, 0.8);
  background: #fcf7fa;
  margin-top: 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 2rem 0 1.3rem;
}

.footer-brand .muted {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.footer-links h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.footer-links a {
  display: block;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.footer-links a:hover {
  color: var(--accent-dark);
}

.footer-bottom {
  border-top: 1px solid rgba(230, 220, 230, 0.9);
}

.footer-bottom-inner {
  padding: 0.75rem 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.muted {
  color: var(--text-muted);
}

/* ========= Scroll Animations ========= */

.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ========= Responsive ========= */

@media (max-width: 900px) {
  .hero-grid,
  .calculator-grid,
  .info-grid,
  .tips-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero-image-card {
    order: -1;
  }

  .breakdown-card {
    order: 1;
  }

  .info-grid,
  .tips-grid {
    gap: 1.1rem;
  }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }

  .section {
    padding: 3rem 0 3.5rem;
  }

  .calculator-grid {
    gap: 1.3rem;
  }

  .percent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .breakdown-values {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
  }

  .summary {
    font-size: 0.86rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 0.3rem;
  }
}

/* ========= Print Styles ========= */

@media print {
  body {
    background: #ffffff;
  }

  .site-header,
  .hero,
  .info-grid,
  .tips-section,
  .faq-section,
  .site-footer {
    display: none !important;
  }

  .calculator-section {
    padding-top: 0;
  }

  .breakdown-list {
    max-height: none;
    overflow: visible;
  }

  .card {
    box-shadow: none;
    border: 1px solid #cccccc;
  }
}


/* ========= Contact Form ========= */
.contact-form textarea {
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.7rem;
}

/* Page-specific spacing tweaks to reduce extra whitespace on text-heavy pages */
.page-about .section:last-of-type,
.page-contact .section:last-of-type {
  padding-bottom: 2rem;
  margin-bottom: 0;
}

.page-about main.section,
.page-contact main.section {
  padding-bottom: 2.5rem;
}

.page-about .section:last-of-type,
.page-contact .section:last-of-type {
  padding-bottom: 1.25rem;
  margin-bottom: 0;
}

.page-about main.section,
.page-contact main.section {
  padding-bottom: 1.5rem;
}

/* global bottom spacing tweak v2 */
section.section:last-of-type {
  padding-bottom: 1.25rem;
  margin-bottom: 0;
}

/* ========= Mobile Layout Enhancements (max-width: 768px) ========= */
/* These rules only affect phones and small tablets and do not change desktop layout. */
@media (max-width: 768px) {
  .shell {
    padding-inline: 1.25rem;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .nav-inner {
    gap: 0.75rem;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 2.4rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .hero-text {
    text-align: left;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .hero-actions .btn-ghost {
    justify-content: center;
    width: 100%;
  }

  .hero-image-card {
    max-width: 420px;
    margin: 0 auto;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 0.9rem;
  }

  .hero-stat {
    flex: 1 1 140px;
  }

  .section {
    padding: 2.4rem 0;
  }

  .section-heading {
    margin-bottom: 2rem;
    padding-inline: 0.25rem;
  }

  .info-grid,
  .tips-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .calculator-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }

  .breakdown-list {
    max-height: none;
    padding-right: 0;
  }

  .summary-card {
    position: static;
  }

  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .site-footer {
    margin-top: 1.2rem;
  }
}
