/* ============ Trocador Tip & Percentage Calculator — Styles ============ */
:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --ink: #2b2118;
  --muted: #8a7d6f;
  --brand: #f97316;
  --brand-dark: #c2560c;
  --brand-soft: #fff1e2;
  --accent: #14b8a6;
  --line: #efe4d6;
  --radius: 20px;
  --shadow: 0 14px 40px rgba(43, 33, 24, 0.10);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

.wrap {
  width: 90%;
  max-width: 1040px;
  margin: 0 auto;
}

/* ============ Header — centered pill nav ============ */
header {
  padding: 22px 0;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.brand {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.brand b {
  color: var(--brand);
}

.pill-nav {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.pill-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.pill-nav a:hover,
.pill-nav a.active {
  background: var(--brand);
  color: #fff;
}

/* ============ Hero ============ */
.hero {
  text-align: center;
  padding: 46px 0 10px;
}

.hero .eyebrow {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 2.7rem;
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero h1 em {
  color: var(--brand);
  font-style: normal;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============ Calculator card ============ */
.calc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin: 34px auto 0;
  max-width: 720px;
}

.mode-switch {
  display: flex;
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 28px;
}

.mode-switch button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--brand-dark);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mode-switch button.active {
  background: var(--brand);
  color: #fff;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.row {
  margin-bottom: 22px;
}

.row > label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.input-affix {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.input-affix span {
  padding: 0 14px;
  color: var(--muted);
  font-weight: 700;
  font-size: 1.05rem;
}

.input-affix input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 14px 14px 0;
  font-size: 1.1rem;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
}

.input-affix input:focus {
  outline: none;
}

.input-affix:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* tip percentage quick-picks */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* results */
.results {
  margin-top: 28px;
  border-top: 2px dashed var(--line);
  padding-top: 24px;
  display: grid;
  gap: 14px;
}

.result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.result .k {
  color: var(--muted);
  font-weight: 600;
}

.result .v {
  font-size: 1.35rem;
  font-weight: 800;
}

.result.total .v {
  color: var(--brand);
  font-size: 1.9rem;
}

/* ============ Sections ============ */
.section {
  padding: 66px 0;
}

.section h2 {
  text-align: center;
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.section .lead {
  text-align: center;
  color: var(--muted);
  margin-bottom: 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.step p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* reference table */
.ref {
  background: var(--brand-soft);
}

.ref-table {
  max-width: 620px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.ref-table div {
  display: flex;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

.ref-table div:last-child {
  border-bottom: none;
}

.ref-table span:last-child {
  font-weight: 700;
  color: var(--brand-dark);
}

/* ============ Inner pages ============ */
.page-head {
  text-align: center;
  padding: 40px 0 10px;
}

.page-head h1 {
  font-size: 2.2rem;
}

.prose {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 0 60px;
}

.prose h2 {
  margin: 28px 0 10px;
  font-size: 1.3rem;
}

.prose p,
.prose li {
  color: #4a3f34;
  margin-bottom: 12px;
}

.prose ul {
  padding-left: 22px;
}

.prose a {
  color: var(--brand-dark);
}

/* ============ Contact form ============ */
.form-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}

.fg {
  margin-bottom: 20px;
}

.fg label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.fg input,
.fg textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
}

.fg input:focus,
.fg textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.btn-submit {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-submit:hover {
  background: var(--brand-dark);
}

.note {
  margin-top: 16px;
  font-weight: 700;
  display: none;
}

.note.ok {
  display: block;
  color: #0f766e;
}

.note.err {
  display: block;
  color: #b91c1c;
}

/* ============ Footer — stacked centered ============ */
footer {
  background: var(--ink);
  color: #d8ccbe;
  padding: 48px 0 26px;
  margin-top: 40px;
  text-align: center;
}

.foot-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.foot-brand b {
  color: var(--brand);
}

.foot-tag {
  color: #a99a89;
  max-width: 460px;
  margin: 0 auto 22px;
  font-size: 0.94rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin-bottom: 24px;
}

.foot-links a {
  color: #d8ccbe;
  text-decoration: none;
  font-size: 0.92rem;
}

.foot-links a:hover {
  color: var(--brand);
}

.foot-bottom {
  border-top: 1px solid #453629;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #a99a89;
}

/* ============ Responsive ============ */
@media (max-width: 560px) {
  .split-row {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .pill-nav {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 22px;
  }
}
