/* Potiguar — static site styles.
   Brand palette mirrors src/styles/Colors.ts (brand.primary #E53935). */

:root {
  color-scheme: light dark;

  --brand: #e53935;
  --brand-strong: #ab000d;
  --brand-surface: #fdebea;

  --bg: #ffffff;
  --bg-soft: #fafafa;
  --surface: #ffffff;
  --border: #e5e5e5;
  --text: #171717;
  --text-muted: #525252;
  --link: #ab000d;
  --focus: #e53935;
  --shadow: 0 1px 2px rgba(23, 23, 23, 0.06), 0 8px 24px rgba(23, 23, 23, 0.05);

  --radius: 14px;
  --measure: 42rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff6f60;
    --brand-strong: #ff6f60;
    --brand-surface: #2a1614;

    --bg: #171717;
    --bg-soft: #1f1f1f;
    --surface: #202020;
    --border: #333333;
    --text: #f5f5f5;
    --text-muted: #a3a3a3;
    --link: #ff8f82;
    --focus: #ff6f60;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand-mark::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
  background: var(--brand);
  flex: none;
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.8rem;
}

.lang-switch a,
.lang-switch span {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-muted);
  white-space: nowrap;
}

.lang-switch [aria-current="true"] {
  background: var(--brand-surface);
  border-color: var(--brand);
  color: var(--brand-strong);
  font-weight: 600;
}

/* Main */

main {
  padding: 2.25rem 0 3rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.6rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.4rem;
}

h4,
h5,
h6 {
  font-size: 1rem;
  margin: 1.4rem 0 0.4rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.05em 0.35em;
}

blockquote {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--brand);
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

blockquote p:last-child {
  margin-bottom: 0;
}

.tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.lede {
  font-size: 1.05rem;
}

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

.small {
  font-size: 0.9rem;
}

/* Tables (legal documents) */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--bg-soft);
  font-weight: 650;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* Cards and lists */

.card {
  display: block;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

a.card:hover {
  border-color: var(--brand);
}

.card h3 {
  margin: 0 0 0.25rem;
}

.card p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
}

.card-cta {
  color: var(--brand-strong);
  font-weight: 600;
  font-size: 0.95rem;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.link-list li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.link-list li:first-child {
  border-top: 1px solid var(--border);
}

.link-list a {
  display: block;
  padding: 0.75rem 0.25rem;
  text-decoration: none;
  color: var(--text);
}

.link-list a:hover {
  color: var(--brand-strong);
}

.link-list a::after {
  content: " →";
  color: var(--text-muted);
}

/* Store badges */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 12.5rem;
  min-height: 3.25rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.badge small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
}

a.badge:hover {
  border-color: var(--brand);
}

.badge[aria-disabled="true"] {
  opacity: 0.65;
  border-style: dashed;
}

/* Contact block */

.contact {
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
}

.contact p {
  margin: 0;
}

.contact a {
  font-weight: 600;
  font-size: 1.05rem;
}

/* FAQ */

.faq {
  margin: 0 0 1.5rem;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.25rem 1rem;
  margin-bottom: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
  list-style-position: outside;
}

.faq summary::marker {
  color: var(--brand);
}

.faq details[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.faq p {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
}

/* Disclaimer / footer */

.disclaimer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer nav {
  margin-bottom: 0.5rem;
}

.site-footer nav a {
  color: var(--text-muted);
  margin-right: 1rem;
  display: inline-block;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 40rem) {
  body {
    font-size: 18px;
  }

  h1 {
    font-size: 2.4rem;
  }

  main {
    padding: 3rem 0 4rem;
  }
}
