/* Earl Money theme. Tokens are in theme.json; this file holds layout and components it can't express.
   Everything is prefixed em- to avoid clashes with plugins. */

:root {
	--em-page: #f6f2ea; --em-card: #fffdf8; --em-sunken: #ece6da; --em-ink: #1c2521; --em-muted: #58635d;
	--em-line: #ded6c8; --em-strong: #78817b; --em-gum: #1f4a40; --em-gum-press: #173a32; --em-gum-soft: #e1ebe5;
	--em-wattle: #e3a33a; --em-night: #111816; --em-night-card: #18221f; --em-night-muted: #a3ada7; --em-sage: #8cc7ae;
	--em-shadow: 0 1px 2px rgba(28,37,33,.06), 0 6px 20px rgba(28,37,33,.06);
}

/* Base styles live here as well as in theme.json: some hosts or WordPress versions don't print the
   global styles generated from theme.json, and the site must look right either way. */
html, body { background: var(--em-page); }
body {
	margin: 0; color: var(--em-ink);
	font-family: 'Instrument Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: 17px; line-height: 1.6;
	font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: var(--em-gum); }
a:hover { color: var(--em-gum-press); }
input, button, select, textarea { font-family: inherit; }
img { max-width: 100%; height: auto; }
/* Ordinary pages (page.html) when global layout styles are missing */
.wp-block-post-title, .wp-block-post-content > * { max-width: 820px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }
.wp-block-post-title { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
h1, h2, h3, .em-serif { font-family: Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 100, 'WONK' 0; font-weight: 600; margin: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--em-gum); outline-offset: 2px; }

.em-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.em-narrow { max-width: 820px; }
.em-h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1.02; letter-spacing: -.02em; }
.em-h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -.015em; }
.em-lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: var(--em-muted); margin: 0; }
.em-small { font-size: 14px; color: var(--em-muted); margin: 0; }
.em-stack { display: flex; flex-direction: column; gap: 20px; }
.em-center { text-align: center; align-items: center; }
.em-section { padding: 120px 0; }
.em-section--tight { padding: 72px 0; }
.em-band { background: var(--em-card); border-top: 1px solid var(--em-line); border-bottom: 1px solid var(--em-line); }
.em-dark { background: var(--em-night); color: #eee9df; }
.em-dark .em-lead { color: var(--em-night-muted); }
.em-gum { background: var(--em-gum); color: var(--em-card); }
.em-gum .em-lead { color: var(--em-gum-soft); }

.em-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.em-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.em-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* Header and footer */
.em-header { position: sticky; top: 0; z-index: 20; background: rgba(246,242,234,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--em-line); }
.em-nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.em-logo { display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--em-ink); }
.em-logo img { display: block; height: 36px; width: auto; } /* lockup min width 96px per the brand guide */
.em-voice { font-size: clamp(40px, 6vw, 72px); line-height: 1.04; letter-spacing: -.02em; }
.em-navlinks { display: flex; gap: 28px; }
.em-navlinks a { color: var(--em-ink); text-decoration: none; font-size: 15px; }
.em-navlinks a[aria-current="page"] { color: var(--em-gum); font-weight: 600; }
.em-footer { padding: 40px 24px 48px; display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; font-size: 14px; color: var(--em-muted); }
.em-footer nav { display: flex; gap: 24px; }

