:root {
  color-scheme: light;
  --surface-white: rgba(255, 255, 255, 0.72);
  --surface-white-strong: rgba(255, 255, 255, 0.9);
  --surface-dark: rgba(2, 6, 23, 0.72);
  --surface-dark-strong: rgba(15, 23, 42, 0.92);
  --border-soft: rgba(148, 163, 184, 0.22);
  --border-bright: rgba(255, 255, 255, 0.5);
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-medium: 0 26px 60px rgba(15, 23, 42, 0.14);
  --shadow-strong: 0 34px 90px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: rgb(15, 23, 42);
  background:
    radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.2), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(15, 23, 42, 0.22), transparent 28%),
    linear-gradient(135deg, #f0f9ff 0%, #f8fafc 45%, #e2e8f0 100%);
  background-size: 140% 140%, 130% 130%, 100% 100%;
  animation: ambient-gradient-shift 18s ease-in-out infinite alternate;
}

body:not(.dashboard-page)::before,
body:not(.dashboard-page)::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
}

body:not(.dashboard-page)::before {
  top: 6rem;
  right: -8rem;
  width: 24rem;
  height: 24rem;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.22) 0%, rgba(14, 165, 233, 0) 72%);
  filter: blur(18px);
}

body:not(.dashboard-page)::after {
  left: -10rem;
  bottom: 10%;
  width: 28rem;
  height: 28rem;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0) 74%);
  filter: blur(28px);
}

.font-display {
  letter-spacing: -0.03em;
}

.glass {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.24), transparent 52%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow-soft);
}

.nav-glass {
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at top, rgba(56, 189, 248, 0.14), transparent 56%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.16);
}

[data-header] {
  position: fixed !important;
  top: 0 !important;
  right: 0;
  left: 0;
  z-index: 999;
}

[data-header] .h-10,
[data-header] .h-8 {
  transition: transform 0.25s ease;
}

[data-header].is-compact {
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.18);
}

[data-header].is-compact .h-10,
[data-header].is-compact .h-8 {
  transform: scale(0.96);
}

.hero-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  will-change: transform, opacity;
  animation: orb-pulse 6.5s ease-in-out infinite;
}

.hero-photo-section .hero-orb:nth-of-type(1) {
  animation:
    orb-drift-a 12s ease-in-out infinite,
    orb-pulse 7s ease-in-out infinite;
}

.hero-photo-section .hero-orb:nth-of-type(2) {
  animation:
    orb-drift-b 14s ease-in-out infinite,
    orb-pulse 8.5s ease-in-out infinite;
}

.hero-photo-section {
  background-image: url("https://images.unsplash.com/photo-1521737852567-6949f3f9f2b5?auto=format&fit=crop&w=1920&q=80");
  background-position: center top;
  background-size: cover;
  animation: hero-pan 22s ease-in-out infinite alternate;
}

.hero-photo-section aside.glass {
  animation: hero-card-float 8s ease-in-out infinite;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid transparent;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  transform: translateY(0);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
  will-change: transform;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.cta-button__label {
  display: inline-flex;
  align-items: center;
}

.cta-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
}

.cta-button__icon svg {
  width: 1rem;
  height: 1rem;
}

.cta-button--arrow .cta-button__icon,
.cta-button--send .cta-button__icon,
.cta-button--download .cta-button__icon {
  transition: transform 0.25s ease;
}

.cta-button--arrow:hover .cta-button__icon,
.cta-button--arrow:focus-visible .cta-button__icon {
  animation: arrow-loop 1.8s ease-in-out infinite;
}

.cta-button--send:hover .cta-button__icon,
.cta-button--send:focus-visible .cta-button__icon {
  transform: translate(3px, -2px);
}

.cta-button--download:hover .cta-button__icon,
.cta-button--download:focus-visible .cta-button__icon {
  transform: translateY(3px);
}

.cta-button--phone .cta-button__icon svg {
  transform-origin: 70% 30%;
}

