/*
 * Steward web — self-contained styles for the public homepage and the staff
 * dashboard. Deliberately independent of the Jumpstart Tailwind build so these
 * pages render correctly without a compile step.
 *
 * Design system (from the Steward proposal): warm cream, deep forest, editorial
 * serif headings, rounded corners, soft shadows, generous whitespace. Avoids
 * clutter and corporate styling.
 */

:root {
  --forest: #16351F;
  --forest-dark: #0E2817;
  --forest-soft: #1F4429;
  --cream: #F6F1E8;
  --warm-white: #FCFAF5;
  --sage: #829078;
  --tan: #CBBCA5;
  --clay: #B96F58;
  --charcoal: #262722;
  --muted: #72736C;
  --border: #DDD5C8;
}

* { box-sizing: border-box; }

body.steward-web {
  margin: 0;
  background-color: var(--warm-white);
  color: var(--charcoal);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

.steward-serif { font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; }

a { color: var(--forest); text-decoration: none; }

/* --- Top bar --------------------------------------------------------------- */

.web-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  max-width: 1120px;
  margin: 0 auto;
}
.web-brand { display: flex; align-items: baseline; gap: 0.55rem; }
.web-brand-mark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--forest);
}
.web-brand-mark .dot { color: var(--tan); }
.web-brand-word {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.web-nav { display: flex; align-items: center; gap: 0.5rem; }
.web-nav form { margin: 0; }

/* --- Buttons --------------------------------------------------------------- */

.btn-forest, .btn-ghost, .btn-cream {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.6rem 1.1rem;
  border-radius: 0.6rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.btn-forest { background-color: var(--forest); color: var(--cream); }
.btn-forest:hover { background-color: var(--forest-soft); color: var(--cream); }
.btn-ghost { background-color: transparent; color: var(--forest); border-color: var(--border); }
.btn-ghost:hover { background-color: var(--cream); }
.btn-cream { background-color: var(--cream); color: var(--forest); }
.btn-cream:hover { background-color: #fff; }

/* --- Layout shell ---------------------------------------------------------- */

.web-main { max-width: 1120px; margin: 0 auto; padding: 1rem 2rem 4rem; }

/* --- Dashboard ------------------------------------------------------------- */

.dash-hero {
  background-color: var(--forest);
  color: var(--cream);
  border-radius: 1.25rem;
  padding: 2.75rem 3rem;
  margin-bottom: 2rem;
}
.dash-hero .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 0.75rem;
}
.dash-hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 2.9rem;
  line-height: 1.05;
  margin: 0 0 0.6rem;
}
.dash-hero p { color: rgba(246, 241, 232, 0.75); margin: 0; max-width: 42ch; }

.dash-app-note {
  background-color: var(--cream);
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: center;
}
.dash-app-note p { margin: 0.25rem 0; }
.dash-app-note .muted { color: var(--muted); font-size: 0.9rem; }

/* --- Public landing -------------------------------------------------------- */

.landing {
  min-height: 100dvh;
  background-color: var(--forest);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 1.5rem;
  text-align: center;
}
.landing-logo { width: min(320px, 70vw); height: auto; }
.landing-logo.is-small { width: min(150px, 40vw); }
.landing-soon {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--tan);
}
.landing-email {
  color: var(--cream);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
}
.landing-email:hover { color: var(--tan); }

/* Owner line under every web page (application/_copyright) */
.site-copyright { margin: 0; padding: 1.25rem 1rem 1.5rem; text-align: center; font-size: 0.75rem; color: var(--muted); }
.is-landing { background-color: var(--forest); }
.is-landing .landing { min-height: calc(100dvh - 3.5rem); }
.is-landing .site-copyright { color: var(--cream); opacity: 0.7; }

/* Sign-in form on the homepage (devise/sessions/new) */
.landing-form {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.75rem;
  background: var(--warm-white);
  color: var(--charcoal);
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  text-align: left;
}
.landing-title {
  margin: 0 0 0.25rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--forest);
  text-align: center;
}
.landing-field { display: flex; flex-direction: column; gap: 0.35rem; }
.landing-field label { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.landing-field input {
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: #fff;
  color: var(--charcoal);
}
.landing-field input:focus { outline: 2px solid var(--sage); outline-offset: 1px; border-color: var(--sage); }
.landing-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--muted); }
.landing-submit {
  font: inherit;
  font-weight: 600;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 0.6rem;
  background: var(--forest);
  color: var(--cream);
  cursor: pointer;
}
.landing-submit:hover { background: var(--forest-soft); }
.landing-button { display: block; text-align: center; text-decoration: none; }
.landing-link { font-size: 0.85rem; text-align: center; color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.landing-alert, .landing-notice { margin: 0; padding: 0.65rem 0.8rem; border-radius: 0.6rem; font-size: 0.875rem; }
.landing-alert { background: #F7E4DE; color: #8A3F2B; }
.landing-alert p { margin: 0; }
.landing-alert p + p { margin-top: 0.25rem; }
.landing-field .form-hint.error { margin: 0.35rem 0 0; font-size: 0.8rem; color: #8A3F2B; }
.landing-field input.error { border-color: var(--clay); }
.landing-notice { background: #E6ECE1; color: var(--forest); }
.web-flash { max-width: 1120px; margin: 0 auto; padding: 0 2rem 1rem; display: grid; gap: 0.5rem; }
.landing-form .landing-hint { margin: 0; font-size: 0.85rem; color: var(--muted); text-align: center; }
.landing-invite { max-width: 360px; margin: 0; font-size: 0.85rem; color: var(--tan); }

@media (max-width: 640px) {
  .dash-hero { padding: 2rem 1.5rem; }
  .dash-hero h1 { font-size: 2.2rem; }
  .web-main, .web-topbar, .web-flash { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* --- Legal pages (/privacy, /terms, /account/delete) ----------------------- */

.legal { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.legal-brand { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.6rem; font-weight: 600; margin: 0 0 1.5rem; }
.legal h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.4rem; font-weight: 600; color: var(--forest); margin: 0 0 0.25rem; line-height: 1.15; }
.legal h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.5rem; font-weight: 600; color: var(--forest); margin: 2.25rem 0 0.5rem; }
.legal h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 0.25rem; }
.legal p, .legal li { font-size: 1rem; }
.legal ul, .legal ol { padding-left: 1.25rem; }
.legal li { margin: 0.25rem 0; }
.legal a { text-decoration: underline; }
.legal-updated { color: var(--muted); margin: 0 0 1.5rem; }
.legal-draft {
  background-color: #FBEDE7;
  border: 1px solid var(--clay);
  border-radius: 12px;
  color: #6E3524;
  font-weight: 600;
  padding: 0.85rem 1rem;
  margin: 0 0 1.5rem;
}
.legal-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.95rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.legal-table th { color: var(--muted); font-weight: 600; }
.legal-placeholder { background-color: var(--cream); padding: 0 0.25rem; border-radius: 4px; }
.legal-links { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }
@media (max-width: 640px) {
  .legal h1 { font-size: 2rem; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td, .legal-table th { display: block; width: 100%; }
  .legal-table thead { display: none; }
  .legal-table td:first-child { font-weight: 600; border-bottom: 0; padding-bottom: 0; }
}
