:root {
  --clr-bg: #000;
  --clr-bg-elev: #0b0b0b;
  --clr-white: #fff;
  --clr-muted: #b8b8b8;
  --clr-border: rgba(255, 255, 255, .08);
  --clr-accent: #00BCE4;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 188, 228, .15);
  --container: min(1120px, 92vw);

  /* HDMI frame tuning */
  --hdmi-cut: 16px;
  --hdmi-radius: 18px;
  --hdmi-outline: rgba(0,188,228,0.65);
  --hdmi-glow: rgba(0,188,228,0.22);
  --hdmi-glow-inset: rgba(0,188,228,0.14);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--clr-bg);
  color: var(--clr-white);
  line-height: 1.6;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

/* ===== Header im HDMI/Tech Frame Style ===== */
.header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  /* HDMI-ish shape */
  border-radius: var(--hdmi-radius);
  clip-path: polygon(
    var(--hdmi-cut) 0%,
    100% 0%,
    100% calc(100% - var(--hdmi-cut)),
    calc(100% - var(--hdmi-cut)) 100%,
    0% 100%,
    0% var(--hdmi-cut)
  );

  /* Layout */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem clamp(1rem, 4vw, 4rem);

  /* Glass + MDL */
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.86));
  backdrop-filter: blur(10px);

  /* outer shadow (subtle) */
  box-shadow:
    0 10px 40px rgba(0,0,0,.55);
}

/* Outline + inner glow (wie Card, aber dezenter) */
.header::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: inherit;

  border: 1.25px solid rgba(0,188,228,0.55);
  box-shadow:
    0 0 10px rgba(0,188,228,0.14),
    inset 0 0 10px rgba(0,188,228,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

/* Kleine Tech-Highlights */
.header::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: inherit;

  background:
    linear-gradient(90deg, transparent 35%, rgba(0,188,228,.55) 50%, transparent 65%) top left / 120px 1px no-repeat,
    linear-gradient(180deg, transparent 35%, rgba(0,188,228,.55) 50%, transparent 65%) bottom right / 1px 120px no-repeat;
  opacity: .75;
}

/* Wichtig: Header-Inhalte über dem Frame */
.header > *{
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: #fff;
  text-decoration: none;
  z-index: 101;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .10));
}

.brand-text { font-weight: 600; font-size: 1.1rem; }
.brand-text strong { color: var(--clr-accent); }

.lang-switch {
  display: flex;
  gap: .2rem;
  padding: .2rem;
  background: var(--clr-bg-elev);
  border: 1px solid var(--clr-border);
  border-radius: 999px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .36rem .6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: .2s;
}

.lang-btn.active {
  background: rgba(0, 188, 228, .16);
  border-color: var(--clr-border);
}

.lang-btn svg {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--clr-border);
}

/* Main Content */
.main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 80px;
}

/* Particle Network Canvas */
#codeMatrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.6;
}

/* Countdown Card container (3D / layout only) */
.countdown-card {
  position: relative;
  z-index: 10;
  max-width: 600px;
  width: 90%;
  height: 520px;
  margin: 4rem auto;
  perspective: 1000px;
  cursor: pointer;
  animation: slideUp 0.8s ease forwards;
  transform: translateY(20px);
  opacity: 0;
}

@keyframes slideUp {
  to { transform: translateY(0); opacity: 1; }
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

/* Der Info-Block soll links starten und volle Breite nutzen */
.card-back .company-info{
  align-self: stretch;           /* nimmt volle Breite der Card */
  text-align: left;
}

/* Sicherheitshalber: alles im Info-Bereich links */
.card-back .info-section,
.card-back .info-section h3,
.card-back .info-section p,
.card-back .focus-list,
.card-back .focus-list li{
  text-align: left;
}

.countdown-card.flipped .card-inner { transform: rotateY(180deg); }

/* === HARD OVERRIDE: Back content really left === */
.card-back {
  align-items: flex-start;     /* statt center */
}

/* Wichtig: card-inner hat text-align:center -> hier hart überschreiben */
.card-back .company-info,
.card-back .info-section,
.card-back .info-section h3,
.card-back .info-section p,
.card-back .focus-list,
.card-back .focus-list li {
  text-align: left !important;
}

/* Breite erzwingen, damit nichts optisch "mittig" wirkt */
.card-back .company-info,
.card-back .info-section,
.card-back .focus-list {
  width: 100%;
  max-width: 100%;
}

/* Dein Wunsch: Company Name + Tagline bleiben mittig */
.card-back .company-name,
.card-back .company-tagline {
  align-self: center;
  text-align: center !important;
}

/* ===== HDMI / Tech Frame for BOTH sides ===== */
.card-front, .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;

  border-radius: var(--hdmi-radius);
  clip-path: polygon(
    var(--hdmi-cut) 0%,
    100% 0%,
    100% calc(100% - var(--hdmi-cut)),
    calc(100% - var(--hdmi-cut)) 100%,
    0% 100%,
    0% var(--hdmi-cut)
  );

  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.88));
  backdrop-filter: blur(10px);

  border: none;
  box-shadow: 0 20px 60px rgba(0,0,0,.70);

  padding: 2.5rem 2rem;
  padding-bottom: 6.5rem; /* ✅ Safe area for flip-button (front & back) */

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Outline + inner glow */
.card-front::before, .card-back::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: inherit;

  border: 1.5px solid var(--hdmi-outline);
  box-shadow:
    0 0 14px var(--hdmi-glow),
    inset 0 0 14px var(--hdmi-glow-inset),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}