/* Buttons */
.em-btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px; border-radius: 14px; border: 0; background: var(--em-gum); color: var(--em-card); font: 600 17px 'Instrument Sans', sans-serif; text-decoration: none; cursor: pointer; }
.em-btn:hover { background: var(--em-gum-press); color: var(--em-card); }
.em-btn--pill { height: 40px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.em-btn--wattle { background: var(--em-wattle); color: var(--em-ink); }
.em-btn--wattle:hover { background: #d4952e; color: var(--em-ink); }
.em-btn--sage { background: var(--em-sage); color: #0f1a16; }

/* Cards, chat, chips */
.em-card { background: var(--em-card); border-radius: 20px; padding: 24px; box-shadow: var(--em-shadow); }
.em-tile { background: var(--em-page); border-radius: 20px; padding: 24px; }
.em-band .em-tile { background: var(--em-page); }
.em-tile h3 { font-size: 22px; }
.em-tile p { margin: 8px 0 0; font-size: 16px; line-height: 24px; color: var(--em-muted); }
.em-chat { display: flex; flex-direction: column; gap: 12px; }
.em-bubble { align-self: flex-start; max-width: 88%; background: var(--em-gum-soft); border-radius: 20px 20px 20px 4px; padding: 12px 16px; font-size: 17px; line-height: 25px; }
.em-bubble--me { align-self: flex-end; max-width: 80%; background: var(--em-gum); color: var(--em-card); border-radius: 20px 20px 4px 20px; }
.em-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--em-gum-soft); }
.em-chip--wattle { background: var(--em-wattle); color: var(--em-ink); }
.em-step { font-size: 15px; font-weight: 600; color: var(--em-gum); letter-spacing: .04em; text-transform: uppercase; }

/* Phone mockup */
.em-phone { width: 320px; height: 640px; box-sizing: border-box; border-radius: 48px; border: 10px solid var(--em-ink); background: var(--em-page); padding: 56px 14px 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; box-shadow: 0 30px 60px rgba(28,37,33,.18); margin: 0 auto; }
.em-phone .em-bubble { font-size: 14px; line-height: 20px; padding: 9px 12px; border-radius: 18px 18px 18px 4px; }
.em-phone .em-bubble--me { border-radius: 18px 18px 4px 18px; }
.em-phone__input { height: 40px; margin-top: 6px; border-radius: 20px; border: 1px solid var(--em-strong); background: var(--em-card); color: var(--em-muted); font-size: 14px; line-height: 40px; padding: 0 14px; }

/* Meter and money */
.em-meter { height: 8px; border-radius: 4px; background: #0c110f; overflow: hidden; }
.em-meter > span { display: block; height: 8px; border-radius: 4px; background: var(--em-sage); }
.em-price { margin: 0; font-size: clamp(56px, 8vw, 96px); line-height: 1; font-weight: 600; letter-spacing: -.03em; }
.em-price small { font-size: 24px; font-weight: 400; color: var(--em-muted); }
.em-plan { display: flex; flex-direction: column; gap: 12px; }
.em-plan .em-price { font-size: 56px; }
.em-plan--best { border: 2px solid var(--em-gum); box-shadow: none; }
.em-ticks { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.em-ticks li { display: flex; gap: 12px; font-size: 17px; line-height: 26px; }
.em-ticks li::before { content: "✓"; color: var(--em-gum); font-weight: 700; }

/* FAQ */
.em-faq { border-bottom: 1px solid var(--em-line); padding: 18px 0; }
.em-faq summary { font-size: 18px; font-weight: 600; cursor: pointer; line-height: 26px; }
.em-faq p { margin: 10px 0 0; font-size: 17px; line-height: 26px; color: var(--em-muted); }
.em-faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.em-toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.em-toc a { text-decoration: none; }
.em-faq-group { margin-bottom: 48px; scroll-margin-top: 88px; }
.em-faq-group h2 { font-size: 28px; margin-bottom: 8px; }

/* Waitlist form */
.em-form { display: flex; gap: 8px; flex-wrap: wrap; max-width: 480px; }
.em-center .em-form { justify-content: center; margin: 0 auto; }
.em-form input[type="email"] { flex: 1 1 220px; height: 52px; box-sizing: border-box; border-radius: 14px; border: 1px solid var(--em-strong); background: var(--em-card); padding: 0 16px; font: 400 17px 'Instrument Sans', sans-serif; color: var(--em-ink); }
.em-gum .em-form input[type="email"] { border-color: transparent; }
.em-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.em-form__msg { flex-basis: 100%; margin: 4px 0 0; font-size: 15px; min-height: 22px; }
.em-form__msg[data-state="error"] { color: #9a3324; }
.em-gum .em-form__msg[data-state="error"] { color: #f6ded4; }
.em-form .cf-turnstile { flex-basis: 100%; }
.em-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Legal */
.em-draft { align-self: flex-start; padding: 8px 14px; border-radius: 10px; background: #f7e6c2; color: #86560a; font-size: 14px; font-weight: 600; }
.em-doc h2 { font-size: 26px; margin: 40px 0 10px; }
.em-doc p, .em-doc li { font-size: 17px; line-height: 28px; max-width: 68ch; }

@media (max-width: 820px) {
	.em-split, .em-grid2, .em-grid3, .em-faq-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.em-navlinks, .em-toc { display: none; }
	.em-section { padding: 80px 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; }

/* ---------------------------------------------------------------- v2: photos, overlay header, live phone, badges */

/* Photo band: background photo with a colour overlay; text on top. Set --em-photo inline. */
.em-photo { position: relative; color: var(--em-card); background: var(--em-night) var(--em-photo, none) center / cover no-repeat; }
.em-photo::before { content: ""; position: absolute; inset: 0; background: var(--em-tint, rgba(17,24,22,.84)); }
.em-photo > * { position: relative; }
.em-photo .em-lead { color: #e1ebe5; }
.em-photo--hero { --em-tint: linear-gradient(90deg, rgba(17,24,22,.9) 0%, rgba(17,24,22,.74) 55%, rgba(17,24,22,.4) 100%); }
.em-photo--gum { --em-tint: rgba(31,74,64,.88); }
.em-glass { background: rgba(255,253,248,.1); border: 1px solid rgba(255,253,248,.2); border-radius: 20px; padding: 22px; }
.em-glass h3 { font-size: 21px; }
.em-glass p { margin: 8px 0 0; font-size: 16px; line-height: 24px; }
.em-row-dark { display: flex; justify-content: space-between; gap: 12px; background: rgba(24,34,31,.92); border-radius: 16px; padding: 16px 20px; }

/* Header over a photo hero */
.em-header--over { position: absolute; left: 0; right: 0; background: transparent; border-bottom: 0; backdrop-filter: none; }
.em-header--over .em-nav { height: 76px; }
.em-header--over .em-navlinks a { color: var(--em-card); }
.em-header--over .em-navlinks a[aria-current="page"] { color: var(--em-wattle); }
.admin-bar .em-header--over { top: 32px; }
@media (max-width: 782px) { .admin-bar .em-header--over { top: 46px; } }

/* Lifelike phone with a chat that plays out. Respects Reduce Motion. */
.em-iphone { width: 330px; height: 680px; box-sizing: border-box; border-radius: 54px; background: #0d0f0e; padding: 12px; box-shadow: 0 40px 80px rgba(0,0,0,.35), inset 0 0 0 2px #2a2d2b; margin: 0 auto; color: var(--em-ink); }
.em-iphone__screen { width: 100%; height: 100%; border-radius: 43px; background: var(--em-page); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.em-iphone__island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 104px; height: 30px; border-radius: 15px; background: #0d0f0e; }
.em-iphone__status { display: flex; justify-content: space-between; padding: 14px 26px 0; font-size: 14px; font-weight: 600; height: 30px; }
.em-iphone__head { display: flex; align-items: center; gap: 9px; padding: 8px 14px 10px; border-bottom: 1px solid var(--em-line); }
.em-iphone__head b { font-family: Fraunces, Georgia, serif; font-variation-settings: 'SOFT' 100, 'WONK' 0; font-size: 18px; display: block; line-height: 1.1; }
.em-iphone__head span { font-size: 11px; color: var(--em-muted); }
.em-iphone__thread { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 12px 6px; overflow: hidden; }
.em-iphone__compose { display: flex; gap: 6px; align-items: center; padding: 6px 12px 22px; }
.em-iphone__compose span { flex: 1; height: 34px; border-radius: 17px; border: 1px solid var(--em-strong); background: var(--em-card); font-size: 12.5px; color: var(--em-muted); line-height: 34px; padding: 0 12px; }
.em-iphone__compose i { width: 34px; height: 34px; border-radius: 17px; background: var(--em-gum); }
.em-m, .em-typing, .em-plan-card, .em-replies { overflow: hidden; max-height: 0; opacity: 0; margin-top: 0; }
.em-m { max-width: 84%; font-size: 13.5px; line-height: 19px; padding: 0 11px; border-radius: 17px 17px 17px 4px; background: var(--em-gum-soft); align-self: flex-start; }
.em-m--me { align-self: flex-end; background: var(--em-gum); color: var(--em-card); border-radius: 17px 17px 4px 17px; }
.em-typing { align-self: flex-start; background: var(--em-gum-soft); border-radius: 17px 17px 17px 4px; padding: 0 12px; display: flex; gap: 4px; align-items: center; }
.em-typing i { width: 6px; height: 6px; border-radius: 3px; background: var(--em-muted); animation: em-dot 1s infinite; }
.em-typing i:nth-child(2) { animation-delay: .15s; }
.em-typing i:nth-child(3) { animation-delay: .3s; }
.em-plan-card { align-self: flex-start; width: 84%; box-sizing: border-box; background: var(--em-card); border: 1px solid var(--em-line); border-radius: 16px; padding: 0 11px; font-size: 12.5px; }
.em-plan-card div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--em-line); }
.em-plan-card div:last-child { border: 0; }
.em-mini-chip { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 7px; font-size: 11.5px; font-weight: 500; }
.em-replies { display: flex; gap: 6px; }
.em-replies span { font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--em-strong); background: var(--em-card); }
.em-s1 { animation: em-s1 18s infinite; }
.em-t1 { animation: em-t1 18s infinite; }
.em-s2 { animation: em-s2 18s infinite; }
.em-s3 { animation: em-s3 18s infinite; }
.em-t2 { animation: em-t2 18s infinite; }
.em-s4 { animation: em-s4 18s infinite; }
.em-s5 { animation: em-s5 18s infinite; }
.em-s6 { animation: em-s6 18s infinite; }
@keyframes em-dot { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes em-s1 { 0%, 3% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } 5%, 93% { max-height: 120px; opacity: 1; margin-top: 8px; padding-top: 8px; padding-bottom: 8px; } 97%, 100% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } }
@keyframes em-t1 { 0%, 8% { max-height: 0; opacity: 0; margin-top: 0; } 9%, 15% { max-height: 30px; height: 30px; opacity: 1; margin-top: 8px; } 16%, 100% { max-height: 0; opacity: 0; margin-top: 0; } }
@keyframes em-s2 { 0%, 15% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } 17%, 93% { max-height: 120px; opacity: 1; margin-top: 8px; padding-top: 8px; padding-bottom: 8px; } 97%, 100% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } }
@keyframes em-s3 { 0%, 29% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } 31%, 93% { max-height: 120px; opacity: 1; margin-top: 8px; padding-top: 8px; padding-bottom: 8px; } 97%, 100% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } }
@keyframes em-t2 { 0%, 35% { max-height: 0; opacity: 0; margin-top: 0; } 36%, 45% { max-height: 30px; height: 30px; opacity: 1; margin-top: 8px; } 46%, 100% { max-height: 0; opacity: 0; margin-top: 0; } }
@keyframes em-s4 { 0%, 45% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } 47%, 93% { max-height: 140px; opacity: 1; margin-top: 8px; padding-top: 8px; padding-bottom: 8px; } 97%, 100% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } }
@keyframes em-s5 { 0%, 54% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } 56%, 93% { max-height: 120px; opacity: 1; margin-top: 8px; padding-top: 2px; padding-bottom: 2px; } 97%, 100% { max-height: 0; opacity: 0; margin-top: 0; padding-top: 0; padding-bottom: 0; } }
@keyframes em-s6 { 0%, 63% { max-height: 0; opacity: 0; margin-top: 0; } 65%, 93% { max-height: 40px; opacity: 1; margin-top: 8px; } 97%, 100% { max-height: 0; opacity: 0; margin-top: 0; } }
@media (prefers-reduced-motion: reduce) {
	.em-m, .em-plan-card, .em-replies { animation: none !important; max-height: none; opacity: 1; margin-top: 8px; }
	.em-m, .em-plan-card { padding-top: 8px; padding-bottom: 8px; }
	.em-typing { display: none; }
}

