/*
 * Email styles. Loaded via `stylesheet_link_tag "mailer"` in
 * `app/views/layouts/mailer.html.slim` and inlined onto every matching
 * element by `premailer-rails` at delivery time.
 *
 * Authoring rules:
 *   - Use literal hex / px values, not `var(--…)` — premailer cannot resolve
 *     custom properties at inline time, so token references would survive
 *     into the email and break in clients without custom-property support
 *     (Outlook desktop, older Gmail). Keep the palette below in sync with
 *     the `--home-*` and `--op-color-primary-*` tokens declared in
 *     `core/theme/remember-theme-core.css`.
 *   - Keep selectors flat (single class, or `.block a`). Email clients drop
 *     deep nesting, pseudo-classes, and most modern CSS.
 *
 * Palette (mirrors core/theme/remember-theme-core.css):
 *   --home-paper           #f3ead9
 *   --home-paper-soft      #f7efe0
 *   --home-paper-line      #e1d4b6
 *   --home-ink             #2b2a26
 *   --home-ink-soft        #5a544a
 *   --home-ink-faint       #8a8274
 *   --home-accent-clay     #a86f52
 *   --op-color-primary-minus-four  #26544c   (HSL 169 37% 24%)
 *   --home-shadow-soft     0 30px 60px -30px rgba(54,45,30,.22),
 *                          0 12px 28px -12px rgba(54,45,30,.14)
 */

/* -- Page shell ----------------------------------------------------------- */

body.email-body {
  margin: 0;
  padding: 0;
  background-color: #f3ead9;
  color: #2b2a26;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

table.email-shell {
  width: 100%;
  background-color: #f3ead9;
}

.email-shell-cell {
  padding: 32px 16px;
}

table.email-frame {
  width: 100%;
  max-width: 600px;
}

/* -- Header logo ---------------------------------------------------------- */

.email-logo-cell {
  padding: 8px 0 28px;
}

.email-logo {
  display: block;
  width: 150px;
  max-width: 150px;
  height: auto;
  border: 0;
}

/* -- Content card --------------------------------------------------------- */

.email-card {
  background-color: #f7efe0;
  border: 1px solid #e1d4b6;
  border-radius: 12px;
  padding: 40px 44px;
  box-shadow: 0 30px 60px -30px rgba(54, 45, 30, 0.22), 0 12px 28px -12px rgba(54, 45, 30, 0.14);
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: #5a544a;
  font-size: 16px;
  line-height: 1.6;
}

/* -- Typography ----------------------------------------------------------- */

.email-eyebrow {
  margin: 0 0 8px;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8a8274;
}

.email-heading {
  margin: 0 0 24px;
  font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #2b2a26;
}

.email-heading__accent {
  font-style: italic;
  color: #a86f52;
}

.email-text {
  margin: 0 0 18px;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #5a544a;
}

.email-text--small {
  font-size: 14px;
  color: #8a8274;
}

.email-text-link {
  color: #a86f52;
  word-break: break-all;
}

.email-aside {
  margin: 24px 0 0;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: #8a8274;
}

/* -- Primary button ------------------------------------------------------- */
/*
 * Mirrors `.home-hero__cta` from layouts/home-page.css. The `<td>` exists
 * only as a Bulletproof wrapper for Outlook; all visible styling lives on
 * the `<a>` so background, border, radius, and shadow render together.
 */

.email-button {
  margin: 28px 0 8px;
}

.email-button-cell {
  border-radius: 8px;
  background-color: #26544c;
}

.email-button a {
  display: inline-block;
  padding: 14px 28px;
  background-color: #26544c;
  border: 1px solid #2b2a26;
  border-radius: 8px;
  box-shadow: 0 30px 60px -30px rgba(54, 45, 30, 0.22), 0 12px 28px -12px rgba(54, 45, 30, 0.14);
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #f7efe0;
  text-decoration: none;
}

/* -- Footer card ---------------------------------------------------------- */

.email-footer-wrap {
  padding: 32px 0 0;
}

table.email-footer {
  width: 100%;
  background-color: #f7efe0;
  border: 1px solid #e1d4b6;
  border-radius: 12px;
}

.email-footer__top {
  padding: 28px 32px 18px;
  border-bottom: 1px solid #e1d4b6;
}

.email-footer__logo {
  display: block;
  width: 140px;
  max-width: 140px;
  height: auto;
  border: 0;
}

.email-footer__tag {
  margin: 10px 0 0;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-style: italic;
  font-size: 14px;
  color: #8a8274;
}

.email-footer__nav {
  padding: 18px 24px;
}

.email-footer__link {
  color: #5a544a;
  text-decoration: none;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 13px;
}

.email-footer__sep {
  color: #b8ac8e;
  font-size: 12px;
  padding: 0 8px;
}

.email-footer__bottom {
  padding: 8px 24px 24px;
}

.email-footer__copyright {
  display: inline-block;
  margin: 0;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-style: italic;
  font-size: 12px;
  color: #8a8274;
  vertical-align: middle;
}

.email-footer__cat5 {
  display: inline-block;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-style: italic;
  font-size: 12px;
  color: #8a8274;
  text-decoration: none;
  vertical-align: middle;
}

.email-footer__cat5-mark {
  display: inline-block;
  width: 90px;
  max-width: 90px;
  height: auto;
  border: 0;
  margin-left: 8px;
  vertical-align: middle;
}

/* -- Disclaimer ----------------------------------------------------------- */

.email-disclaimer {
  padding: 18px 8px 0;
  font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: #8a8274;
}
