@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600&display=swap');

/* Kanagawa Design System Tokens */
:root {
  --background: hsl(35, 30%, 94%);
  --foreground: hsl(0, 0%, 15%);
  --card: hsl(35, 25%, 97%);
  --card-foreground: hsl(0, 0%, 15%);
  --primary: hsl(0, 100%, 40%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(350, 60%, 92%);
  --secondary-foreground: hsl(0, 0%, 15%);
  --accent: hsl(350, 70%, 75%);
  --accent-foreground: hsl(0, 0%, 15%);
  --muted: hsl(35, 20%, 90%);
  --muted-foreground: hsl(0, 0%, 40%);
  --border: hsl(35, 20%, 85%);
  --radius: 0.75rem;
  --shadow-soft: 0 4px 20px -4px hsl(0 0% 0% / 0.08);
  --shadow-medium: 0 8px 30px -8px hsl(0 0% 0% / 0.12);
  --shadow-card: 0 2px 12px -2px hsl(0 0% 0% / 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.2;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* Language switching via CSS */
[data-lang="pt"] { display: none; }
body.lang-pt [data-lang="en"] { display: none; }
body.lang-pt [data-lang="pt"] { display: revert; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: hsl(35, 30%, 94%, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 768px) {
  .header-inner {
    padding: 0 2rem;
  }
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
}

.logo:hover {
  color: var(--foreground);
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-kanji {
  color: var(--primary-foreground);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.1em;
}

@media (max-width: 479px) {
  .logo-text {
    display: none;
  }
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background-color: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.25rem;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  gap: 0;
}

.lang-toggle button {
  border: none;
  background: none;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: var(--muted-foreground);
  transition: all 0.2s;
  white-space: nowrap;
}

.lang-toggle button.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-soft);
}

/* Hero */
.hero {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

@media (min-width: 768px) {
  .hero {
    padding: 5rem 0;
  }
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .hero-container {
    padding: 0 2rem;
  }
}

.hero-katakana {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.25rem;
  }
}

.hero h1 .gradient {
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-date {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

/* Main content */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

@media (min-width: 768px) {
  .main {
    padding: 3rem 2rem 5rem;
  }
}

/* Section Cards */
.section-card {
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.3s;
  border: 1px solid transparent;
}

@media (min-width: 768px) {
  .section-card {
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
  }
}

.section-card:hover {
  box-shadow: var(--shadow-medium);
}

.section-card h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

@media (min-width: 768px) {
  .section-card h2 {
    font-size: 1.5rem;
  }
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.section-card p,
.section-card li {
  color: var(--card-foreground);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.section-card p {
  margin-bottom: 0.75rem;
}

.section-card p:last-child {
  margin-bottom: 0;
}

.section-card ul,
.section-card ol {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.section-card li {
  margin-bottom: 0.375rem;
}

.section-card strong {
  font-weight: 600;
  color: var(--foreground);
}

/* Subsections */
.subsection {
  margin-top: 1rem;
}

.subsection h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

/* Third-party table */
.services-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  font-size: 0.875rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.services-table th,
.services-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.services-table th {
  background-color: var(--secondary);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--foreground);
}

.services-table tr:last-child td {
  border-bottom: none;
}

.services-table tr:hover td {
  background-color: hsl(35, 25%, 95%);
}

/* Responsive table */
@media (max-width: 640px) {
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem -0.5rem;
    padding: 0 0.5rem;
  }

  .services-table {
    min-width: 500px;
  }
}

/* Rights list */
.rights-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .rights-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.right-item {
  background-color: var(--secondary);
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.right-item strong {
  display: block;
  margin-bottom: 0.125rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 2rem;
  }
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--foreground);
}

/* Email highlight */
.email-link {
  color: var(--primary);
  font-weight: 500;
}

/* Pill/badge for LGPD/GDPR */
.badge {
  display: inline-block;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  vertical-align: middle;
  margin-left: 0.25rem;
}

/* Accessibility: focus visible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
