/* 3Patti Spin - light, near-white theme */

:root {
  --bg: #fdfdfc;
  --surface: #ffffff;
  --ink: #1b1b1f;
  --ink-soft: #55565f;
  --line: #e6e5e1;
  --brand: #c2181b;
  --brand-dark: #8f1113;
  --gold: #d99b1c;
  --radius: 12px;
  --wrap: 1100px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--brand);
  color: #fff; padding: 10px 16px; z-index: 99;
}
.skip:focus { left: 0; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand-text { font-size: 20px; font-weight: 600; letter-spacing: -0.2px; }
.brand-text strong { color: var(--brand); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; width: 44px; height: 40px; padding: 9px 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

.site-nav { display: flex; align-items: center; gap: 14px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); font-size: 15px; padding: 8px 10px; border-radius: 8px; display: block; }
.site-nav a:hover { background: #f4f3ef; text-decoration: none; color: var(--ink); }
.site-nav a.active { color: var(--brand); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-block; background: var(--brand); color: #fff; font-weight: 600;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 6px 16px rgba(194, 24, 27, 0.22); transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; transform: translateY(-1px); color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 15px; box-shadow: none; }
.btn-lg { font-size: 19px; padding: 16px 40px; }
.btn-ghost { background: var(--surface); color: var(--brand); border: 1px solid var(--brand); box-shadow: none; }
.btn-ghost:hover { background: #fdf3f3; color: var(--brand-dark); }

/* Breadcrumbs */
.crumbs { font-size: 14px; color: var(--ink-soft); padding: 14px 0 0; }
.crumbs span { margin: 0 6px; color: #b9b8b2; }
.crumbs a { color: var(--ink-soft); }

/* Typography blocks */
main { padding-bottom: 40px; }
h1 { font-size: 34px; line-height: 1.25; margin: 22px 0 14px; letter-spacing: -0.4px; }
h2 { font-size: 26px; line-height: 1.3; margin: 38px 0 12px; }
h3 { font-size: 20px; margin: 26px 0 8px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin-bottom: 8px; }
.lead { font-size: 19px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-size: 15px; }

/* Hero */
.hero { padding: 26px 0 10px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 34px; align-items: center; }
.hero-media img { border-radius: var(--radius); border: 1px solid var(--line); }
.hero .btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }

/* Cards / grids */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 16px; }
th, td { border: 1px solid var(--line); padding: 11px 13px; text-align: left; vertical-align: top; }
th { background: #f7f6f2; font-weight: 600; }

/* Callouts */
.note {
  background: #fbf8ef; border: 1px solid #ecdfb8; border-left: 4px solid var(--gold);
  padding: 16px 18px; border-radius: 10px; margin: 0 0 22px;
}
.note p:last-child { margin-bottom: 0; }

/* CTA */
.cta {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 22px; text-align: center; margin: 34px 0;
}
.cta h2 { margin-top: 0; }
.cta-meta { font-size: 14px; color: var(--ink-soft); margin: 14px 0 0; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  position: relative; padding: 0 0 0 46px; margin-bottom: 18px;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 2px; width: 30px; height: 30px;
  background: var(--brand); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
}

/* FAQ */
.faq-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 4px 16px; margin-bottom: 10px;
}
.faq-item summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--brand); font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-answer { border-top: 1px solid var(--line); padding-top: 12px; }

/* Forms */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 620px; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; margin-bottom: 16px; background: #fff; color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 18px; font-size: 15px; }
.alert-ok { background: #eef8ee; border: 1px solid #cbe6cb; }
.alert-bad { background: #fdf0f0; border: 1px solid #f0cccc; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 40px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 26px; }
.footer-grid h3 { font-size: 16px; margin: 0 0 10px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: 6px; }
.plain a { color: var(--ink-soft); font-size: 15px; }
.footer-bar { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 14px; padding-bottom: 18px; }
.footer-bar p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* Back to top */
.to-top {
  position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-size: 20px; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity .2s ease; box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.to-top.show { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  body { font-size: 16.5px; }
  h1 { font-size: 28px; }
  h2 { font-size: 23px; }
  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 66px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 18px 18px; gap: 8px;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 11px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-cta { text-align: center; margin-top: 8px; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; text-align: center; padding: 15px 20px; font-size: 18px; }
}