/* Tech highlights like HDMI label */
.card-front::after, .card-back::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: inherit;

  background:
    linear-gradient(90deg, transparent 35%, rgba(0,188,228,.65) 50%, transparent 65%) top left / 120px 1px no-repeat,
    linear-gradient(180deg, transparent 35%, rgba(0,188,228,.65) 50%, transparent 65%) bottom right / 1px 120px no-repeat;
  opacity: .9;
}

.card-back { transform: rotateY(180deg); }

/* Vorderseite */
.card-front .company-name {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--clr-white);
  width: 100%;
}

.card-front .company-name strong { color: var(--clr-accent); }

.card-front .slogan {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--clr-muted);
  margin: 0 0 2rem;
  font-weight: 400;
}

/* Countdown */
.countdown { margin-top: 2rem; }

.countdown-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1rem);
  flex-wrap: wrap;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(60px, 15vw, 80px);
}

.number {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--clr-accent);
  line-height: 1;
  font-family: ui-monospace, 'Courier New', monospace;
  text-shadow: 0 0 20px rgba(0, 188, 228, 0.3);
}

.label {
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  color: var(--clr-muted);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.separator {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--clr-accent);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.6;
}

/* Days only */
.days-only .countdown-display { justify-content: center; }
.days-only .time-unit { min-width: auto; }
.days-only .number { font-size: clamp(3rem, 8vw, 5rem); }
.days-only .label { font-size: clamp(1rem, 2vw, 1.2rem); }

/* Back content left aligned */
.company-info {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.info-section h3 {
  color: var(--clr-accent);
  font-size: 1rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.info-section p {
  color: var(--clr-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 0;
}

.focus-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--clr-muted);
  font-size: 0.95rem;
}

.focus-list li {
  margin: 0.35rem 0;
  line-height: 1.5;
}

/* Flip Button (exists on both sides) */
.flip-button {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  background: rgba(0, 188, 228, 0.10);
  border: 1px solid rgba(0, 188, 228, 0.32);
  color: var(--clr-accent);
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  backdrop-filter: blur(10px);
  outline: none;
  z-index: 5;
}

.flip-button:hover {
  background: rgba(0, 188, 228, 0.18);
  border-color: rgba(0, 188, 228, 0.55);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 188, 228, 0.18);
}

.flip-button:active {
  transform: translateX(-50%) translateY(0px);
  box-shadow: 0 6px 18px rgba(0, 188, 228, 0.12);
}

.flip-button:focus-visible {
  outline: 2px solid rgba(0, 188, 228, 0.55);
  outline-offset: 3px;
}

.flip-icon {
  font-size: 1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Footer */
.footer {
  position: relative;
  z-index: 10;
  text-align: center;
  color: rgba(255, 255, 255, .7);
  padding: 2rem 5vw;
  border-top: 1px solid var(--clr-border);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.blue-heart {
  color: var(--clr-accent);
  font-size: 1.1em;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 50%, 100% { transform: scale(1); }
  25%, 75% { transform: scale(1.1); }
}

/* Footer Legal Links (single definition, no duplicates) */
.legal-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: .9rem;
  margin: 12px 0 0;
  padding: 0;
}

.legal-links li { margin: 0; padding: 0; }

footer.footer ul.legal-links li button.linklike {
  all: unset;
  cursor: pointer;
  position: relative;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  padding: .18rem .12rem;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

footer.footer ul.legal-links li button.linklike::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,188,228,.9), rgba(0,188,228,0));
  transition: transform .25s ease;
  opacity: .85;
}

footer.footer ul.legal-links li button.linklike:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

footer.footer ul.legal-links li button.linklike:hover::after { transform: scaleX(1); }