/* App strip and store badges */
.em-appstrip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.em-appstrip__app { display: flex; align-items: center; gap: 16px; }
.em-appstrip__app img { width: 64px; height: 64px; border-radius: 15px; }
.em-badges { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.em-badge { position: relative; display: block; line-height: 0; }
.em-badge img { height: 48px; width: auto; }
.em-badge--soon img { opacity: .55; filter: grayscale(.2); }
.em-badge__soon { position: absolute; top: -10px; right: -8px; background: var(--em-wattle); color: var(--em-ink); font-size: 11px; line-height: 16px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }

.em-photo .em-form input[type="email"] { border-color: transparent; }
.em-photo .em-form__msg[data-state="error"] { color: #f6ded4; }

/* Disclaimer and footer rows */
.em-disclaimer { margin: 0; font-size: 13px; line-height: 19px; max-width: 900px; }
.em-footer { flex-direction: column; }
.em-footer__row { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }

/* Who is Earl */
.em-fact { background: var(--em-card); border-radius: 20px; padding: 24px; box-shadow: var(--em-shadow); display: flex; flex-direction: column; gap: 8px; }
.em-fact h3 { font-size: 21px; }
.em-fact p { margin: 0; font-size: 16px; line-height: 24px; color: var(--em-muted); }
.em-band .em-fact { background: var(--em-page); box-shadow: none; }
