/* ============================================================
   HostTally — Design System
   Brand: warm terracotta / deep charcoal, hospitality-professional
   ============================================================ */

:root {
  --charcoal: #2b2420;
  --charcoal-dark: #1a1512;
  --terracotta: #c1613b;
  --terracotta-light: #e08a5b;
  --terracotta-dark: #9c4527; /* used anywhere terracotta sits behind/as text — passes WCAG AA (6.4:1 on white) */
  --bg: #faf7f4;
  --bg-card: #ffffff;
  --border: #e7ddd3;
  --text: #2b2420;
  --text-muted: #6b6058;
  --warning-bg: #fff7ed;
  --warning-border: #f4d9b0;
  --profit: #2e7d43;       /* green — at or above breakeven */
  --profit-soft: #e5f3e9;
  --loss: #c0392b;         /* red — below breakeven */
  --loss-soft: #fdeceb;
  --radius: 10px;
  --max-width: 1120px;
  --shadow: 0 2px 10px rgba(43, 36, 32, 0.07);
  --shadow-lg: 0 8px 30px rgba(43, 36, 32, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--terracotta-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / Nav ---------- */
.site-header { background: var(--charcoal); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: var(--max-width); margin: 0 auto; }
.logo { color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.logo span { color: var(--terracotta-light); }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: #e8dfd6; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-cta { background: var(--terracotta-dark); color: #fff !important; padding: 8px 18px; border-radius: 6px; font-weight: 600; }
.nav-cta:hover { background: #7d3720; text-decoration: none; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, rgba(43, 36, 32, 0.88) 0%, rgba(26, 21, 18, 0.92) 100%), url('../images/hero.jpg') center / cover no-repeat; color: #fff; padding: 64px 0 80px; text-align: center; }
.eyebrow { display: inline-block; background: rgba(224, 138, 91, 0.18); color: var(--terracotta-light); padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.02em; }
.hero p.lead { font-size: 1.15rem; color: #d8cec4; max-width: 640px; margin: 0 auto 8px; }
.trust-row { margin-top: 28px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; color: #b3a89d; font-size: 0.88rem; }
.trust-row span { display: flex; align-items: center; gap: 6px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: #f2ece5; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: 2rem; margin: 0 0 12px; color: var(--charcoal); font-weight: 800; letter-spacing: -0.01em; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Calculator Card ---------- */
.calc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 36px; max-width: 820px; margin: -56px auto 0; position: relative; z-index: 5; }
.calc-section-title { font-weight: 800; color: var(--charcoal); font-size: 1.05rem; margin: 24px 0 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.calc-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.calc-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.field { margin-bottom: 4px; display: flex; flex-direction: column; height: 100%; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--charcoal); }
.field input, .field select { width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 1rem; font-family: inherit; background: #fdfbf9; transition: border-color 0.15s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--terracotta-light); }
.field .hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; flex: 1; }

.btn { display: inline-block; background: var(--terracotta-dark); color: #fff; border: none; padding: 14px 28px; border-radius: 7px; font-size: 1rem; font-weight: 700; cursor: pointer; width: 100%; transition: background 0.15s, transform 0.1s; margin-top: 20px; }
.btn:hover { background: #7d3720; }
.btn:active { transform: scale(0.99); }
.btn-secondary { background: transparent; border: 1.5px solid var(--charcoal); color: var(--charcoal); }
.btn-secondary:hover { background: var(--charcoal); color: #fff; }

.result-box { margin-top: 24px; padding: 24px; border-radius: var(--radius); background: #fdf3ec; border: 1.5px solid #f0d5bf; display: none; }
.result-box.show { display: block; }
.result-headline { font-size: 1.05rem; color: var(--charcoal); margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px dashed #e8c9ab; font-weight: 600; }
.result-headline strong { color: var(--terracotta-dark); }
.result-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0dfcd; font-size: 0.95rem; }
.result-row:last-child { border-bottom: none; }
.result-row .label { color: var(--text-muted); }
.result-row .value { font-weight: 700; color: var(--charcoal); }
.result-row.total .value { color: var(--terracotta); font-size: 1.3rem; }
.disclaimer-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }

/* ---------- Live result visuals ---------- */
.tone-profit { color: var(--profit); }
.tone-loss { color: var(--loss); }

.viz-section { margin: 0 0 22px; padding: 16px 18px; background: #fff; border: 1px solid #f0dfcd; border-radius: 8px; }
.viz-title { font-weight: 800; font-size: 0.92rem; color: var(--charcoal); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.viz-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--profit); display: inline-block; animation: vizPulse 2s ease-in-out infinite; }
@keyframes vizPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.8); } }
.viz-legend { font-size: 0.76rem; color: var(--text-muted); margin: -4px 0 12px; display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.legend-swatch.legend-profit { background: var(--profit); margin-left: 10px; }
.legend-swatch.legend-profit:first-child { margin-left: 0; }
.legend-swatch.legend-loss { background: var(--loss); }

/* Seasonal profit bars */
.season-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.season-bar-row:last-child { margin-bottom: 0; }
.season-bar-name { width: 42px; font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-align: right; flex-shrink: 0; }
.season-bar-track { flex: 1; height: 26px; background: #f6f0e9; border-radius: 6px; overflow: hidden; }
.season-bar-fill { height: 100%; width: 0; border-radius: 6px; transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s; }
.season-bar-fill.is-profit { background: linear-gradient(90deg, #3d9457, var(--profit)); }
.season-bar-fill.is-loss { background: linear-gradient(90deg, #d95445, var(--loss)); }
.season-bar-value { width: 110px; font-size: 0.88rem; font-weight: 800; flex-shrink: 0; }
.season-bar-value.is-profit { color: var(--profit); }
.season-bar-value.is-loss { color: var(--loss); }

/* Breakeven meters */
.meter-group { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.meter-season-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--terracotta-dark); margin-bottom: 6px; }
.meter-track { position: relative; height: 18px; background: #f6f0e9; border-radius: 999px; overflow: visible; }
.meter-fill { height: 100%; width: 0; border-radius: 999px; transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s; }
.meter-fill.is-profit { background: linear-gradient(90deg, #3d9457, var(--profit)); }
.meter-fill.is-loss { background: linear-gradient(90deg, #d95445, var(--loss)); }
.meter-marker { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--charcoal); border-radius: 2px; transform: translateX(-50%); transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.meter-marker::after { content: "breakeven"; position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-size: 0.62rem; font-weight: 700; color: var(--charcoal); white-space: nowrap; letter-spacing: 0.02em; }
.meter-scale { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
.meter-label { font-size: 0.82rem; color: var(--text); margin-top: 6px; line-height: 1.45; }

/* Cumulative year chart */
.chart-cumulative { width: 100%; height: auto; display: block; }
.cum-axis { stroke: var(--charcoal); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: 0.5; }
.cum-bar { transition: y 0.3s, height 0.3s; }
.cum-bar-profit { fill: var(--profit); }
.cum-bar-loss { fill: var(--loss); }
.cum-label { font-size: 10px; fill: var(--text-muted); text-anchor: middle; font-family: inherit; }
.chart-cumulative-note { font-size: 0.86rem; color: var(--text); margin-top: 8px; }

/* ---------- Breakeven insight block ---------- */
.insight-block { margin-top: 20px; padding-top: 20px; border-top: 1px dashed #e8c9ab; }
.insight-title { font-weight: 800; color: var(--charcoal); font-size: 0.98rem; margin-bottom: 12px; }
.insight-season { margin-bottom: 12px; }
.insight-season:last-child { margin-bottom: 0; }
.insight-season-label { font-weight: 700; color: var(--terracotta-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 4px; }
.insight-season div:not(.insight-season-label) { font-size: 0.92rem; color: var(--text); line-height: 1.55; }
.insight-positive { color: #2f6b3a; font-weight: 600; }

/* ---------- Pro teaser ---------- */
.pro-teaser { margin-top: 24px; background: var(--charcoal); color: #e8dfd6; border-radius: var(--radius); padding: 24px 28px; text-align: center; }
.pro-teaser-badge { display: inline-block; background: rgba(224, 138, 91, 0.18); color: var(--terracotta-light); padding: 5px 14px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 12px; }
.pro-teaser p { margin: 0 0 14px; font-size: 0.95rem; color: #d8cec4; }
.pro-teaser strong { color: #fff; }
.btn-secondary-link { display: inline-block; color: var(--terracotta-light); font-weight: 700; font-size: 0.92rem; }
.btn-secondary-link:hover { color: #fff; }

/* ---------- Cards grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(193, 97, 59, 0.1); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 1.4rem; }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--charcoal); }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Comparison table ---------- */
.compare-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare-table th, .compare-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.94rem; }
.compare-table th { background: var(--charcoal); color: #fff; font-weight: 700; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: #faf6f2; }
.badge { display: inline-block; background: var(--terracotta-dark); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }

/* ---------- FAQ ---------- */
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-question { padding: 18px 22px; font-weight: 700; color: var(--charcoal); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: "+"; font-size: 1.4rem; color: var(--terracotta); font-weight: 400; transition: transform 0.2s; }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; padding: 0 22px; color: var(--text-muted); }
.faq-item.open .faq-answer { max-height: 400px; padding: 0 22px 20px; }

/* ---------- Email capture ---------- */
.capture-box { background: var(--charcoal); color: #fff; border-radius: var(--radius); padding: 44px; text-align: center; }
.capture-box h2 { margin: 0 0 10px; font-size: 1.6rem; }
.capture-box p { color: #d8cec4; margin: 0 0 24px; }
.capture-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; }
.capture-form input { flex: 1; min-width: 220px; padding: 13px 16px; border-radius: 7px; border: none; font-size: 1rem; }
.capture-form .btn { width: auto; padding: 13px 24px; margin-top: 0; }

/* ---------- Ebook promo ---------- */
.ebook-box { display: flex; gap: 32px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.ebook-cover { flex-shrink: 0; width: 140px; height: 180px; background: linear-gradient(160deg, var(--terracotta) 0%, var(--terracotta-light) 100%); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; text-align: center; padding: 16px; font-size: 0.95rem; box-shadow: var(--shadow-lg); }
.ebook-price { font-size: 1.8rem; font-weight: 800; color: var(--terracotta); margin: 12px 0; }

/* ---------- Article / guide content ---------- */
.article { max-width: 760px; margin: 0 auto; background: #fff; padding: 48px; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-hero { width: 100%; height: auto; display: block; border-radius: var(--radius); margin: 0 0 28px; }
.article h1 { color: var(--charcoal); font-size: 2.1rem; margin-top: 0; }
.article h2 { color: var(--charcoal); font-size: 1.4rem; margin-top: 36px; }
.article h3 { color: var(--charcoal); font-size: 1.15rem; }
.article p, .article li { color: var(--text); font-size: 1.02rem; }
.article table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.article th, .article td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; font-size: 0.92rem; }
.article th { background: #f2ece5; }
.callout { background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: 8px; padding: 16px 20px; font-size: 0.92rem; margin: 24px 0; }
.callout strong { color: #92400e; }
.byline { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.88rem; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.byline .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--terracotta); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--text-muted); padding: 16px 0; }
.breadcrumbs a { color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal-dark); color: #b3a89d; padding: 48px 0 24px; font-size: 0.9rem; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #b3a89d; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #3a322c; padding-top: 20px; text-align: center; font-size: 0.82rem; color: #8a7f74; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2rem; }
  .calc-grid, .calc-grid.three { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article { padding: 28px; }
  .compare-table { display: block; overflow-x: auto; }
  .ebook-box { flex-direction: column; text-align: center; }
  .meter-group { grid-template-columns: 1fr; }
  .season-bar-value { width: 92px; font-size: 0.8rem; }
}

