/* Pet Tracker website. Colours and type follow the app's design system (src/constants/theme.ts). */
:root {
  --surface-100: #fff7ef;
  --surface-200: #ffffff;
  --surface-300: #fbe9d7;
  --ink: #2b1d14;
  --ink-muted: #6e5646;
  --border: #ecd5bf;
  --apricot: #f28c38;
  --on-apricot: #2b1d14;
  --apricot-text: #a8480c;
  --apricot-tint: #fde3cc;
  --button-step: #c96a1e;
  --teal: #2a7f8f;
  --danger: #c0362c;
  --focus-ring: #1f6f7d;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-100: #1f1712;
    --surface-200: #2a201a;
    --surface-300: #3a2c23;
    --ink: #fbefe4;
    --ink-muted: #c9b3a2;
    --border: #4a3a2e;
    --apricot: #f59a4f;
    --on-apricot: #2b1d14;
    --apricot-text: #f8ad6c;
    --apricot-tint: #4a2f1c;
    --button-step: #b8682a;
    --teal: #5fb7c4;
    --danger: #ff8a7a;
    --focus-ring: #7fd0dc;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

main,
.site-header,
.site-footer {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 8px;
}

.site-header a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.site-header img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.wordmark {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  font-size: 22px;
}

h1,
h2,
h3 {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 34px;
  margin: 32px 0 12px;
}

h2 {
  font-size: 22px;
  margin: 32px 0 8px;
}

h3 {
  font-size: 18px;
  margin: 20px 0 4px;
}

p,
ul {
  margin: 0 0 12px;
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--apricot-text);
  font-weight: 700;
}

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

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

.lead {
  font-size: 18px;
  color: var(--ink-muted);
}

.card {
  background: var(--surface-200);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin: 24px 0;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--apricot);
  color: var(--on-apricot);
  box-shadow: 0 3px 0 var(--button-step);
  font-weight: 700;
  font-size: 17px;
  text-align: center;
  text-decoration: none;
}

.button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--button-step);
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.features li {
  background: var(--surface-200);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin: 0;
}

.features strong {
  display: block;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--apricot-tint);
  color: var(--apricot-text);
  font-weight: 700;
  font-size: 14px;
}

.site-footer {
  padding-top: 32px;
  padding-bottom: 40px;
  color: var(--ink-muted);
  font-size: 14px;
}

.site-footer a {
  margin-right: 16px;
}

[hidden] {
  display: none !important;
}

/* Pet sitter page ------------------------------------------------------------------ */

:root {
  --on-teal: #ffffff;
  --teal-tint: #d6eef1;
  --danger-tint: #fbdcd8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --on-teal: #102226;
    --teal-tint: #17363b;
    --danger-tint: #4a1f1b;
  }
}

button {
  font: inherit;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.button {
  border: 0;
}

.button.small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 16px;
}

.button.teal {
  background: var(--teal);
  color: var(--on-teal);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--teal) 70%, black);
}

.link-button {
  background: none;
  border: 0;
  padding: 8px 0;
  min-height: 44px;
  color: var(--apricot-text);
  font-weight: 700;
  text-decoration: underline;
}

.link-button:focus-visible,
.tab:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.form {
  display: grid;
  gap: 12px;
}

.form label {
  font-weight: 700;
}

.form input {
  font: inherit;
  font-size: 18px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--ink-muted);
  background: var(--surface-100);
  color: var(--ink);
}

.field-error {
  color: var(--danger);
  font-weight: 700;
}

.pre {
  white-space: pre-line;
}

.small {
  font-size: 14px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0 8px;
}

.tab {
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-200);
  color: var(--ink-muted);
  font-weight: 700;
}

.tab[aria-selected='true'] {
  background: var(--apricot-tint);
  color: var(--apricot-text);
  border-color: transparent;
}

.pet h2 {
  margin-top: 0;
}

.plan {
  list-style: none;
  padding: 0;
  margin: 0;
}

.item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

.item:first-child {
  border-top: 0;
}

.item .time {
  font-weight: 700;
  color: var(--ink-muted);
}

.item .what {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.item.is-done .what strong {
  color: var(--ink-muted);
}

.badge.done {
  background: var(--teal-tint);
  color: var(--teal);
  justify-self: start;
  margin-top: 4px;
}

.badge.missed {
  background: var(--danger-tint);
  color: var(--danger);
  justify-self: start;
  margin-top: 4px;
}
