@font-face {
  font-family: 'Patrick Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/patrick-hand-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Patrick Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/patrick-hand-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.95);
  --bg-dark: #2c2c2c;
  --text: #333333;
  --text-light: #777777;
  --text-on-dark: #e5e5e5;
  --accent: #0000ee;
  --border: #e0e0e0;
  --max-width: 1100px;
}

:root[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --bg-nav: rgba(15, 23, 42, 0.92);
  --text: #e2e8f0;
  --text-light: #94a3b8;
  --accent: #7c9eff;
  --border: #334155;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-card: #1e293b;
    --bg-nav: rgba(15, 23, 42, 0.92);
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --accent: #7c9eff;
    --border: #334155;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

/* Nav */
.nav {
  position: sticky;
  top: 0;
  background: var(--bg-nav);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Sections */
section, header.hero {
  padding: 80px 0;
}

section.alt {
  background: var(--bg-alt);
}

section.dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

section.dark h2,
section.dark h3 {
  color: #ffffff;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 12px;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent);
  margin: 16px auto 0;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 16px;
  margin-top: 12px;
}

/* Support grid */
.support-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.support-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.support-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border-color: var(--accent);
  text-decoration: none;
  color: var(--accent);
}

.support-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

:root[data-theme="dark"] .support-item {
  background: #fff;
  color: #333;
  border-color: #fff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .support-item {
    background: #fff;
    color: #333;
    border-color: #fff;
  }
}

.support-item span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8em;
  line-height: 1.4;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 32px;
}

.hero-text h1 {
  font-size: 48px;
  font-weight: 700;
  margin: 8px 0 20px;
}

.hero-text .greeting {
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
}

.hero-text p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 28px;
}

.hero-img {
  text-align: right;
}

.avatar-swap {
  position: relative;
  display: inline-block;
}

.avatar-swap img {
  display: block;
  transition: opacity 0.25s ease;
}

.avatar-swap .avatar-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.avatar-swap:hover .avatar-default {
  opacity: 0;
}

.avatar-swap:hover .avatar-hover {
  opacity: 1;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
  color: #fff;
  text-decoration: none;
}

/* Companies grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card img {
  margin: 0 auto 16px;
  max-height: 60px;
  width: auto;
}

.card img.logo-sm {
  max-height: 36px;
}

.card p {
  color: var(--text-light);
  font-size: 15px;
}

.card.dark {
  background: #4a4a4a;
  border-color: #4a4a4a;
}

:root[data-theme="dark"] .card.dark {
  background: var(--bg);
  border-color: var(--border);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card.dark {
    background: var(--bg);
    border-color: var(--border);
  }
}

.card.dark p {
  color: var(--text-on-dark);
}

.card.dark p strong {
  color: #fff;
}

/* Filosofias */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.philosophy-item {
  margin-bottom: 32px;
}

.philosophy-item h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.philosophy-item p {
  color: var(--text-light);
  font-size: 15px;
}

/* Manifesto — parchment on white */
.parchment {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 64px 56px;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(160, 120, 60, 0.12), transparent 60%),
    radial-gradient(ellipse at 85% 80%, rgba(170, 130, 70, 0.10), transparent 60%),
    linear-gradient(135deg, #fbf5e4, #f6ecd0 70%, #efe1b8 100%);
  color: #2a1d0c;
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.7;
  border-radius: 4px;
  box-shadow:
    inset 0 0 80px rgba(160, 120, 50, 0.18),
    inset 0 0 6px rgba(160, 120, 50, 0.3),
    0 12px 36px rgba(0, 0, 0, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.10);
  transform: rotate(-0.4deg);
}

.parchment::before,
.parchment::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  background: inherit;
  pointer-events: none;
}

.parchment::before {
  top: -11px;
  clip-path: polygon(
    0 100%, 3% 50%, 7% 80%, 12% 30%, 18% 70%, 24% 40%, 30% 75%, 36% 35%,
    42% 70%, 48% 30%, 54% 75%, 60% 40%, 66% 70%, 72% 30%, 78% 75%, 84% 40%,
    90% 70%, 96% 35%, 100% 100%
  );
  filter: drop-shadow(0 -2px 3px rgba(0, 0, 0, 0.10));
}

.parchment::after {
  bottom: -11px;
  clip-path: polygon(
    0 0, 3% 50%, 7% 20%, 12% 70%, 18% 30%, 24% 60%, 30% 25%, 36% 65%,
    42% 30%, 48% 70%, 54% 25%, 60% 60%, 66% 30%, 72% 70%, 78% 25%, 84% 60%,
    90% 30%, 96% 65%, 100% 0
  );
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.10));
}

.parchment p {
  margin-bottom: 22px;
  text-indent: 1.5em;
}

.parchment p:first-of-type {
  text-indent: 0;
}

.parchment .signature {
  max-width: 240px;
  margin: 36px 0 0 auto;
  display: block;
  filter: brightness(0.3) sepia(0.7) hue-rotate(-10deg) saturate(2);
  opacity: 0.9;
}

@media (max-width: 768px) {
  .parchment {
    padding: 40px 28px 32px;
    font-size: 22px;
  }
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 24px 0;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer a {
  color: var(--text-on-dark);
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 60px 24px;
  }

  .hero-img {
    text-align: center;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .nav ul {
    gap: 16px;
    font-size: 13px;
  }

  .nav a {
    font-size: 13px;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  section, header.hero {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    justify-content: center;
  }
}
