/* Minimal stylesheet shared by every page on tendapp.org. No build step,
 * no framework — Cloudflare Pages serves these files as-is. Designed to
 * read well on mobile (App Store reviewers and most actual visitors will
 * be on phones), with a comfortable reading width on desktop. */

:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --text: #1a1a1a;
  --text-secondary: rgba(26, 26, 26, 0.65);
  --text-tertiary: rgba(26, 26, 26, 0.45);
  --primary: #e91e63;
  --border: #eeeeee;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f11;
    --surface: #17171a;
    --text: #f2f2f4;
    --text-secondary: rgba(242, 242, 244, 0.7);
    --text-tertiary: rgba(242, 242, 244, 0.5);
    --primary: #f06292;
    --border: #2a2a2f;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header {
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}

header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header .brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

header nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

header nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

header nav a:hover {
  color: var(--primary);
}

h1 {
  font-size: 32px;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

h3 {
  font-size: 18px;
  margin: 24px 0 4px;
  font-weight: 600;
}

p {
  margin: 12px 0;
}

ul {
  padding-left: 24px;
  margin: 12px 0;
}

li {
  margin: 6px 0;
}

a {
  color: var(--primary);
}

.effective {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: 0;
}

.lead {
  font-size: 19px;
  color: var(--text-secondary);
  margin: 16px 0 32px;
}

.cta {
  display: inline-block;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 16px;
}

.cta:hover {
  filter: brightness(1.05);
}

footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 24px 20px;
  font-size: 14px;
  color: var(--text-tertiary);
  text-align: center;
}

footer a {
  color: var(--text-tertiary);
  margin: 0 8px;
}

code {
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ── Contact form ────────────────────────────────────────────────── */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 32px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.field-label em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-tertiary);
}

.contact-form input[type='email'],
.contact-form input[type='text'],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: transparent;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23999' d='M4 6l4 4 4-4z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

.contact-form button[type='submit'] {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#form-status {
  font-size: 14px;
  margin: 4px 0 0;
  min-height: 1.4em;
}

#form-status.success {
  color: #2e7d32;
}

#form-status.error {
  color: #c62828;
}

@media (prefers-color-scheme: dark) {
  #form-status.success {
    color: #81c784;
  }
  #form-status.error {
    color: #ef9a9a;
  }
}

.noscript-warning {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
}
