/* ============================================================
   TAXO.IE — Core Design System
   Trust, clarity, money.
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* --- CSS Variables --- */
:root {
  /* Brand */
  --primary: #1A365D;
  --primary-light: #EBF8FF;
  --primary-dark: #0F2440;
  --secondary: #2B6CB0;
  --accent: #38A169;
  --accent-hover: #2F855A;
  --accent-light: #F0FFF4;

  /* Surfaces */
  --surface: #FFFFFF;
  --background: #F7FAFC;
  --border: #E5E7EB;
  --border-light: #F0F0F0;

  /* Text */
  --text: #1A1A1A;
  --text-secondary: #6B7280;
  --text-inverse: #FFFFFF;
  --text-link: #2B6CB0;

  /* Status */
  --success: #38A169;
  --warning: #F59E0B;
  --error: #E53E3E;
  --refund: #38A169;
  --liability: #E53E3E;

  /* Calculator */
  --calc-highlight: #F0FFF4;
  --calc-result-bg: #F7FAFC;

  /* Typography */
  --font-main: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --nav-height: 72px;
  --mobile-bottom-bar: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
  --shadow-top: 0 -2px 8px rgba(0,0,0,0.06);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-error { color: var(--error); }
.text-secondary { color: var(--text-secondary); }

.money-display {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.money-refund { color: var(--refund); }
.money-liability { color: var(--liability); }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.section-lg {
  padding: var(--space-24) 0;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav-logo .ie {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--text-inverse) !important;
  padding: var(--space-2) var(--space-5) !important;
  border-radius: var(--radius-full);
  font-weight: 600 !important;
  font-size: var(--text-sm) !important;
  transition: background var(--transition-fast) !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: var(--text-inverse) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}

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

.btn-secondary {
  background: var(--primary);
  color: var(--text-inverse);
}

.btn-secondary:hover {
  background: var(--primary-dark);
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-link);
  padding: var(--space-2) var(--space-4);
}

.btn-ghost:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  min-height: 44px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card-sm {
  padding: var(--space-6);
}

.card-accent {
  border-left: 4px solid var(--accent);
}

.card-highlight {
  border: 2px solid var(--accent);
  position: relative;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 52px;
  padding: 0 var(--space-4);
  font-family: var(--font-main);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}

.form-textarea {
  height: auto;
  min-height: 120px;
  padding: var(--space-4);
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.15);
}

.form-input::placeholder {
  color: #B0B8C4;
}

.form-input-currency {
  position: relative;
}

.form-input-currency .prefix {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
}

.form-input-currency input {
  padding-left: var(--space-10);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* Checkbox / Radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  margin-bottom: var(--space-3);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-check label {
  font-size: var(--text-sm);
  color: var(--text);
  cursor: pointer;
}

/* --- Badge / Tag --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-accent {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-warning {
  background: #FFFBEB;
  color: #B45309;
}

.badge-error {
  background: #FEF2F2;
  color: var(--error);
}

/* --- Price Display --- */
.price {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.price-amount {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.price-currency {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-secondary);
}

.price-old {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  text-decoration: line-through;
}

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) 0;
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding-bottom: var(--space-6);
}

.faq-answer p {
  font-size: var(--text-base);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  background: var(--primary);
  color: var(--text-inverse);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.footer-brand .ie {
  color: var(--accent);
}

.footer-tagline {
  color: rgba(255,255,255,0.65);
  font-size: var(--text-sm);
  max-width: 280px;
  line-height: 1.6;
}

.footer h4 {
  color: var(--text-inverse);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-6);
  opacity: 0.5;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  color: rgba(255,255,255,0.75);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.45);
}

.footer-bottom a {
  color: rgba(255,255,255,0.55);
}

.footer-bottom a:hover {
  color: var(--text-inverse);
}

.footer-legal-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Deadline Banner --- */
.deadline-banner {
  background: var(--warning);
  color: #1A1A1A;
  text-align: center;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
}

.deadline-banner a {
  color: inherit;
  text-decoration: underline;
}

.deadline-countdown {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
}

.countdown-numbers {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin: var(--space-6) 0;
}

.countdown-unit {
  text-align: center;
}

.countdown-value {
  font-size: var(--text-5xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.countdown-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-top: var(--space-2);
}

/* --- Divider --- */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: var(--space-12) 0;
}

/* --- Icon wrapper --- */
.icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-box-accent {
  background: var(--accent-light);
  color: var(--accent);
}

.icon-box-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.icon-box svg {
  width: 24px;
  height: 24px;
}

/* --- Mobile Bottom Bar --- */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--surface);
  box-shadow: var(--shadow-top);
  padding: var(--space-3) var(--space-6);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.mobile-bottom-bar.visible {
  transform: translateY(0);
}

.mobile-bottom-bar .btn {
  width: 100%;
}

/* --- Page Hero --- */
.page-hero {
  background: var(--surface);
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin-bottom: var(--space-4);
}

.page-hero p {
  font-size: var(--text-lg);
  max-width: 600px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  .section { padding: var(--space-12) 0; }
  .section-lg { padding: var(--space-16) 0; }

  .container, .container-narrow {
    padding: 0 var(--space-4);
  }

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

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

  /* Nav mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  /* Footer mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .footer-legal-links {
    justify-content: center;
  }

  /* Mobile bottom bar */
  .mobile-bottom-bar {
    display: block;
  }

  /* Price */
  .price-amount {
    font-size: var(--text-3xl);
  }

  .countdown-value {
    font-size: var(--text-3xl);
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-2xl); }
  .btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
  }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }


/* --- Cookie Consent --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--primary);
  color: var(--text-inverse);
  padding: var(--space-4) var(--space-6);
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  font-size: var(--text-sm);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}
.cookie-banner.visible { display: flex; }
.cookie-banner p { margin: 0; color: rgba(255,255,255,0.8); }
.cookie-banner a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.cookie-btns { display: flex; gap: var(--space-3); flex-shrink: 0; }
.cookie-btn {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}
.cookie-btn-accept {
  background: var(--accent);
  color: #FFFFFF;
}
.cookie-btn-accept:hover { background: var(--accent-hover); }
.cookie-btn-necessary {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.3);
}
.cookie-btn-necessary:hover { border-color: rgba(255,255,255,0.6); }
@media (max-width: 768px) {
  .cookie-banner { flex-direction: column; text-align: center; gap: var(--space-3); }
}