.cta-button--phone:hover .cta-button__icon svg,
.cta-button--phone:focus-visible .cta-button__icon svg {
  animation: phone-ring 0.75s ease-in-out 2;
}

.nav-link-has-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

header nav ul {
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.14);
}

header nav a {
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

header nav a:hover,
header nav a:focus-visible {
  transform: translateY(-1px);
}

nav[data-mobile-menu] ul {
  box-shadow: 0 22px 54px rgba(2, 6, 23, 0.28);
}

nav[data-mobile-menu] .nav-link-has-icon {
  display: flex;
  align-items: center;
}

.nav-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}

.nav-link-icon svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  transition: transform 0.2s ease;
}

.nav-link-has-icon:hover .nav-link-icon svg,
.nav-link-has-icon:focus-visible .nav-link-icon svg {
  transform: translateY(-1px);
}

main article.glass,
main aside.glass,
main article.rounded-3xl,
main a.glass.block,
main img.rounded-3xl {
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    filter 0.35s ease;
}

body:not(.dashboard-page) main > section {
  position: relative;
}

body:not(.dashboard-page) main > section:not(:first-child)::before {
  content: "";
  position: absolute;
  top: -1.5rem;
  left: 50%;
  width: min(10rem, 30%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0), rgba(14, 165, 233, 0.35), rgba(14, 165, 233, 0));
}

body:not(.dashboard-page) main article.glass,
body:not(.dashboard-page) main aside.glass,
body:not(.dashboard-page) main article.rounded-3xl,
body:not(.dashboard-page) main a.glass.block {
  border: 1px solid rgba(255, 255, 255, 0.46);
}

main article.glass:hover,
main aside.glass:hover,
main article.rounded-3xl:hover,
main a.glass.block:hover,
main img.rounded-3xl:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
}

main img.rounded-3xl:hover {
  filter: saturate(1.08);
}

body:not(.dashboard-page) main img {
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

body:not(.dashboard-page) main article.bg-slate-950,
body:not(.dashboard-page) main article[class*="bg-slate-950"] {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow-strong);
}

body:not(.dashboard-page) main article.bg-slate-950::before,
body:not(.dashboard-page) main article[class*="bg-slate-950"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 38%);
  pointer-events: none;
}

body:not(.dashboard-page) main article.bg-white\/65,
body:not(.dashboard-page) main article.bg-white\/70 {
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

body:not(.dashboard-page) main input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body:not(.dashboard-page) main textarea,
body:not(.dashboard-page) main select {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

body:not(.dashboard-page) main input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):hover,
body:not(.dashboard-page) main textarea:hover,
body:not(.dashboard-page) main select:hover {
  border-color: rgba(14, 165, 233, 0.34);
}

body:not(.dashboard-page) main input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):focus,
body:not(.dashboard-page) main textarea:focus,
body:not(.dashboard-page) main select:focus {
  border-color: rgb(56, 189, 248);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

body:not(.dashboard-page) footer {
  position: relative;
  border-top-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
  box-shadow: 0 -24px 60px rgba(2, 6, 23, 0.08);
}

body:not(.dashboard-page) footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0), rgba(125, 211, 252, 0.45), rgba(14, 165, 233, 0));
}

body:not(.dashboard-page) footer a {
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

body:not(.dashboard-page) footer a:hover,
body:not(.dashboard-page) footer a:focus-visible {
  transform: translateY(-1px);
}

::selection {
  background: rgba(14, 165, 233, 0.24);
  color: rgb(15, 23, 42);
}

@keyframes phone-ring {
  0%,
  100% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(16deg);
  }

  40% {
    transform: rotate(-12deg);
  }

  60% {
    transform: rotate(10deg);
  }

  80% {
    transform: rotate(-8deg);
  }
}