footer.footer ul.legal-links li button.linklike:active {
  transform: translateY(0);
  background: rgba(0,188,228,0.08);
}

footer.footer ul.legal-links li button.linklike:focus-visible {
  outline: 2px solid rgba(0, 188, 228, 0.55);
  outline-offset: 3px;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--clr-bg-elev);
  border-top: 1px solid var(--clr-border);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  animation: slideUpFromBottom 0.4s ease forwards;
}

@keyframes slideUpFromBottom {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDownToBottom {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

.cookie-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-text h3 {
  margin: 0 0 0.5rem;
  color: var(--clr-white);
  font-size: 1.1rem;
}

.cookie-text p {
  margin: 0;
  color: var(--clr-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-actions { flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .8rem 1.2rem;
  border-radius: 10px;
  border: 1px solid currentColor;
  transition: .25s;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-accent {
  background: var(--clr-accent);
  color: #00171a;
  border-color: transparent;
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Bottom Sheet System */
.sheet-backdrop[hidden] { display: none; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(2px);
  background: rgba(0, 0, 0, .45);
  z-index: 999;
  display: grid;
  place-items: end center;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet {
  width: min(760px, 94vw);
  max-height: 80vh;
  overflow: auto;
  background: #0c0c0c;
  color: #fff;
  border: 1px solid var(--clr-border);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
  transform: translateY(18px);
  animation: slideUpSheet .24s ease forwards;
  position: relative;
  padding: 18px 18px 24px;
}

@keyframes slideUpSheet { to { transform: translateY(0); } }

.sheet__handle {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: #2a2a2a;
  margin: 6px auto 10px;
  opacity: .9;
}

.sheet__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--clr-border);
  background: #111;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .25s;
}

.sheet__close:hover {
  background: var(--clr-bg-elev);
  transform: scale(1.05);
}

.sheet__content { padding-top: 6px; }

.sheet__content h2 { margin: 0 0 1rem; color: var(--clr-white); }

.sheet__content h3 { margin: 1.5rem 0 .6rem; color: var(--clr-accent); }

.sheet__content p { color: var(--clr-muted); line-height: 1.6; margin-bottom: 1rem; }

.sheet__content ul { color: var(--clr-muted); padding-left: 1.2rem; }
.sheet__content li { margin-bottom: 0.5rem; }

.sheet__content a { color: var(--clr-accent); text-decoration: none; }
.sheet__content a:hover { text-decoration: underline; }

.sheet :is(button, a):focus { outline: 2px solid var(--clr-accent); outline-offset: 2px; }

/* Responsive */
@media (max-width: 768px) {
  .header { padding: 0.6rem 1rem; }
  .brand-text { font-size: 1rem; }

  .card-front, .card-back {
    padding: 2rem 1.5rem;
    padding-bottom: 6.2rem; /* keep safe area */
  }

  .company-info { gap: 0.85rem; }
  .info-section p { font-size: 0.92rem; }
  .focus-list { font-size: 0.9rem; }

  .countdown-display { gap: 0.5rem; }
  .separator { display: none; }

  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: center;
  }

  .flip-button {
    font-size: 0.78rem;
    padding: 0.45rem 0.85rem;
  }
}

@media (max-width: 480px) {
  .countdown-card { height: 520px; }

  .card-front, .card-back {
    padding: 1.6rem 1.1rem;
    padding-bottom: 6.0rem;
  }

  .card-back .company-name { font-size: 1.3rem; }
  .info-section h3 { font-size: 0.95rem; }
  .info-section p { font-size: 0.88rem; }
  .focus-list { font-size: 0.86rem; }

  .countdown-display {
    flex-direction: column;
    gap: 1rem;
  }

  .time-unit { min-width: auto; }

  .cookie-content { padding: 1rem; }
  .cookie-text h3 { font-size: 1rem; }
  .cookie-text p { font-size: 0.85rem; }
}

/* Floating animated logo above the card */
.card-logo{
  position:absolute;
  top:-44px;
  left:50%;
  transform:translateX(-50%);
  width:88px;
  height:88px;
  display:grid;
  place-items:center;
  border-radius:22px;

  background: rgba(12,12,12,.68);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);

  box-shadow:
    0 18px 60px rgba(0,0,0,.55),
    0 0 0 1px rgba(0,188,228,.06),
    0 0 22px rgba(0,188,228,.16);

  z-index:20;
  pointer-events:none;
  animation: floatLogo 5.5s ease-in-out infinite;
}

.mdl-logo-anim{
  width:78px;
  height:78px;
  display:block;
  filter: drop-shadow(0 0 10px rgba(0,188,228,.20));
}

@keyframes floatLogo{
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(-5px); }
}