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

:root {
  --bg:       #f0ede7;              /* creme quente — fundo principal */
  --surface:  #e5e1d8;              /* cards e superfícies elevadas */
  --ink:      #0d1a24;              /* texto escuro — alto contraste */
  --faded:    #3d6070;              /* texto secundário */
  --accent:   #007a6e;              /* teal saturado — funciona em fundo claro */
  --accent-lt:rgba(0,122,110,.10);
  --mid:      #527b8a;              /* terciário, separadores */
  --mid-bg:   #1a3f4a;              /* seções alternadas escuras */
  --gutter:   clamp(1.5rem, 6vw, 5rem);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Grain overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 1000;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem var(--gutter);
  border-bottom: 1px solid rgba(13,26,36,.08);
  backdrop-filter: blur(16px);
  background: rgba(240,237,231,.93);
  gap: 1rem;
}

.nav-logo-svg {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: opacity .2s;
}
.nav-logo-svg:hover { opacity: .75; }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faded);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }

/* ── Language select (flag dropdown) ── */
.lang-select { position: relative; flex-shrink: 0; }

.lang-select-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem .35rem;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background .2s;
}
.lang-select-btn:hover { background: rgba(13,26,36,.07); }

.lang-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  background: var(--bg);
  border: 1px solid rgba(13,26,36,.1);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(13,26,36,.12);
  z-index: 150;
  min-width: 130px;
  overflow: hidden;
}
.lang-select.open .lang-select-menu { display: block; }

.lang-select-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .6rem .9rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 400;
  color: var(--faded);
  text-align: left;
  transition: background .15s, color .15s;
}
.lang-select-option:hover  { background: var(--surface); color: var(--ink); }
.lang-select-option.active { color: var(--accent); font-weight: 500; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
}

.nav-cta {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: .55rem 1.3rem;
  text-decoration: none;
  transition: opacity .2s;
  white-space: nowrap;
  border-radius: 2px;
}
.nav-cta:hover { opacity: .85; }

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

@media (max-width: 640px) {
  .nav-links     { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Mobile menu overlay ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
}
.mobile-menu.open { display: flex; }

.mobile-menu-close {
  position: absolute;
  top: 1.4rem;
  right: var(--gutter);
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--faded);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color .2s;
}
.mobile-menu-close:hover { color: var(--ink); }

.mobile-menu a {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.02em;
  transition: color .2s;
}
.mobile-menu a:hover { color: var(--accent); }

.mobile-menu .mobile-cta {
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: .85rem 2.6rem;
  border-radius: 2px;
  margin-top: .5rem;
}
.mobile-menu .mobile-cta:hover { opacity: .85; }

/* ── HERO ── */
#hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 8rem var(--gutter) 4rem;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

#hero::after {
  content: 'P';
  position: absolute;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(12rem, 35vw, 30rem);
  font-weight: 800;
  color: rgba(0,122,110,.06);
  right: -4vw;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  max-width: 780px;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lt);
  padding: .38rem 1rem;
  margin-bottom: 2.5rem;
  border-radius: 2px;
  animation: fadeUp .8s ease both;
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 800;
  color: var(--ink);
  animation: fadeUp .9s .1s ease both;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  margin-top: 1.8rem;
  font-size: clamp(.95rem, 2vw, 1.1rem);
  color: var(--faded);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeUp .9s .2s ease both;
}

.hero-actions {
  margin-top: 3rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp .9s .3s ease both;
}

.btn-primary {
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: .85rem 2.2rem;
  text-decoration: none;
  transition: opacity .2s;
  border-radius: 2px;
}
.btn-primary:hover { opacity: .85; }

.btn-ghost {
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faded);
  padding: .85rem 2.2rem;
  border: 1.5px solid rgba(13,26,36,.18);
  text-decoration: none;
  transition: border-color .2s, color .2s;
  border-radius: 2px;
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ── SECTIONS ── */
section { padding: clamp(5rem, 12vw, 9rem) var(--gutter); }

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
h2 em {
  font-style: normal;
  color: var(--accent);
}

/* ── HOW IT WORKS ── */
#how {
  background: var(--mid-bg);
  border-top: none;
}

#how .section-label { color: #4dd9c8; }
#how h2             { color: rgba(240,237,231,.92); }
#how h2 em          { color: #4dd9c8; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin-top: 3.5rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  overflow: hidden;
}

.how-item {
  padding: 2.5rem 2rem;
  border-right: 1px solid rgba(255,255,255,.1);
  position: relative;
  transition: background .3s;
}
.how-item:last-child { border-right: none; }
.how-item:hover { background: rgba(0,0,0,.12); }

