/*
 * ENPORIO Premium Design System
 * Apple/Google-level execution with progressive enhancement
 * Version: 1.0
 */

/* ========================================
   FONTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* ========================================
   CSS VARIABLES (Design Tokens)
   ======================================== */
:root {
  /* Color Palette */
  --bg: #F7F5F0;
  /* Ivory */
  --surface: #FFFFFF;
  --ink: #0B1220;
  /* Navy-ink */
  --text: #111827;
  /* Graphite */
  --muted: #6B7280;
  /* Slate */
  --accent: #C8AD7F;
  /* Champagne */
  --line: rgba(17, 24, 39, 0.10);

  /* Typography */
  --font-heading: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Premium Shadows (Multi-layer, very soft) */
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 6px 18px rgba(11, 18, 32, 0.06);
  --shadow-md: 0 2px 6px rgba(11, 18, 32, 0.08), 0 18px 46px rgba(11, 18, 32, 0.10);
  --shadow-lg: 0 4px 12px rgba(11, 18, 32, 0.10), 0 24px 64px rgba(11, 18, 32, 0.12);

  /* Spacing (Vertical Rhythm) */
  --section-padding-mobile: 56px;
  --section-padding-tablet: 72px;
  --section-padding-desktop: 96px;

  /* Border Radius */
  --radius-card: 18px;
  --radius-button: 22px;

  /* Layout */
  --max-width: 1200px;
  --gutter: 24px;

  /* Transitions */
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ========================================
   LINKS (NO UNDERLINES)
   ======================================== */
a {
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: color var(--transition-base);
}

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

/* Subtle hover indicator via pseudo-element */
a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width var(--transition-base);
}

a:not(.btn):hover::after {
  width: 100%;
}

/* Navigation links - different style */
nav a::after {
  display: none;
}

nav a {
  position: relative;
  padding-bottom: 4px;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background-color: var(--accent);
  transition: transform var(--transition-base);
}

nav a:hover::before,
nav a.active::before {
  transform: translateX(-50%) scaleX(1);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-button);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.btn::after {
  display: none;
  /* Disable link underline for buttons */
}

.btn-primary {
  background-color: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--accent);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--ink);
  border: 2px solid var(--line);
}

.btn-secondary:hover {
  background-color: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: var(--section-padding-mobile) 0;
}

@media (min-width: 768px) {
  section {
    padding: var(--section-padding-tablet) 0;
  }
}

