/* Inner pages: the firm's own page embeds, restyled. tools/build.py scopes each embed's CSS
   under .emb (they were written for an iframe: *, :root and body rules), so this remaps their
   shared variables and type, turns their .hero into the ember page header with the page's art
   (--art), and lets the warm paper content fade in and out of the night with no hard edge.
   Selectors start "html body .tool" to outrank the embeds' scoped rules. */

html body .tool { background: var(--paper); color: var(--ink); }
html body .tool .emb {
  --navy: #17120E; --dark: #2A211B; --blue: #C2410C; --gold: #E8641C; --sky: #FFD9C2;
  --cloud: #FBF6F1; --light: #FFF1E6; --white: #FFFFFF;
  background: var(--paper); color: var(--ink); line-height: 1.65;
}
html body .tool .emb, html body .tool .emb * { font-family: var(--f) !important; }
html body .tool .emb :is(h1, h2, h3, h4) { font-weight: 500; letter-spacing: -.02em; }
html body .tool .emb h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.1; }
html body .tool .emb :is(.section-label, [class$="-label"], [class$="-badge"]) {
  font-weight: 600; letter-spacing: .22em; font-size: .72rem;
}

/* ---------- the page header ---------- */
html body .tool .emb .hero {
  display: block; position: relative; isolation: isolate; overflow: hidden; text-align: left;
  min-height: clamp(520px, 74vh, 760px);
  padding: 170px max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))) 220px;
  color: #fff;
  background:
    radial-gradient(80% 90% at 88% 0%, #FF7A2B 0%, #D9541A 26%, #8E300F 50%, transparent 76%),
    linear-gradient(180deg, #24100A 0%, var(--night) 62%, var(--night) 70%);
}
/* the fade into the paper below: no hard edge between the dark header and the content */
html body .tool .emb .hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 200px; z-index: -1;
  background: linear-gradient(180deg, rgba(11, 9, 8, 0) 0%, rgba(11, 9, 8, .6) 30%, var(--paper) 100%);
  border: 0; border-radius: 0; width: auto; top: auto; left: 0; right: 0;
}
/* the page's art, drifting at the right (main.js moves --drift) */
html body .tool .emb .hero::before {
  content: ""; position: absolute; z-index: -1; border-radius: 0;
  top: -8%; right: -10%; left: auto; bottom: auto; width: min(980px, 80vw); height: auto; aspect-ratio: 1664 / 928;
  background: var(--art, url(/img/hero_moon.webp)) center / cover no-repeat;
  mix-blend-mode: screen; opacity: .95;
  -webkit-mask-image: radial-gradient(70% 70% at 60% 45%, #000 50%, transparent 100%); mask-image: radial-gradient(70% 70% at 60% 45%, #000 50%, transparent 100%);
  transform: translate3d(0, var(--drift, 0px), 0);
  animation: artIn 1.8s var(--ease) both;
}
html body .tool .emb .hero > * { position: relative; max-width: 760px; margin-left: 0; margin-right: 0; }
html body .tool .emb .hero :is(.hero-content, .hero-inner) { max-width: 760px; text-align: left; }
html body .tool .emb .hero h1 {
  font: 500 clamp(2.4rem, 5.6vw, 4.6rem)/1.03 var(--f) !important; letter-spacing: -.035em; color: #fff;
  max-width: 14ch; margin: 0 0 22px; text-wrap: balance; animation: fadeUp 1s var(--ease) .15s both;
}
html body .tool .emb .hero h1 span { color: var(--ember-hi); }
html body .tool .emb .hero :is(p, .sub) { color: var(--soft); opacity: 1; margin-left: 0; margin-right: 0; max-width: 620px; font-size: 1.1rem; animation: fadeUp 1s var(--ease) .35s both; }
html body .tool .emb .hero [class$="-badge"] {
  display: inline-flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .08); color: #fff;
  border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  padding: 9px 16px; border-radius: 999px; margin-bottom: 26px; animation: fadeUp 1s var(--ease) both;
}
html body .tool .emb .hero [class$="-badge"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ember-hi); box-shadow: 0 0 12px var(--ember-hi); }
html body .tool .emb .hero :is(.cta-row, .hero-cta, [class*="cta-row"]) { justify-content: flex-start; animation: fadeUp 1s var(--ease) .5s both; }

