/* Fettlewright holding page. Colour values are provisional until _references/design-tokens.md sets them. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F4EFE6;     /* warm off-white */
  --ink: #1F1D1A;       /* deep charcoal, 14.7:1 on paper */
  --ink-soft: #5C574F;  /* secondary text, 6.3:1 on paper */
  --brass: #A8873A;     /* decorative rule only */
  --brass-text: #7D5F1E;/* links and primary action, 5.2:1 on paper */
  --error: #9B2C1F;     /* field errors, paired with text, never colour alone */
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 64px 24px;
}

.mark {
  margin: 0;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.5rem, 8vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.mark a { color: inherit; text-decoration: none; }

.rule {
  width: 64px;
  height: 0;
  margin: 24px 0;
  border: 0;
  border-top: 2px solid var(--brass);
}

.tagline {
  margin: 0 0 16px;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  line-height: 1.3;
}

.note {
  margin: 0;
  max-width: 32rem;
  color: var(--ink-soft);
}

a {
  color: var(--brass-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover { text-decoration-thickness: 2px; }

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

@media (max-width: 40rem) {
  .frame { padding: 48px 16px; }
}

.legal {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 24px 24px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

@media (max-width: 40rem) { .legal { padding: 0 16px 16px; } }

/* Text pages (privacy) */
.frame-text { justify-content: flex-start; padding-top: 48px; }
.mark-small { font-size: 2rem; }
.prose { margin-top: 32px; }
.prose h2 {
  margin: 32px 0 8px;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
}
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 24px; }
.prose li { margin: 0 0 8px; }
.prose strong { font-weight: 600; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.875em; }

/* Primary action */
.actions { margin: 32px 0 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--brass-text);
  border-radius: 0;
  background: var(--brass-text);
  color: var(--paper);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}

.button:hover { background: var(--ink); border-color: var(--ink); text-decoration: none; }
.button:disabled { opacity: 0.6; cursor: progress; }

.text-button {
  min-height: 44px;
  padding: 0 8px;
  margin-right: -8px;
  border: 0;
  background: none;
  color: var(--brass-text);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

.button:focus-visible, .text-button:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Contact dialog */
.sheet {
  width: min(32rem, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}

.sheet::backdrop { background: rgba(31, 29, 26, 0.55); }

.sheet[open] { animation: sheet-in 200ms ease-out; }
.sheet[open]::backdrop { animation: fade-in 200ms ease-out; }
.sheet.closing { animation: sheet-out 140ms ease-in forwards; }
.sheet.closing::backdrop { animation: fade-out 140ms ease-in forwards; }

@keyframes sheet-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes sheet-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--ink);
}

.sheet-title {
  margin: 0;
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
}

.form, .done { padding: 24px; }

.field { margin: 0 0 16px; }

.field label {
  display: block;
  margin: 0 0 4px;
  font-weight: 500;
}

input, textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--ink-soft);
  border-radius: 0;
  background: #FFFDF8;
  color: var(--ink);
  font: inherit;
}

textarea { resize: vertical; min-height: 128px; }

input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

.field-error, .form-error {
  margin: 4px 0 0;
  color: var(--error);
  font-size: 0.875rem;
}

.form-error { margin: 0 0 16px; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.check { margin: 0 0 16px; min-height: 0; }

.privacy {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.done:focus { outline: none; }
.done .note { margin: 0; }

@media (max-width: 40rem) {
  .sheet-head { padding: 8px 16px; }
  .form, .done { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet[open], .sheet[open]::backdrop, .sheet.closing, .sheet.closing::backdrop { animation: none; }
  .button { transition: none; }
}
