@import url('/brand/tokens/tokens.css');

/* Clear Morning — redirect / interstitial (mobile gate → desktop split) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body.redirect {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--brand-font-ui);
  color: var(--brand-ink-body);
  background: var(--brand-paper);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%, #fff9f0 0%, transparent 55%),
    linear-gradient(
      180deg,
      transparent 0%,
      color-mix(in srgb, var(--brand-paper-edge) 40%, transparent) 100%
    );
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-focus);
  outline-offset: 3px;
}

.site-hdr {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(0.65rem, 2.5vw, 1rem) clamp(1rem, 4vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--brand-teal);
  min-height: 44px;
}

:root {
  --lockup-emblem-size: 44px;
  --lockup-wordmark-size: clamp(1.5rem, 4.2vw, 1.625rem);
}

@media (min-width: 768px) {
  :root {
    --lockup-emblem-size: 52px;
  }
}

.lockup-emblem {
  width: var(--lockup-emblem-size);
  height: var(--lockup-emblem-size);
  flex: 0 0 var(--lockup-emblem-size);
  display: block;
  object-fit: contain;
}

.lockup-text {
  font-family: var(--brand-font-wordmark);
  font-size: var(--lockup-wordmark-size);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lang-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-teal-soft);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--brand-teal) 6%, white);
  white-space: nowrap;
}

.redirect-layout {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.5rem) clamp(1.25rem, 4vw, 2rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 2.5vw, 1.5rem);
}

.reassure {
  display: none;
}

.reassure h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.05rem, 2.5vw, 1.15rem);
  font-weight: 700;
  color: var(--brand-teal);
  line-height: 1.35;
}

.reassure p {
  margin: 0;
  font-size: clamp(0.88rem, 2.2vw, 0.92rem);
  line-height: 1.65;
  color: var(--brand-muted);
}

.trust-line {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

.trust-line a {
  color: var(--brand-teal-soft);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.trust-line.reassure-mobile {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.8125rem;
}

@media (min-width: 768px) {
  .trust-line.reassure-mobile {
    display: none;
  }
}

.redirect-main {
  width: 100%;
  min-width: 0;
}

.card {
  background: var(--brand-surface);
  border: 1px solid color-mix(in srgb, var(--brand-paper-edge) 80%, white);
  border-radius: var(--brand-radius-card);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--brand-teal) 8%, transparent);
  padding: clamp(0.95rem, 3vw, 1.2rem) clamp(1rem, 3.5vw, 1.2rem);
}

.listing {
  display: flex;
  gap: clamp(0.65rem, 2vw, 0.85rem);
  align-items: flex-start;
  margin-bottom: clamp(0.65rem, 2vw, 0.85rem);
}

.listing img,
.thumb-placeholder {
  width: clamp(72px, 20vw, 88px);
  height: clamp(72px, 20vw, 88px);
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--brand-paper-edge), var(--brand-paper));
  border: 1px solid color-mix(in srgb, var(--brand-teal) 10%, transparent);
}

.listing h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 2.8vw, 1.05rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-teal);
}

.meta {
  font-size: clamp(0.85rem, 2.4vw, 0.9rem);
  color: var(--brand-muted);
  line-height: 1.5;
}

.meta strong {
  color: var(--brand-teal);
  font-weight: 600;
}

.source-badge {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-teal-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand-teal) 7%, white);
  border: 1px solid color-mix(in srgb, var(--brand-teal) 12%, transparent);
}

.count-block {
  margin: 0.25rem 0 clamp(0.65rem, 2vw, 0.85rem);
}

.count-label {
  margin: 0 0 0.4rem;
  font-size: clamp(0.85rem, 2.4vw, 0.92rem);
  color: var(--brand-muted);
  line-height: 1.45;
}

.count-label strong,
#count-seconds {
  color: var(--brand-teal);
  font-weight: 700;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-teal) 12%, white);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-deep));
  transform-origin: left center;
}

[dir='rtl'] .progress-fill {
  transform-origin: right center;
}

.ad {
  margin: 0.15rem 0 clamp(0.75rem, 2.5vw, 1rem);
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-teal) 5%, white);
  border: 1px solid color-mix(in srgb, var(--brand-teal) 10%, transparent);
  min-height: 0;
}

.ad-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--brand-muted) 90%, transparent);
  margin-bottom: 0.35rem;
}

.house-ad strong {
  display: block;
  font-size: 0.95rem;
  color: var(--brand-teal);
  margin-bottom: 0.25rem;
}

.house-ad p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--brand-muted);
}

button#go,
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.15rem;
  font-family: inherit;
  font-size: clamp(1rem, 2.8vw, 1.05rem);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(165deg, var(--brand-orange) 0%, var(--brand-orange-deep) 100%);
  border: none;
  border-radius: var(--brand-radius-button);
  box-shadow: var(--brand-shadow-cta);
  cursor: pointer;
}

button#go:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.muted {
  font-size: 0.75rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--brand-muted) 88%, transparent);
  margin: 0.75rem 0 0;
  text-align: center;
}

.card-error {
  text-align: center;
}

.card-error .lead {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand-teal);
  margin: 0.25rem 0 0.5rem;
}

.site-footer {
  width: 100%;
  max-width: 72rem;
  margin: auto auto 0;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 4vw, 1.5rem)
    calc(0.75rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--brand-muted) 85%, transparent);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.1rem;
  margin-bottom: 0.55rem;
}

.site-footer a {
  color: var(--brand-teal-soft);
  text-decoration: none;
  font-weight: 600;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-teal) 7%, white);
  border: 1px solid color-mix(in srgb, var(--brand-teal) 12%, transparent);
  color: var(--brand-teal);
  text-decoration: none;
  font-weight: 600;
}

/* Fluid scale-up: reassurance column + split */
@media (min-width: 480px) {
  .card {
    padding: 1.1rem 1.15rem 1.2rem;
  }
}

@media (min-width: 768px) {
  .reassure {
    display: block;
    flex: 0 0 clamp(11rem, 26vw, 14rem);
    padding-top: 0.35rem;
  }

  .redirect-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(1.25rem, 4vw, 2rem);
  }

  .reassure .trust-line {
    text-align: start;
    margin-top: 1rem;
  }

  [dir='rtl'] .reassure .trust-line {
    text-align: right;
  }

  .site-footer {
    text-align: start;
  }

  [dir='rtl'] .site-footer {
    text-align: right;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  [dir='rtl'] .site-footer nav {
    justify-content: flex-end;
  }
}

@media (min-width: 1024px) {
  .redirect-layout {
    padding-inline: clamp(1.5rem, 5vw, 2.5rem);
  }
}

@media (min-width: 1280px) {
  .lockup-text {
    font-size: 1.35rem;
  }
}
