/* SunSwallow — shared styles */

:root {
  --bg: #FBF6EE;
  --ink: #2C2118;
  --muted: #6E5D4B;
  --accent: #A4560F;
  --accent-fill: #AD5B10;
  --btn-ink: #FFF8EF;
  --rule: #E8DCC9;
  --field: #FFFFFF;
  --field-border: #8C7A61;
  --notice-bg: #F6ECDC;
  --error-ink: #9A2C15;
  --error-bg: #F8E6E0;
  --error-rule: #E4BCB0;
  --serif: "New York", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #201812;
    --ink: #F2E8DA;
    --muted: #B5A28C;
    --accent: #F0A03C;
    --accent-fill: #F0A03C;
    --btn-ink: #201812;
    --rule: #3A2E22;
    --field: #2A211A;
    --field-border: #8B7B6A;
    --notice-bg: #2A211A;
    --error-ink: #F0A99A;
    --error-bg: #3A231C;
    --error-rule: #5C382C;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem;
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
/* Links shaped as their own component (masthead, app cards, store button)
   are identifiable without an underline. Everything else keeps one. */
.masthead, .app, .store { text-decoration: none; }

footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
footer a { color: var(--muted); }
footer .sep { margin: 0 0.5rem; opacity: 0.6; }

/* --- Home --- */

.home { text-align: center; }
.home main { max-width: 34rem; width: 100%; margin: auto 0; }
.logo { width: 108px; height: 108px; }
h1 {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-top: 1.25rem;
}
.tagline {
  font-size: 1.15rem;
  color: var(--accent);
  margin-top: 0.35rem;
  font-style: italic;
  font-family: var(--serif);
}
.about {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 1.02rem;
}
.about + .about { margin-top: 1rem; }

/* --- Support form --- */

.support {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
  text-align: left;
}
.support h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  text-align: center;
}
.support-intro {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
}
form { margin-top: 1.75rem; }
.field { margin-bottom: 1.1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 30rem) { .row { grid-template-columns: 1fr; gap: 0; } }
label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 1.15rem, calc(100% - 0.8rem) 1.15rem;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}
textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.fineprint { font-size: 0.85rem; color: var(--muted); }
button {
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--btn-ink);
  background: var(--accent-fill);
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.06s ease;
}
button:hover { opacity: 0.9; }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button[disabled] { opacity: 0.6; cursor: default; }
.notice {
  background: var(--notice-bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}
.notice h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}
.notice p { color: var(--muted); margin-top: 0.4rem; }
.notice .check {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.error {
  background: var(--error-bg);
  border: 1px solid var(--error-rule);
  color: var(--error-ink);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.94rem;
  margin-bottom: 1.25rem;
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.direct {
  margin-top: 1.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

/* --- Document pages (privacy, terms) --- */

.doc main { max-width: 40rem; width: 100%; }
.doc .masthead {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}
.doc .masthead:hover { text-decoration: none; color: var(--accent); }
.doc .masthead img { width: 30px; height: 30px; }
.doc h1 {
  font-size: 2.1rem;
  margin-top: 2rem;
}
.doc .updated {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
}
.doc .app-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}
.doc .app-header img {
  display: block;
  flex: none;
  width: 112px;
  height: 112px;
  border-radius: 22%;
  box-shadow: 0 2px 10px rgba(44, 33, 24, 0.18);
}
.doc .app-header h1 { margin-top: 0; }
@media (max-width: 30rem) {
  .doc .app-header { gap: 1rem; }
  .doc .app-header img { width: 84px; height: 84px; }
}
.doc .lede {
  margin-top: 1.75rem;
  padding: 1.25rem 1.4rem;
  background: var(--notice-bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  font-size: 1.02rem;
}
.doc h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.doc p { margin-top: 0.9rem; color: var(--muted); }
.doc h2 + p { margin-top: 0.75rem; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul {
  margin-top: 0.9rem;
  padding-left: 1.15rem;
  color: var(--muted);
}
.doc li { margin-top: 0.4rem; }
.doc li::marker { color: var(--accent); }
.doc .signoff {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
}

/* Product pages: the App Store call to action, styled like the form button. */
.doc .store-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.doc .store {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--btn-ink);
  background: var(--accent-fill);
  border-radius: 10px;
  padding: 0.7rem 1.6rem;
  text-decoration: none;
}
a.store:hover { opacity: 0.9; }
/* Not yet on the App Store: a chip, not a button — nothing to click or focus. */
.doc .store-pending {
  background: var(--notice-bg);
  color: var(--ink);
  border: 1px solid var(--field-border);
}
.doc .store-note {
  color: var(--muted);
  font-size: 0.92rem;
}

/* --- Our Apps --- */

.apps {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
  text-align: left;
}
.apps h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  text-align: center;
}
.app {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 1.1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.15s ease;
}
.app:hover {
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(44, 33, 24, 0.10);
  transform: translateY(-1px);
}
.app img {
  display: block;
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 22%;
  box-shadow: 0 2px 10px rgba(44, 33, 24, 0.18);
}
.app-text { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 auto; min-width: 0; }
.app-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.app-blurb { color: var(--muted); font-size: 0.98rem; }
.app-more { color: var(--accent); font-weight: 600; font-size: 0.95rem; margin-top: 0.15rem; }
