/* Kopaiba — local only. System fonts. No remote assets. */
:root {
  --ivory: #faf6ec;
  --ivory-deep: #f3ead4;
  --panel: #fffaf0;
  --paper: #fffdf8;
  --gold: #c9922a;
  --gold-hot: #d4a84a;
  --gold-deep: #9a6f14;
  --leaf: #3d6b32;
  --leaf-hot: #4e8540;
  --ink: #2c2116;
  --muted: #6b5840;
  --line: rgba(61, 107, 50, 0.22);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1rem, 0.6rem + 2vw, 2rem);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--ivory);
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--ivory);
}

main {
  flex: 1 1 auto;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--leaf);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--leaf-hot);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 20;
  padding: 0.5rem 0.8rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  border-radius: 0.4rem;
}

.skip:focus {
  top: 0.75rem;
}

.site-header {
  display: flex;
  align-items: center;
  padding: 0.7rem var(--pad);
  background: var(--ivory-deep);
}

.mark {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

.mark img {
  width: 2.35rem;
  height: 2.35rem;
}

.hero {
  width: 100%;
  background: var(--ivory-deep);
}

.hero img {
  width: 100%;
  height: auto;
  margin: 0;
  filter: none;
}

.message {
  width: min(100% - 2 * var(--pad), 28rem);
  margin: 2rem auto 2.5rem;
}

form {
  display: grid;
  gap: 0.75rem;
}

.field {
  display: grid;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

button[type="submit"] {
  justify-self: start;
  padding: 0.7rem 1.2rem;
  color: var(--ivory);
  background: var(--leaf);
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: var(--leaf-hot);
}

.site-footer {
  margin-top: auto;
  padding: 0.9rem var(--pad) 1.2rem;
  border-top: 1px solid var(--line);
  background: var(--ivory-deep);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--leaf-hot);
  text-decoration: underline;
}

/* Inner pages: /ask/ */
.wrap {
  width: min(100% - 2 * var(--pad), 70rem);
  margin-inline: auto;
}

.inner {
  width: min(100% - 2 * var(--pad), 40rem);
  margin: 2.2rem auto 3rem;
}

.inner h1,
.inner h2 {
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.inner h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
}

.inner h2 {
  margin: 1.6rem 0 0.6rem;
  font-size: 1.2rem;
}

.inner p,
.inner li {
  color: var(--muted);
}

.about-list {
  margin: 0.8rem 0 0;
  padding-left: 1.15rem;
}

.ask-shell {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 2.5rem var(--pad);
  text-align: center;
}

.ask-card {
  width: min(100%, 28rem);
  padding: 2rem 1.4rem;
  border-radius: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
}

.ask-card h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
  letter-spacing: -0.03em;
}

.ask-card p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.ask-card a#open {
  display: inline-block;
  padding: 0.7rem 1.05rem;
  color: var(--ivory);
  background: var(--leaf);
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
}

.ask-card a#open:hover {
  background: var(--leaf-hot);
  color: var(--ivory);
}

/* Form states + thank-you panel */
[hidden] {
  display: none !important;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form-status {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.88rem;
  color: var(--gold-deep);
}

.form-status:empty {
  min-height: 0;
}

.thanks {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2.2rem 1.4rem;
  text-align: center;
  background: var(--panel);
  border: 1px solid rgba(201, 146, 42, 0.35);
  border-radius: 1.1rem;
  box-shadow: 0 0 0 1px rgba(201, 146, 42, 0.08), 0 0 2.5rem rgba(212, 168, 74, 0.28);
  animation: thanks-in 0.45s ease-out both;
}

.thanks:focus {
  outline: none;
}

.thanks:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.thanks-ring {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 74, 0.28), rgba(250, 246, 236, 0) 70%);
  border: 1px solid var(--gold);
  box-shadow: 0 0 1.4rem rgba(212, 168, 74, 0.45), inset 0 0 1rem rgba(212, 168, 74, 0.25);
  animation: ring-pulse 2.6s ease-in-out infinite;
}

.thanks-ring img {
  width: 3.5rem;
  height: 3.5rem;
}

.thanks-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.again {
  padding: 0.5rem 1rem;
  color: var(--leaf);
  background: transparent;
  border: 1px solid var(--leaf);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

.again:hover {
  color: var(--ivory);
  background: var(--leaf-hot);
  border-color: var(--leaf-hot);
}

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 1.2rem rgba(201, 146, 42, 0.35), inset 0 0 1rem rgba(212, 168, 74, 0.2); }
  50% { box-shadow: 0 0 2.2rem rgba(212, 168, 74, 0.6), inset 0 0 1.2rem rgba(212, 168, 74, 0.35); }
}

@keyframes thanks-in {
  from { opacity: 0; transform: translateY(0.5rem) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html,
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
