/* IATA Pet Crate Size Calculator — aviation indigo theme */

:root {
  --bg: #1a1830;
  --bg-card: #242042;
  --bg-elevated: #2e2a52;
  --text: #eef0f8;
  --text-muted: #9a9ab8;
  --accent: #8b7cf0;
  --accent-soft: rgba(139, 124, 240, 0.18);
  --accent-hover: #a498f5;
  --success: #7dd3c0;
  --success-soft: rgba(125, 211, 192, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --highlight: rgba(139, 124, 240, 0.22);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 124, 240, 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(125, 211, 192, 0.06), transparent);
}

.site-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(26, 24, 48, 0.88);
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lang-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
  outline: none;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.tagline {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.disclaimer {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.calc-btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #12101f;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.25rem;
}

.calc-btn:hover,
.calc-btn:focus-visible {
  background: var(--accent-hover);
  outline: none;
}

.calc-btn:active {
  transform: scale(0.98);
}

.result {
  margin-top: 1.35rem;
  padding: 1.15rem 1rem;
  background: var(--success-soft);
  border: 1px solid rgba(125, 211, 192, 0.35);
  border-radius: 12px;
  text-align: center;
}

.result[hidden] {
  display: none;
}

.result-label {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dims {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dim {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.dim-key {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dim-val {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--success);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.result-summary {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.result-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.result-inches {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.formula h2,
.howto h2,
.tips h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.formula-list,
.tips ul {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.formula-list li,
.tips li {
  margin-bottom: 0.45rem;
}

.formula-list li:last-child,
.tips li:last-child {
  margin-bottom: 0;
}

.formula-list strong {
  color: var(--text);
}

.chart-note {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.howto ol {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.howto li {
  margin-bottom: 0.45rem;
}

.howto li:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

.ad-slot {
  display: none;
}

@media (min-width: 480px) {
  .logo {
    font-size: 1.25rem;
  }

  .card {
    padding: 1.5rem 1.5rem;
  }

  .dim-val {
    font-size: 1.9rem;
  }
}

@media (max-width: 360px) {
  .dims {
    grid-template-columns: 1fr;
  }
}