@media (max-width: 640px) {
  .how-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
  .how-item:last-child { border-bottom: none; }
}

.how-num {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(77,217,200,.15);
  line-height: 1;
  margin-bottom: 1rem;
}

.how-title { font-family: 'Outfit', sans-serif; font-size: 1.15rem; font-weight: 700; margin-bottom: .6rem; color: rgba(240,237,231,.92); }
.how-desc  { font-size: .9rem; color: rgba(240,237,231,.55); line-height: 1.65; }

/* ── TWO TYPES OF NOTES ── */
#types { background: var(--bg); }
#types .section-label { color: var(--accent); }
#types h2 em { color: var(--accent); }

#types .how-item {
  border-right: 1px solid rgba(13,26,36,.08);
  border-left: 3px solid var(--accent) !important;
}
#types .how-item:last-child { border-right: none; }
#types .how-item:hover { background: var(--accent-lt); }
#types .how-num   { color: var(--accent); font-size: 2.2rem; }
#types .how-title { color: var(--ink); }
#types .how-desc  { color: var(--faded); }

@media (max-width: 640px) {
  #types .how-item { border-right: none; border-bottom: 1px solid rgba(13,26,36,.08); }
  #types .how-item:last-child { border-bottom: none; }
}

/* ── PRINCIPLES ── */
#principles {
  background: var(--bg);
  color: var(--ink);
}
#principles .section-label { color: var(--accent); }
#principles h2 em { color: var(--accent); }

.principles-grid {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.principle-card {
  padding: 2.2rem;
  background: var(--surface);
  border: 1px solid rgba(13,26,36,.07);
  border-radius: 4px;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.principle-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,122,110,.12);
}

.principle-icon  { font-size: 1.8rem; margin-bottom: 1.2rem; }
.principle-title { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; color: var(--ink); }
.principle-desc  { font-size: .88rem; color: var(--faded); line-height: 1.65; }

/* ── DEMO ── */
#demo {
  background: var(--mid-bg);
  border-top: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#demo .section-label { color: #4dd9c8; }
#demo h2  { max-width: 600px; color: rgba(240,237,231,.92); }
#demo h2 em { color: #4dd9c8; }
#demo > p { color: rgba(240,237,231,.55); margin-top: 1rem; max-width: 480px; }

.note-mockup {
  margin-top: 4rem;
  width: 100%;
  max-width: 400px;
  background: #1e3a4a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 2.2rem;
  text-align: left;
  position: relative;
  animation: floatNote 5s ease-in-out infinite;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.note-mockup::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(77,217,200,.2), transparent 50%);
  pointer-events: none;
  border-radius: 8px;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(240,237,231,.45);
  text-transform: uppercase;
}
.note-sender { color: rgba(240,237,231,.75); font-style: normal; }

.note-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

.note-body {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
  color: rgba(240,237,231,.9);
}

.note-footer {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(240,237,231,.1);
  font-family: 'Inter', sans-serif;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(240,237,231,.35);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.timer { color: #4dd9c8; }

/* ── FAQ ── */
#faq {
  background: var(--bg);
  border-top: none;
}

.faq-list {
  margin-top: 3.5rem;
  max-width: 820px;
}

.faq-item { border-bottom: 1px solid rgba(13,26,36,.08); }
.faq-item:first-child { border-top: 1px solid rgba(13,26,36,.08); }

.faq-q {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem 0;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(.9rem, 2vw, 1.05rem);
  font-weight: 600;
  color: var(--ink);
  transition: color .2s;
  cursor: pointer;
}
.faq-q:hover { color: var(--accent); }

.faq-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  position: relative;
  opacity: .4;
  transition: opacity .2s, transform .35s ease;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--faded);
  border-radius: 1px;
}
.faq-icon::before { width: 1px; height: 100%; left: 50%; transform: translateX(-50%); transition: transform .35s ease, opacity .35s ease; }
.faq-icon::after  { width: 100%; height: 1px; top: 50%;  transform: translateY(-50%); }

.faq-item.open .faq-icon { opacity: 1; transform: rotate(45deg); }
.faq-item.open .faq-q    { color: var(--accent); }

.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.4,0,.2,1); }
.faq-a-inner {
  padding-bottom: 1.6rem;
  font-size: .92rem;
  color: var(--faded);
  line-height: 1.75;
  max-width: 680px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 3rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--mid-bg);
}

.footer-logo { display: flex; align-items: center; }

footer p {
  font-family: 'Inter', sans-serif;
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(240,237,231,.45);
  text-transform: uppercase;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatNote {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-14px) rotate(.5deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Language transition ── */
.i18n-fade { transition: opacity .25s ease; }
.i18n-fade.switching { opacity: 0; }
