/* ECC-Swiss — shared styles */

:root {
  --ink: #1A1A1A;
  --ink-2: #232323;
  --ink-3: #2D2D2C;
  --paper: #FBFAF7;
  --paper-2: #F3F1EA;
  --gold: #D4AF37;
  --gold-light: #E7CC73;
  --gold-dark: #A8862A;
  --steel: #2D4C6B;
  --accent: #4DA8FF;
  --graymid: #404040;
}

html {
  scroll-behavior: smooth;
}

/* Tailwind CDN only generates the grid-cols utilities actually used in markup.
   Every grid here relies on a responsive grid-cols-N (sm:/md:/lg:) with no
   unprefixed base, which leaves the implicit single track sized by max-content
   and clips long headlines on mobile. Force a single base column; the
   responsive utilities (equal specificity, injected after this stylesheet)
   still win at their breakpoints via source order. */
.grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--paper);
  color: var(--ink);
  overflow-wrap: break-word;
}

.font-display {
  font-family: 'Montserrat', sans-serif;
}

/* ---------- Grain / noise texture ---------- */
.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/noise.svg');
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ---------- Gold radial glows (hero backdrops) ---------- */
.glow-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.glow-field span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}
.glow-field .g1 {
  width: 38rem; height: 38rem;
  top: -14rem; right: -10rem;
  background: radial-gradient(circle, rgba(212,175,55,0.22), transparent 70%);
}
.glow-field .g2 {
  width: 30rem; height: 30rem;
  bottom: -12rem; left: -8rem;
  background: radial-gradient(circle, rgba(45,76,107,0.35), transparent 70%);
}
.glow-field .g3 {
  width: 22rem; height: 22rem;
  top: 30%; left: 40%;
  background: radial-gradient(circle, rgba(212,175,55,0.10), transparent 70%);
}

/* ---------- Interlocking rings motif ---------- */
.rings-motif {
  position: relative;
  width: 100%;
  height: 100%;
}
.rings-motif .ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(212,175,55,0.55);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 320ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 220ms ease,
              border-color 220ms ease,
              color 220ms ease;
}
.btn:active {
  transform: scale(0.96);
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--ink);
  box-shadow: 0 8px 20px -8px rgba(212,175,55,0.55), 0 2px 6px rgba(0,0,0,0.15);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(212,175,55,0.65), 0 4px 10px rgba(0,0,0,0.18);
}
.btn-outline {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid rgba(212,175,55,0.55);
}
.btn-outline:hover {
  transform: translateY(-2px);
  background: rgba(212,175,55,0.08);
  border-color: var(--gold);
  box-shadow: 0 10px 24px -12px rgba(212,175,55,0.35);
}
.btn-outline-dark {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(26,26,26,0.25);
}
.btn-outline-dark:hover {
  transform: translateY(-2px);
  background: rgba(26,26,26,0.04);
  border-color: var(--gold-dark);
  color: var(--gold-dark);
}
.btn-ghost {
  color: var(--ink);
  padding: 0.9rem 0.5rem;
}
.btn-ghost:hover {
  color: var(--gold-dark);
}
/* Compact header variant — keeps Login visually subordinate to the
   full-size Registrieren CTA and saves the header row from wrapping. */
.btn-compact {
  padding: 0.5rem 1.15rem;
  font-size: 0.72rem;
}
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Cards / surfaces (layering system) ---------- */
.surface-base {
  background-color: var(--paper);
}
.surface-elevated {
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(26,26,26,0.04), 0 12px 32px -16px rgba(26,26,26,0.10);
  border: 1px solid rgba(26,26,26,0.06);
}
.surface-floating {
  background-color: #ffffff;
  box-shadow: 0 4px 8px rgba(26,26,26,0.05), 0 24px 48px -20px rgba(212,175,55,0.20), 0 8px 24px -12px rgba(26,26,26,0.12);
  border: 1px solid rgba(212,175,55,0.18);
}
.surface-dark-elevated {
  background-color: var(--ink-2);
  border: 1px solid rgba(212,175,55,0.12);
}
.surface-dark-floating {
  background-color: var(--ink-3);
  border: 1px solid rgba(212,175,55,0.22);
  box-shadow: 0 24px 48px -16px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.05);
}

