/* Palette D — Alloba Services. Sky canvas, peach/amber/rust panels, Concrete
   Blue as ink/wordmark/CTA (replacing wine, which is Palette A's role — this
   system never mixes with Palette A). Documented in design.md Section 8. */

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

:root {
  --sky: #CDE0F2;
  --peach: #FF8C4D;
  --amber: #E8A21D;
  --rust: #E1734A;
  --blue: #333399;
  --white: #ffffff;

  --font-heading: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--sky);
  color: var(--blue);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 800; text-wrap: balance; }

a { color: inherit; }

.wordmark { fill: currentColor; }
/* The wordmark set inside a phrase ("Sign in with Alloba", "Alloba Auth"):
   letters on the text baseline, the "l"s near cap height (T-163). */
.wm-inline { display: inline-block; height: .86em; width: auto; vertical-align: -.07em; fill: currentColor; }

/* ── Header ── same as the alloba.co landing (src/index.css .top): wordmark,
   People | Services switch, Sign in. Here Services is the active side. */
.top { max-width: 84rem; width: 100%; margin: 0 auto; padding: 1.25rem clamp(1.25rem, 4.5vw, 4.5rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; }
.top .wm { width: min(30vw, 170px); color: var(--blue); }
.top .wm svg { width: 100%; height: auto; display: block; }
.top .aud { justify-self: center; display: inline-flex; border: 2px solid var(--blue); border-radius: 9999px; overflow: hidden; font-weight: 600; font-size: .9375rem; }
.top .aud a, .top .aud span { padding: 9px 20px; text-decoration: none; color: var(--blue); }
.top .aud .on { background: var(--blue); color: var(--white); }
.top .signin { justify-self: end; padding: 9px 0; color: var(--blue); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.top .signin:hover { opacity: .75; }
.top a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 720px) {
  /* header stays on one line: smaller wordmark, pill and link */
  .top { gap: .5rem; padding-top: 1rem; padding-bottom: 1rem; }
  .top .wm { width: 4.6rem; }
  .top .aud { font-size: .75rem; }
  .top .aud a, .top .aud span { padding: 6px 10px; }
  .top .signin { font-size: .8125rem; }
}
@media (max-width: 380px) {
  .top { gap: .375rem; }
  .top .wm { width: 4rem; }
  .top .aud { font-size: .6875rem; border-width: 1.5px; }
  .top .aud a, .top .aud span { padding: 5px 8px; }
  .top .signin { font-size: .75rem; }
}

/* ── Hero ── */
main { flex: 1; }
.hero { max-width: 84rem; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 4.5vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); }
.headline { font-size: clamp(2.25rem, 5.5vw, 4rem); line-height: 1.05; letter-spacing: -0.03em; max-width: 20ch; }
.sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 56ch; margin-top: 1.25rem; color: rgba(51, 51, 153, .85); }

.btn-primary {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 1rem;
  background: var(--blue); color: var(--white); border-radius: 9999px; padding: 15px 32px;
  transition: opacity 160ms ease-out;
}
.btn-primary:hover { opacity: .85; }
.btn-ghost {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .9375rem;
  border: 2px solid var(--blue); color: var(--blue); border-radius: 9999px; padding: 9px 22px;
  transition: background 160ms ease-out, color 160ms ease-out;
}
.btn-ghost:hover { background: var(--blue); color: var(--white); }
.hero-cta { margin-top: 2rem; display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.invite-note { font-size: .875rem; color: rgba(51, 51, 153, .6); font-weight: 600; }

/* ── Card grid (hub) ── */
.cards {
  max-width: 84rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4.5vw, 4.5rem) clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(1rem, 2.5vw, 1.5rem);
}
.card {
  display: block; text-decoration: none; color: var(--blue);
  border-radius: clamp(18px, 2.5vw, 28px); padding: clamp(1.5rem, 3vw, 2.25rem);
  min-height: 220px; display: flex; flex-direction: column; justify-content: space-between;
  transition: translate 200ms cubic-bezier(.16,1,.3,1);
}
.card:hover { translate: 0 -4px; }
.card h2 { font-size: clamp(1.5rem, 2.5vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.1; }
.card p { margin-top: .75rem; font-size: .9375rem; color: rgba(51, 51, 153, .8); }
.card .go { margin-top: 1.5rem; font-weight: 600; font-size: .875rem; }
.card.c-peach { background: var(--peach); }
.card.c-amber { background: var(--amber); }
.card.c-rust { background: var(--rust); }
.card.c-blue { background: var(--blue); color: var(--white); }
.card.c-blue p { color: rgba(255, 255, 255, .8); }

/* ── Simple content section (publisher/advertiser/family) ── */
.content { max-width: 42rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4.5vw, 4.5rem); text-align: center; display: flex; flex-direction: column; align-items: center; }
.content .headline { max-width: none; }
.content .sub { margin-left: auto; margin-right: auto; }
.content .hero-cta { justify-content: center; }

/* ── Footer ── */
footer {
  max-width: 84rem; margin: 0 auto; width: 100%;
  padding: 1.5rem clamp(1.25rem, 4.5vw, 4.5rem) 2.5rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  font-size: .8125rem; color: rgba(51, 51, 153, .6);
}
footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Legal pages ── */
.legal-wrap { max-width: 42rem; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4.5vw, 4.5rem) 5rem; }
.legal-back { display: inline-block; text-decoration: none; font-weight: 600; font-size: .9375rem; margin-bottom: 2rem; }
.legal-back:hover { text-decoration: underline; }
.legal-wrap h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.legal-wrap .meta { font-size: .875rem; color: rgba(51, 51, 153, .6); margin-top: .5rem; margin-bottom: 2rem; }
.legal-wrap h2 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: .75rem; }
.legal-wrap p { margin-bottom: 1rem; }
.legal-wrap ul { margin: 0 0 1rem 1.25rem; }
.legal-wrap li { margin-bottom: .4rem; }
.legal-wrap a { text-decoration: underline; }