@keyframes arrow-loop {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  24% {
    transform: translateX(8px);
    opacity: 1;
  }

  29% {
    transform: translateX(12px);
    opacity: 0;
  }

  30% {
    transform: translateX(-12px);
    opacity: 0;
  }

  37% {
    transform: translateX(-8px);
    opacity: 1;
  }

  45% {
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes ambient-gradient-shift {
  0% {
    background-position: 0% 0%, 100% 0%, 0% 0%;
  }

  100% {
    background-position: 10% 8%, 92% 7%, 0% 0%;
  }
}

@keyframes hero-pan {
  0% {
    background-position: 50% 0%;
  }

  100% {
    background-position: 50% 8%;
  }
}

@keyframes hero-card-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes orb-drift-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(18px, 14px, 0) scale(1.08);
  }
}

@keyframes orb-drift-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-20px, 12px, 0) scale(1.06);
  }
}

@keyframes orb-pulse {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 0.66;
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}

@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;
  }

  .cta-button--arrow:hover .cta-button__icon,
  .cta-button--arrow:focus-visible .cta-button__icon,
  .cta-button--phone:hover .cta-button__icon svg,
  .cta-button--phone:focus-visible .cta-button__icon svg {
    animation: none !important;
  }
}

/* ========================================================
   CLIENT PORTAL & DASHBOARD
   ======================================================== */

/* Dashboard page — override body background for cleaner look */
body.dashboard-page {
  background:
    radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.1), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.08), transparent 24%),
    linear-gradient(135deg, #f8fafc 0%, #eef4fb 52%, #e2ebf5 100%);
  animation: none;
}

/* Sidebar nav links */
.dashboard-page #sidebar {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at top, rgba(14, 165, 233, 0.12), transparent 32%);
  box-shadow: 24px 0 60px rgba(2, 6, 23, 0.18);
}