.card-hover {
  transition: transform 380ms cubic-bezier(0.34,1.56,0.64,1), box-shadow 380ms cubic-bezier(0.34,1.56,0.64,1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(26,26,26,0.05), 0 28px 48px -20px rgba(212,175,55,0.28), 0 10px 24px -12px rgba(26,26,26,0.14);
}

/* ---------- Nav link underline ---------- */
.nav-link {
  position: relative;
  color: rgba(255,255,255,0.78);
  transition: color 220ms ease;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 280ms cubic-bezier(0.16,1,0.3,1);
}
.nav-link:hover {
  color: #ffffff;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: #ffffff;
}

/* ---------- Inputs ---------- */
.field-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(26,26,26,0.15);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}
.field-input:hover {
  border-color: rgba(26,26,26,0.28);
}
.field-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.18);
}
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--graymid);
  margin-bottom: 0.4rem;
}
.chip-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip-checkbox span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(26,26,26,0.18);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 220ms ease, background-color 220ms ease, color 220ms ease, transform 220ms ease;
  user-select: none;
}
.chip-checkbox input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip-checkbox:hover span {
  border-color: var(--gold-dark);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 720ms cubic-bezier(0.16,1,0.3,1), transform 720ms cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Every card-hover element also carries .reveal for its scroll-in entrance,
   and .reveal's own transition (above) wins the cascade once both classes
   are present — silently dropping card-hover's box-shadow transition
   (instant snap) and forcing its hover lift onto the slow entrance easing.
   This higher-specificity rule only takes effect after .is-visible lands
   (i.e. once the entrance animation is already done), so it never touches
   the scroll-in itself — it only governs the later hover interaction. */
.reveal.is-visible.card-hover {
  transition: transform 380ms cubic-bezier(0.34,1.56,0.64,1), box-shadow 380ms cubic-bezier(0.34,1.56,0.64,1);
}

/* ---------- Mobile nav ---------- */
.mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 380ms cubic-bezier(0.16,1,0.3,1);
}
.mobile-nav.open {
  max-height: 32rem;
}

/* ---------- Site search ---------- */
.search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: rgba(255,255,255,0.65);
  transition: color 220ms ease, background-color 220ms ease;
}
.search-trigger:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.08);
}
body.search-open {
  overflow: hidden;
}
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 6.5rem 1.5rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
}
.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(4px);
}
.search-panel {
  position: relative;
  width: 100%;
  max-width: 34rem;
  background: var(--ink-2);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 1.25rem;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.55), 0 10px 24px -8px rgba(212,175,55,0.12);
  overflow: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: transform 280ms cubic-bezier(0.16,1,0.3,1);
}
.search-overlay.is-open .search-panel {
  transform: translateY(0) scale(1);
}
.search-panel-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.search-panel-input svg {
  color: rgba(212,175,55,0.85);
  flex-shrink: 0;
}
.search-panel-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
}
.search-panel-input input::placeholder {
  color: rgba(255,255,255,0.35);
}
.search-panel-close {
  color: rgba(255,255,255,0.45);
  transition: color 200ms ease;
  flex-shrink: 0;
}
.search-panel-close:hover {
  color: #ffffff;
}
.search-results {
  list-style: none;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.5rem;
}
.search-result-link {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  transition: background-color 180ms ease;
}
.search-result-link:hover,
.search-result-link:focus-visible {
  background: rgba(212,175,55,0.1);
}
.search-result-title {
  display: block;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
}
.search-result-desc {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.5;
  margin-top: 0.2rem;
}
.search-empty,
.search-loading {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  font-weight: 300;
}

/* ---------- Misc ---------- */
.tracking-tightest {
  letter-spacing: -0.03em;
}
.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.eyebrow-on-dark {
  color: var(--gold-light);
}

::selection {
  background: rgba(212,175,55,0.35);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--gold-dark);
}