/* ---------- buttons: pills, black on paper, white on the header ---------- */
html body .tool .emb :is(.cta-btn, [class$="-btn"], button[type="submit"]) {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px;
  border-radius: 999px; border: 1px solid transparent; background: var(--night); color: #fff;
  font-weight: 500; font-size: .95rem; text-decoration: none; box-shadow: none;
  transition: background-color .25s var(--ease), transform .25s var(--ease), color .25s var(--ease);
}
html body .tool .emb :is(.cta-btn, [class$="-btn"], button[type="submit"]):hover { background: #2A211B; transform: translateY(-2px); box-shadow: none; }
html body .tool .emb .cta-btn::after { content: "→"; transition: transform .3s var(--ease); }
html body .tool .emb .cta-btn:hover::after { transform: translateX(3px); }
html body .tool .emb .hero .cta-btn { background: #fff; color: var(--ink); margin: 6px 12px 6px 0; }
html body .tool .emb .hero .cta-btn:hover { background: var(--paper); }
html body .tool .emb .cta-btn.outline { background: transparent; color: var(--ink); border-color: rgba(23, 18, 14, .25); }
html body .tool .emb .hero .cta-btn.outline { color: #fff; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .06); }

/* ---------- cards and panels: soft, rounded, a little glass ---------- */
html body .tool .emb :is([class$="-card"], [class*="-card "], .cap, .eng-phase, .estep, .faq-item, .what-card, .ecard) {
  border-radius: 20px; box-shadow: 0 1px 0 rgba(23, 18, 14, .04), 0 24px 50px -32px rgba(23, 18, 14, .35);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
html body .tool .emb :is([class$="-card"], .cap, .ecard):hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(23, 18, 14, .45); }
html body .tool .emb :is(input, select, textarea) { border-radius: 12px; }
html body .tool .emb :is(input, select, textarea, button):focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
html body .tool .emb a:not([class]) { color: var(--ember-deep); }

/* the embeds' own closing call to action: an ember panel */
html body .tool .emb .cta-bottom {
  background: radial-gradient(90% 140% at 100% 0%, #FF7A2B, #C2410C 45%, #5E1D07 85%); color: #fff;
  border-radius: 32px; margin: 40px var(--gutter) 0; padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px);
}
html body .tool .emb .cta-bottom :is(h2, h3, p, a:not(.cta-btn)) { color: #fff; }
html body .tool .emb .cta-bottom .cta-btn { background: #fff; color: var(--ink); }

/* the closing fade from paper into the night footer */
.tool__fade { height: 180px; background: linear-gradient(180deg, var(--paper), var(--night)); }
html body .tool .sheet { position: relative; background: var(--paper); }

/* over the glass-moon scene: a see-through header, then the content as a paper sheet that
   slides up over the scene, with the scene showing again before the footer */
html.gl body .tool, html.gl body .tool .emb { background: transparent; }
html.gl body .tool .emb .hero { background: linear-gradient(90deg, rgba(11, 9, 8, .8) 0%, rgba(11, 9, 8, .45) 40%, rgba(11, 9, 8, 0) 66%); padding-bottom: 170px; }
html.gl body .tool .emb .hero::after { display: none; }
html.gl-ready body .tool .emb .hero::before { visibility: hidden; }
html.gl body .tool .sheet {
  margin: -70px clamp(8px, 1.4vw, 20px) 0; padding-bottom: clamp(12px, 2vw, 28px);
  border-radius: clamp(24px, 3vw, 40px); overflow: clip; box-shadow: 0 -30px 90px -40px rgba(0, 0, 0, .7);
}
html.gl body .tool .tool__fade { height: clamp(90px, 14vw, 200px); background: none; }
@media (max-width: 700px) {
  html.gl body .tool .emb .hero { background: linear-gradient(180deg, rgba(11, 9, 8, .15) 0%, rgba(11, 9, 8, .72) 55%, rgba(11, 9, 8, .8)); padding-top: 300px; }
}

/* the assessment: the firm's own app, framed */
html body .tool .emb iframe { border-radius: 20px; box-shadow: 0 30px 70px -40px rgba(23, 18, 14, .5); background: #fff; scroll-margin-top: 96px; }
html body .tool .emb #moonshot-assessment { background: var(--paper); box-shadow: none; border-radius: 0; transition: height .35s var(--ease); }

/* Tracy's portrait on the About page: beside her introduction, and over her quote */
html body .tool .emb .founder { float: right; margin: 6px 0 24px 36px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
html body .tool .emb .face--xl { width: 190px; height: 190px; border-width: 3px; }
html body .tool .emb .founder figcaption { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; color: #6B5D52; }
html body .tool .emb .founder figcaption b { color: var(--ink); font-weight: 600; }
html body .tool .emb .quote-section .face { display: block; margin: 0 auto 20px; }
@media (max-width: 700px) {
  html body .tool .emb .founder { float: none; margin: 0 auto 28px; }
}

/* pages made here from the firm's text (AEO, the blog index) */
.made { padding: 20px 0 var(--sec); color: var(--ink); }
.made .wrap { max-width: 980px; }
.made h2 { font: 500 clamp(1.7rem, 3.2vw, 2.4rem)/1.1 var(--f); letter-spacing: -.02em; margin: 56px 0 18px; }
.made p, .made li { color: #4A3F37; font-size: 1.05rem; line-height: 1.7; }
.made ul { display: grid; gap: 12px; margin-top: 10px; }
.made li { padding: 18px 22px; border-radius: 18px; background: #fff; box-shadow: 0 24px 50px -34px rgba(23, 18, 14, .35); }
.made li b { color: var(--ink); }
.post { display: block; padding: 30px; border-radius: 24px; background: #fff; text-decoration: none; color: var(--ink); box-shadow: 0 24px 50px -32px rgba(23, 18, 14, .4); transition: transform .4s var(--ease); }
.post:hover { transform: translateY(-4px); }
.post time { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ember-deep); font-weight: 600; }
.post h3 { font: 500 1.6rem/1.2 var(--f); letter-spacing: -.02em; margin: 12px 0 10px; }
.post p { color: #4A3F37; }
.post span { display: inline-block; margin-top: 14px; font-weight: 500; }

@media (max-width: 700px) {
  html body .tool .emb .hero { padding-top: 130px; padding-bottom: 180px; min-height: 0; }
  html body .tool .emb .hero::before { right: -45%; width: 140vw; opacity: .7; }
}