/* ── Auth explainer specifics (comparison diagram, steps, dev code block) ── */
.comparison { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; align-items: center; margin-top: clamp(2rem, 5vw, 3rem); }
.comparison-panel { background: var(--white); border-radius: 20px; padding: 1.5rem; }
.comparison-divider { font-weight: 600; color: rgba(51, 51, 153, .4); }
.panel-label { font-size: .8125rem; font-weight: 600; color: rgba(51, 51, 153, .6); margin-bottom: 1rem; }
.id-row { display: flex; justify-content: space-between; align-items: center; font-size: .875rem; padding: .4rem 0; border-bottom: 1px solid rgba(51, 51, 153, .1); }
.id-row:last-child { border-bottom: none; }
.service-name { color: rgba(51, 51, 153, .6); }
.user-id { font-family: ui-monospace, Menlo, monospace; font-weight: 700; }
.panel-verdict { margin-top: 1rem; font-size: .8125rem; font-weight: 600; }
.verdict-bad { color: var(--rust); }
.verdict-good { color: var(--blue); }

.how { max-width: 84rem; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4.5vw, 4.5rem); }
.section-label { font-size: .8125rem; font-weight: 600; color: rgba(51, 51, 153, .6); margin-bottom: 1.5rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step-num { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; color: rgba(51, 51, 153, .35); }
.step h3 { font-size: 1.125rem; margin-top: .5rem; }
.step p { font-size: .9375rem; color: rgba(51, 51, 153, .8); margin-top: .5rem; }

.honesty { margin-top: 2rem; max-width: 68ch; font-size: .9375rem; color: rgba(51, 51, 153, .6); }

.devs { background: var(--blue); color: var(--white); }
.devs-inner { max-width: 84rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4.5vw, 4.5rem); display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.devs h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.devs p { margin-top: 1rem; color: rgba(255, 255, 255, .8); }
.devs code { background: rgba(255, 255, 255, .15); border-radius: 6px; padding: 2px 6px; font-family: ui-monospace, Menlo, monospace; }
.dev-links { margin-top: 1.5rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.devs .btn-ghost { border-color: var(--white); color: var(--white); }
.devs .btn-ghost:hover { background: var(--white); color: var(--blue); }
.code-label { font-size: .8125rem; color: rgba(255, 255, 255, .6); margin-bottom: .5rem; }
.code-block { background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 1.25rem; font-family: ui-monospace, Menlo, monospace; font-size: .8125rem; overflow-x: auto; white-space: pre; }
.code-note { font-size: .8125rem; color: rgba(255, 255, 255, .6); margin-top: .75rem; }

@media (max-width: 720px) {
  .comparison { grid-template-columns: 1fr; }
  .comparison-divider { display: none; }
  .steps { grid-template-columns: 1fr; }
  .devs-inner { grid-template-columns: 1fr; }
}

/* ── Community posts (markdown-rendered) ── */
.post-feed { max-width: 42rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4.5vw, 4.5rem); }
.post-feed .headline { text-align: left; }
.post-feed .sub { margin-top: 1rem; }
.post-list { margin-top: 3rem; display: flex; flex-direction: column; gap: 1.5rem; }
.post-card { display: block; background: #fff; border-radius: 24px; padding: 1.75rem 2rem; text-decoration: none; color: var(--blue); transition: transform .15s ease; }
.post-card:hover { transform: translateY(-2px); }
.post-card h2 { font-family: var(--font-heading); font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: .35rem; }
.post-card time { font-size: .8125rem; font-weight: 600; color: rgba(51, 51, 153, .55); }
.post-card p { margin-top: .5rem; color: rgba(51, 51, 153, .85); }
.post-card .go { display: inline-block; margin-top: .85rem; font-size: .8125rem; font-weight: 600; }

.post { max-width: 42rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4.5vw, 4.5rem); }
.post h1 { font-family: var(--font-heading); font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.post time { display: block; margin-top: .75rem; font-size: .8125rem; font-weight: 600; color: rgba(51, 51, 153, .55); }
.prose { margin-top: 2rem; }
.prose p { margin-bottom: 1.15rem; line-height: 1.65; color: rgba(51, 51, 153, .9); }
.prose h2 { font-family: var(--font-heading); font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; margin: 2rem 0 .75rem; }
.prose h3 { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 800; margin: 1.5rem 0 .5rem; }
.prose a { color: var(--blue); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.15rem 1.25rem; line-height: 1.65; color: rgba(51, 51, 153, .9); }
.prose li { margin-bottom: .35rem; }
.prose blockquote { border-left: 3px solid var(--rust); padding-left: 1rem; margin: 1.25rem 0; color: rgba(51, 51, 153, .75); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875rem; background: #fff; border-radius: 8px; padding: .1em .35em; }
.prose img { max-width: 100%; border-radius: 12px; }
.post .back { display: inline-block; margin-top: 2.5rem; font-weight: 600; text-decoration: none; }
.post .back:hover { text-decoration: underline; }
.post .share { display: inline-block; margin-top: 1.25rem; font-family: var(--font-body); font-size: .9375rem; font-weight: 600; color: #fff; background: var(--blue); border: 0; border-radius: 9999px; padding: .65rem 1.5rem; cursor: pointer; transition: opacity .15s; }
.post .share:hover { opacity: .85; }
.post-end { margin-top: 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.post-end .back { margin-top: 0; }
.post-end .share { margin-top: 0; }