.filter-pill {
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(26,26,26,0.15);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--graymid);
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}
.filter-pill:hover {
  border-color: var(--gold-dark);
  color: var(--ink);
}
.filter-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 420ms cubic-bezier(0.16,1,0.3,1);
}
.accordion-item.open .accordion-content {
  max-height: 40rem;
}
.accordion-item .accordion-icon {
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

/* ================== Homepage: hero heading wrap ================== */
.hero-heading {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

/* ================== Homepage: aurora background ================== */
.aurora-bg {
  position: absolute;
  inset: -10px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.65;
  -webkit-mask-image: radial-gradient(ellipse 85% 95% at 50% 0%, #000 40%, transparent 75%);
  mask-image: radial-gradient(ellipse 85% 95% at 50% 0%, #000 40%, transparent 75%);
}
.aurora-bg::before,
.aurora-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Non-repeating: band widths grow from left (5%) to right (33%), so the
     rightmost ray reads as the biggest and they taper down going left. */
  background-image: linear-gradient(
    100deg,
    rgba(212, 175, 55, 0.85) 0%,
    rgba(231, 204, 115, 0.65) 5%,
    rgba(45, 76, 107, 0.55) 12%,
    rgba(168, 134, 42, 0.65) 21%,
    rgba(212, 175, 55, 0.85) 33%,
    rgba(231, 204, 115, 0.65) 48%,
    rgba(45, 76, 107, 0.55) 67%,
    rgba(168, 134, 42, 0.7) 100%
  );
  background-size: 200% 200%;
  background-position: 50% 50%;
  filter: blur(36px);
}
.aurora-bg::before {
  mix-blend-mode: screen;
  animation: aurora-shift-before 11s linear infinite reverse;
}
.aurora-bg::after {
  mix-blend-mode: overlay;
  background-size: 150% 100%;
  animation: aurora-shift-after 7s linear infinite;
}
/* Delta must equal a multiple of each layer's own background-size tile width
   (200% here) so the pattern lines up exactly on loop restart — otherwise
   the shift snaps visibly at the seam. */
@keyframes aurora-shift-before {
  from { background-position: 50% 50%; }
  to { background-position: 250% 50%; }
}
/* Tile width is 150%, so the matching seamless delta is 300% (not 200%). */
@keyframes aurora-shift-after {
  from { background-position: 50% 50%; }
  to { background-position: 350% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-bg::before,
  .aurora-bg::after {
    animation: none;
  }
}

/* ================== Homepage: feature ticker bar ================== */
.ticker-bar {
  background-color: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.ticker-bar .ticker-item {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  font-weight: 500;
}
.ticker-bar .ticker-item strong {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}
.ticker-bar .ticker-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.6);
}

/* ================== Homepage: browser/app mockup panel ================== */
.browser-mockup {
  background-color: var(--ink-2);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 1.1rem;
  box-shadow:
    0 40px 80px -24px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(212, 175, 55, 0.04),
    0 0 60px -10px rgba(212, 175, 55, 0.18);
  overflow: hidden;
}
.browser-mockup-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mockup-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.mockup-status-pill {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.mockup-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  flex-shrink: 0;
}

/* ================== Homepage: bento feature grid ================== */
.bento-card {
  background-color: var(--ink-2);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 1.25rem;
  position: relative;
  overflow: hidden;
}
.bento-icon-glow {
  position: absolute;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

/* ================== Homepage: glow showcase frame ================== */
.showcase-frame {
  position: relative;
  border-radius: 1.25rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.7), rgba(45, 76, 107, 0.5) 45%, rgba(212, 175, 55, 0.15));
}
.showcase-frame-inner {
  background-color: var(--ink);
  border-radius: 1.2rem;
  overflow: hidden;
}

/* ================== Homepage: closing CTA — interlocking rings motif ================== */
.rings-orb {
  position: relative;
  width: 17rem;
  height: 17rem;
}
.rings-orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.55);
  box-shadow: 0 0 50px -6px rgba(212, 175, 55, 0.35);
}
.rings-orb-ring--a {
  width: 11.5rem;
  height: 11.5rem;
  top: 1rem;
  left: 1rem;
  background: radial-gradient(circle at 35% 30%, rgba(212, 175, 55, 0.16), transparent 70%);
}
.rings-orb-ring--b {
  width: 11.5rem;
  height: 11.5rem;
  bottom: 1rem;
  right: 1rem;
  border-color: rgba(45, 76, 107, 0.7);
  background: radial-gradient(circle at 65% 70%, rgba(45, 76, 107, 0.22), transparent 70%);
  box-shadow: 0 0 50px -6px rgba(45, 76, 107, 0.4);
}