.dashboard-page > .flex > header,
.dashboard-page > header {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.sidebar-link {
  color: rgb(148, 163, 184);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.sidebar-link.is-active {
  background-color: rgba(14, 165, 233, 0.18);
  color: rgb(56, 189, 248);
}

/* Status / state badges */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.badge-active {
  background: rgb(220, 252, 231);
  color: rgb(21, 128, 61);
  border: 1px solid rgb(187, 247, 208);
}

.badge-pending {
  background: rgb(254, 249, 195);
  color: rgb(133, 77, 14);
  border: 1px solid rgb(253, 230, 138);
}

.badge-paid {
  background: rgb(219, 234, 254);
  color: rgb(29, 78, 216);
  border: 1px solid rgb(191, 219, 254);
}

.badge-overdue {
  background: rgb(254, 226, 226);
  color: rgb(185, 28, 28);
  border: 1px solid rgb(252, 165, 165);
}

.badge-info {
  background: rgb(240, 249, 255);
  color: rgb(3, 105, 161);
  border: 1px solid rgb(186, 230, 253);
}

/* Dashboard card — gentler hover lift vs public site cards */
.dashboard-card {
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 211, 252, 0.6);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

/* Inbox items */
.inbox-item {
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background-color 0.18s ease;
}

.inbox-item:hover {
  background-color: rgba(241, 245, 249, 0.95);
}

.inbox-item.is-unread {
  border-left-color: rgb(14, 165, 233);
  background-color: rgba(240, 249, 255, 0.6);
}

.inbox-item .inbox-body {
  display: none;
}

.inbox-item.is-open .inbox-body {
  display: block;
}

/* Toast notification */
@keyframes toast-slide-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-visible {
  animation: toast-slide-in 0.22s ease forwards;
}

/* Portal login form inputs — richer focus ring */
.portal-input:focus {
  outline: none;
  border-color: rgb(56, 189, 248);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.dashboard-page .portal-input,
.dashboard-page #profile-menu,
.dashboard-page [class*="bg-white/70"],
.dashboard-page [class*="bg-white/80"],
.dashboard-page [class*="bg-white/85"],
.dashboard-page [class*="bg-white/90"] {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

/* Suppress public-site hover lift for dashboard article cards */
body.dashboard-page main article.glass:hover,
body.dashboard-page main article.rounded-3xl:hover {
  transform: none;
  box-shadow: none;
}

/* ========================================================
   LEGAL PAGES & COOKIE BANNER
   ======================================================== */

.legal-prose {
  color: rgb(51, 65, 85);
}

.legal-prose h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-family: "Plus Jakarta Sans", "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: rgb(15, 23, 42);
}

.legal-prose h2:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.legal-prose h3 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(30, 41, 59);
}

.legal-prose p,
.legal-prose li {
  font-size: 0.96rem;
  line-height: 1.65;
}

.legal-prose ul {
  margin: 0.65rem 0;
  padding-left: 1.2rem;
}

.legal-prose li + li {
  margin-top: 0.35rem;
}

.legal-prose a {
  color: rgb(2, 132, 199);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 1200;
  max-width: 54rem;
  margin: 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 34%);
  color: rgb(226, 232, 240);
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

.cookie-banner--hidden {
  transform: translateY(120%);
  opacity: 0;
}

.cookie-banner--dismissed {
  transform: translateY(120%);
  opacity: 0;
}

.cookie-banner__inner {
  padding: 1rem;
}

.cookie-banner__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgb(203, 213, 225);
}

.cookie-banner__text a {
  color: rgb(125, 211, 252);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cookie-btn {
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.48rem 0.78rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.cookie-btn:hover,
.cookie-btn:focus-visible {
  transform: translateY(-1px);
}

.cookie-btn--primary {
  background: rgb(14, 165, 233);
  border-color: rgb(14, 165, 233);
  color: #fff;
}

.cookie-btn--primary:hover,
.cookie-btn--primary:focus-visible {
  background: rgb(2, 132, 199);
  border-color: rgb(2, 132, 199);
}

.cookie-btn--ghost {
  background: transparent;
  color: rgb(226, 232, 240);
}

.cookie-banner[hidden] {
  display: none !important;
}
@media (min-width: 640px) {
  .cookie-banner__inner {
    padding: 1.1rem 1.2rem;
  }
}

/* Newsletter Subscription */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.newsletter-form__input {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.625rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.newsletter-form__input:focus {
  outline: none;
  border-color: rgb(14, 165, 233);
  background: rgb(255, 255, 255);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.newsletter-form__button {
  border-radius: 0.75rem;
  border: none;
  background: rgb(14, 165, 233);
  color: white;
  padding: 0.625rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.newsletter-form__button:hover {
  background: rgb(2, 132, 199);
  transform: translateY(-1px);
}

.newsletter-form__button:active {
  transform: translateY(0);
}

.newsletter-form__error {
  color: rgb(239, 68, 68);
  font-size: 0.85rem;
}

.newsletter-form__success {
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: rgb(34, 197, 94);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Dark background variant (footer) */
.newsletter-form--dark .newsletter-form__input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgb(226, 232, 240);
}

.newsletter-form--dark .newsletter-form__input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.newsletter-form--dark .newsletter-form__input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgb(14, 165, 233);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.newsletter-form--dark .newsletter-form__success {
  color: rgb(110, 231, 183);
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
}

@media (min-width: 640px) {
  .newsletter-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .newsletter-form__input {
    flex: 1 1 16rem;
  }

  .newsletter-form__button {
    flex: 0 0 auto;
  }

  .newsletter-form__error,
  .newsletter-form__success {
    width: 100%;
  }
}


/* ─── Cookie Settings Panel ─────────────────────────────────────────────── */

.cookie-settings-panel {
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.cookie-settings-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(14, 165, 233, 0.12);
}

.cookie-settings-row:last-of-type {
  border-bottom: none;
}

.cookie-settings-row__info {
  flex: 1;
  min-width: 0;
}

.cookie-settings-row__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-settings-row__desc {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #475569;
}

.cookie-settings-row__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

.cookie-toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  cursor: pointer;
}

.cookie-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__track {
  display: block;
  width: 3rem;
  height: 1.625rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
  position: relative;
}

.cookie-toggle__track::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle__track {
  background: #0ea5e9;
}

.cookie-toggle input:checked + .cookie-toggle__track::after {
  transform: translateX(1.375rem);
}

.cookie-toggle--locked {
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}

.cookie-settings-saved-msg {
  display: none;
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.5rem;
  color: #15803d;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ========================================================
   TOUCH DEVICE ADAPTATIONS
   Applied when the primary pointer is coarse (touch screen)
   via the `touch-device` class set on <html> by script.js,
   and reinforced with @media (hover: none / pointer: coarse).
   ======================================================== */

/* Suppress translateY hover lifts — they feel wrong on touch */
@media (hover: none), (pointer: coarse) {
  .cta-button:hover,
  .cta-button:focus-visible {
    transform: none;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  }

  main article.glass:hover,
  main aside.glass:hover,
  main article.rounded-3xl:hover,
  main a.glass.block:hover,
  main img.rounded-3xl:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
    filter: none;
  }

  .dashboard-card:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
    border-color: rgba(255, 255, 255, 0.52);
  }

  header nav a:hover,
  header nav a:focus-visible {
    transform: none;
  }

  body:not(.dashboard-page) footer a:hover,
  body:not(.dashboard-page) footer a:focus-visible {
    transform: none;
  }

  .cookie-btn:hover,
  .cookie-btn:focus-visible {
    transform: none;
  }

  .newsletter-form__button:hover {
    transform: none;
  }

  .nav-link-has-icon:hover .nav-link-icon svg,
  .nav-link-has-icon:focus-visible .nav-link-icon svg {
    transform: none;
  }

  /* Suppress looping icon animations triggered on hover */
  .cta-button--arrow:hover .cta-button__icon,
  .cta-button--arrow:focus-visible .cta-button__icon,
  .cta-button--phone:hover .cta-button__icon svg,
  .cta-button--phone:focus-visible .cta-button__icon svg {
    animation: none;
    transform: none;
  }

  .cta-button--send:hover .cta-button__icon,
  .cta-button--send:focus-visible .cta-button__icon,
  .cta-button--download:hover .cta-button__icon,
  .cta-button--download:focus-visible .cta-button__icon {
    transform: none;
  }
}

/* Ensure touch targets are at least 44px × 44px */
@media (pointer: coarse) {
  /* Nav links */
  header nav a,
  nav[data-mobile-menu] a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  nav[data-mobile-menu] a {
    min-height: 48px;
  }

  /* Buttons */
  button,
  [role="button"],
  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    min-height: 44px;
  }

  /* Cookie banner buttons */
  .cookie-btn {
    min-height: 44px;
    padding: 0.6rem 1rem;
  }

  /* Mobile menu toggle button */
  [data-menu-button] {
    min-height: 44px;
    min-width: 44px;
  }

  /* Newsletter submit button */
  .newsletter-form__button {
    min-height: 44px;
  }

  /* CTA buttons — already large enough but enforce minimum */
  .cta-button {
    min-height: 44px;
  }

  /* Sidebar nav links in dashboard */
  .sidebar-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Inbox items */
  .inbox-item {
    min-height: 48px;
  }
}

/* Active/tap feedback on touch — subtle press effect */
@media (pointer: coarse) {
  .cta-button:active {
    transform: scale(0.97);
    transition-duration: 0.08s;
  }

  header nav a:active,
  nav[data-mobile-menu] a:active {
    opacity: 0.7;
    transition-duration: 0.08s;
  }

  .cookie-btn:active {
    opacity: 0.75;
    transition-duration: 0.08s;
  }
}

/* ========================================================
   PWA / INSTALLED APP STYLES
   ======================================================== */

/* When running as a standalone PWA (display: standalone),
   add a small top safe-area inset so content clears the
   notch / status bar on iOS / Android. */
@media (display-mode: standalone) {
  [data-header] {
    padding-top: env(safe-area-inset-top, 0px);
  }

  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* Respect the system-level safe area on iOS in portrait when
   the virtual keyboard is not up (covers notch & home indicator). */
@supports (padding-top: env(safe-area-inset-top)) {
  @media (display-mode: standalone) {
    [data-header] {
      padding-top: max(env(safe-area-inset-top, 0px), 0px);
    }
  }
}