@media (min-width: 1024px) {
  section {
    padding: var(--section-padding-desktop) 0;
  }
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(247, 245, 240, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--transition-base);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lang-switcher {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.lang-switcher a {
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color var(--transition-base);
}

.lang-switcher a:hover,
.lang-switcher a.active {
  background-color: var(--surface);
  color: var(--accent);
}

.lang-switcher a::before,
.lang-switcher a::after {
  display: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  nav {
    display: none;
    /* Simplified for mobile - can add hamburger menu */
  }

  .header-container {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
  }
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-highlights {
  list-style: none;
  margin: 32px 0;
}

.hero-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.0625rem;
  color: var(--text);
}

.hero-highlights li::before {
  content: '✓';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-color: var(--accent);
  color: var(--ink);
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ========================================
   TRUST STRIP
   ======================================== */
.trust-strip {
  background-color: var(--ink);
  color: var(--surface);
  padding: 24px 0;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  align-items: center;
}

.trust-badge {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-badge::before {
  content: '•';
  color: var(--accent);
  font-size: 1.5rem;
}

/* ========================================
   CARDS
   ======================================== */
.card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.card h3 {
  margin-bottom: 16px;
  color: var(--ink);
}

.card ul {
  list-style: none;
  margin-top: 16px;
}

.card li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.9375rem;
}

.card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   PROCESS STEPS
   ======================================== */
.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-top: 48px;
}

@media (min-width: 1024px) {
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process-step {
  text-align: center;
  position: relative;
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: var(--accent);
  color: var(--ink);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.process-step h3 {
  margin-bottom: 12px;
}

/* ========================================
   FAQ
   ======================================== */
.faq-list {
  max-width: 800px;
  margin: 48px auto 0;
}

.faq-item {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 16px;
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.faq-answer {
  color: var(--text);
  line-height: 1.7;
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-form {
  max-width: 600px;
  margin: 48px auto 0;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 173, 127, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  width: 100%;
  margin-top: 8px;
}

.form-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9375rem;
  text-align: center;
}

.form-message.success {
  background-color: rgba(200, 173, 127, 0.1);
  color: var(--ink);
  border: 1px solid var(--accent);
}

.form-message.error {
  background-color: rgba(220, 38, 38, 0.1);
  color: #991b1b;
  border: 1px solid #dc2626;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background-color: var(--ink);
  color: var(--surface);
  padding: 48px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  list-style: none;
  margin-bottom: 24px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
}

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

.footer-links a::after {
  background-color: var(--accent);
}

.copyright {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   PROGRESSIVE ENHANCEMENT
   ======================================== */
/* Elements are visible by default */
/* Only apply reveal animations when JS is available */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--transition-base),
    transform 0.6s var(--transition-base);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   MOTION PREFERENCES
   ======================================== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
  text-align: center;
}

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

/* ========================================
   LEGAL PAGES TYPOGRAPHY
   Premium document hierarchy (Apple/Google grade)
   Scoped to .legal only - does not affect homepage
   ======================================== */

/* Main legal wrapper */
main.legal,
section.legal {
  padding-top: clamp(72px, 10vh, 110px);
  padding-bottom: 90px;
}

/* Content container - narrower for readability */
main.legal .container,
section.legal .container,
.legal__content {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

/* H1 - Page title (refined, not gigantic) */
main.legal h1,
section.legal h1,
.legal h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4.2vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
}

/* Meta line (Last updated) */
main.legal .legal-meta,
section.legal .legal-meta,
.legal .legal-meta,
main.legal p.text-muted:first-of-type,
section.legal p.text-muted:first-of-type {
  font-size: 14px;
  opacity: 0.72;
  margin-bottom: 34px;
  font-weight: 400;
}

/* Divider under H1 */
main.legal .legal-divider,
section.legal .legal-divider,
.legal .legal-divider {
  height: 1px;
  opacity: 0.08;
  margin: 22px 0 34px;
  background: currentColor;
}

/* H2 - Section headings (properly subordinate) */
main.legal h2,
section.legal h2,
.legal h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--ink);
  margin: 42px 0 12px;
  font-variant-numeric: lining-nums;
}

/* H3 - Subsection headings */
main.legal h3,
section.legal h3,
.legal h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 10px;
}

/* Paragraphs - comfortable reading */
main.legal p,
section.legal p,
.legal p {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.2vw, 17px);
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 14px;
}

/* Lists - proper spacing and alignment */
main.legal ul,
section.legal ul,
.legal ul {
  margin: 12px 0 18px 18px;
  padding-left: 6px;
}

main.legal ol,
section.legal ol,
.legal ol {
  margin: 12px 0 18px 18px;
  padding-left: 6px;
}

main.legal li,
section.legal li,
.legal li {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.2vw, 17px);
  line-height: 1.75;
  color: var(--text);
  margin: 8px 0;
  padding-left: 4px;
}

/* Links within legal content */
main.legal a,
section.legal a,
.legal a {
  color: var(--ink);
  font-weight: 500;
}

main.legal a:hover,
section.legal a:hover,
.legal a:hover {
  color: var(--accent);
}

/* Strong/bold text */
main.legal strong,
section.legal strong,
.legal strong {
  font-weight: 600;
  color: var(--ink);
}

/* Mobile refinements */
@media (max-width: 520px) {

  main.legal,
  section.legal {
    padding-top: 64px;
    padding-bottom: 72px;
  }

  main.legal h2,
  section.legal h2,
  .legal h2 {
    margin-top: 32px;
    margin-bottom: 10px;
  }

  main.legal h1,
  section.legal h1,
  .legal h1 {
    margin-bottom: 12px;
  }

  main.legal .legal-meta,
  section.legal .legal-meta,
  .legal .legal-meta {
    margin-bottom: 28px;
  }
}


.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mt-4 {
  margin-top: 32px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.mb-4 {
  margin-bottom: 32px;
}