/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #fbf7f2;
  --ink: #1b1530;
  --muted: #6b6480;
  --card: #ffffff;
  --line: #ebe5f1;
  --coral: #ff5a36;
  --pink: #ff2d87;
  --violet: #7b5cff;
  --teal: #14b8a6;
  --shadow: 0 1px 2px rgb(27 21 48 / 6%), 0 12px 40px -12px rgb(27 21 48 / 18%);
  --radius: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120f1f;
    --ink: #f4f1fa;
    --muted: #a59fb8;
    --card: #1c1830;
    --line: #2d2846;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 48px -16px rgb(0 0 0 / 60%);
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(40rem 28rem at 110% -10%, rgb(255 90 54 / 22%), transparent 60%),
    radial-gradient(36rem 26rem at -20% 20%, rgb(123 92 255 / 18%), transparent 60%),
    radial-gradient(30rem 24rem at 50% 120%, rgb(20 184 166 / 16%), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(2rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

/* Brand */

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: clamp(2rem, 8vw, 4rem);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--coral), var(--pink), var(--violet), var(--teal), var(--coral));
  box-shadow: inset 0 0 0 0.4rem var(--bg);
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.language {
  margin-left: auto;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s;
}

.language:hover {
  border-color: var(--violet);
}

.admin-link + .language {
  margin-left: 0;
}

/* Hero */

.hero {
  margin-bottom: 1.75rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgb(255 90 54 / 12%);
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.1rem, 8vw, 3.25rem);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.accent {
  background: linear-gradient(100deg, var(--coral), var(--pink) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0;
  max-width: 30rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 3.5vw, 1.2rem);
  text-wrap: pretty;
}

/* Card */

.card {
  position: relative;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--violet), var(--shadow);
}

.card textarea {
  display: block;
  width: 100%;
  min-height: 9rem;
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1.45;
  field-sizing: content;
}

.card textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.counter {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.is-near-limit .counter {
  color: var(--coral);
  font-weight: 700;
}

.send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--coral), var(--pink));
  box-shadow: 0 8px 24px -8px rgb(255 45 135 / 60%);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.send svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s;
}

.send:hover {
  filter: brightness(1.05);
  box-shadow: 0 12px 28px -8px rgb(255 45 135 / 70%);
  transform: translateY(-1px);
}

.send:hover svg {
  transform: translateX(3px);
}

.send:active {
  transform: translateY(1px) scale(0.98);
}

.send:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.cf-turnstile:not(:empty) {
  margin-top: 1rem;
}

/* Notice */

.notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: rgb(20 184 166 / 14%);
  color: var(--ink);
  font-weight: 650;
  animation: rise 0.4s ease-out;
}

.notice p {
  margin: 0;
}

.notice-icon {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.3rem;
  border-radius: 50%;
  background: var(--teal);
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.alert {
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: rgb(255 90 54 / 14%);
  color: var(--ink);
  font-weight: 650;
}

/* Location */

.locate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  animation: rise 0.4s ease-out 0.15s both;
}

.locate p {
  margin: 0;
  font-weight: 600;
}

.locate-button {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.locate-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Stats */

.total {
  display: flex;
  flex-direction: column;
  margin: 0 0 1.5rem;
}

.total-number {
  font-size: clamp(4rem, 22vw, 7rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.total-label {
  margin-top: 0.25rem;
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  font-weight: 700;
}

.weeks {
  display: flex;
  gap: 0.75rem;
  margin: 0;
}

.weeks div {
  flex: 1;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.weeks dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.weeks dd {
  margin: 0.1rem 0 0;
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.weeks div:first-child dd {
  color: var(--coral);
}

.report-link {
  width: 100%;
  margin: 0.5rem 0 2.5rem;
  text-decoration: none;
}

.section-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.feed {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.latest {
  margin-top: 2rem;
}

.stats-link {
  margin: 1.5rem 0 0;
  text-align: center;
}

.stats-link a {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  border: 2px solid var(--violet);
  border-radius: 999px;
  color: var(--violet);
  font-weight: 750;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.stats-link a:hover {
  background: var(--violet);
  color: #fff;
}

/* Privacy */

.prose h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
}

.prose h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.prose p,
.prose li {
  max-width: 36rem;
  font-size: 1.05rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose a {
  color: var(--violet);
  font-weight: 600;
}

.updated {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Footer */

.footer {
  padding: 0 1rem max(2rem, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.9rem;
}

.footer a {
  color: var(--muted);
}

/* Admin */

.admin {
  max-width: 48rem;
}

.admin .brand {
  margin-bottom: 1.5rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.tab[aria-current="page"] {
  border-color: transparent;
  background: var(--ink);
  color: var(--bg);
}

.empty {
  color: var(--muted);
}

.reports {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.report h2 {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
}

.report p {
  margin: 0.4rem 0 0;
  font-size: 1.05rem;
}

.report-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.tag {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgb(123 92 255 / 14%);
  color: var(--violet);
  font-weight: 650;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.action {
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.action-published {
  border-color: transparent;
  background: var(--teal);
  color: #fff;
}

.action-rejected {
  border-color: var(--coral);
  color: var(--coral);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 380px) {
  .card-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .counter {
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
