/* ArcSmith beta sign in. The finished farmhouse appears in a separate photographic scene so the
   whole house stays visible beside the white panel. beta.js retains all authentication states and controls. */

/* Google button typography and branding remain unchanged. */
@font-face { font-family: 'Roboto'; src: url(/fonts/roboto-button-500.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

.signin {
  position: relative; isolation: isolate;
  min-height: calc(100svh - var(--bar-h));
  display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); align-items: center; gap: 40px;
  padding: 48px max(var(--gutter), calc((100vw - 1360px) / 2));
  background: #F5F5F7;
}

/* A contained photograph preserves the complete house and landscape on desktop. */
.scene {
  position: relative; grid-column: 2; grid-row: 1;
  width: 100%; aspect-ratio: 1672 / 941; margin: 0;
  overflow: hidden; border-radius: 24px;
  background: #555A62; border: 1px solid rgba(28, 26, 23, .08);
  box-shadow: 0 1px 3px rgba(28, 26, 23, .08), 0 24px 54px -24px rgba(28, 26, 23, .24);
}
.scene-house { position: absolute; inset: 0; width: 100%; height: 100%; view-transition-name: house; }
.scene-img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.scene-caption {
  position: absolute; right: 14px; bottom: 14px;
  max-width: calc(100% - 28px); padding: 5px 9px; border-radius: 6px;
  background: rgba(255, 255, 255, .96); color: #424245;
  font-size: 12px; line-height: 1.4;
}

/* The panel remains opaque so every state has the same readable contrast. */
.signin-stack { position: relative; z-index: 2; grid-column: 1; grid-row: 1; width: 100%; min-width: 0; }
.signin-panel {
  width: 100%; padding: 38px 38px 26px; border-radius: 24px;
  background: #fff; border: 1px solid var(--as-line);
  box-shadow: 0 1px 2px rgba(28, 26, 23, .03), 0 20px 52px -24px rgba(28, 26, 23, .2);
  view-transition-name: signin-panel;
}
[data-beta] { position: relative; }
.body { position: relative; }
.state { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; text-align: left; }
.state[hidden], .actions [hidden], [data-seat][hidden] { display: none; }
.state .kicker { margin-bottom: -2px; }
.signin h1 { font-size: clamp(32px, 2.7vw, 42px); line-height: 1.05; letter-spacing: -.022em; }
.signin h1:focus { outline: none; }
.lead { font-size: 17px; line-height: 1.5; color: var(--as-body); }
.lead strong { font-weight: 600; color: var(--as-ink); overflow-wrap: anywhere; }
.notice { width: 100%; padding: 10px 12px; border-radius: var(--as-radius-field); background: #FDF1DC; color: var(--as-warning); font-size: 15px; line-height: 1.45; }
.notice:empty { display: none; }
.notice.is-info { background: #E8F1FC; color: var(--as-info); }
.fine, .consent { font-size: 13px; line-height: 1.6; color: var(--as-muted); overflow-wrap: anywhere; }
.consent a, .under a { color: var(--as-link); }
[data-state="signed-out"] > .consent { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--as-line); width: 100%; }
.state .btn.wide { width: 100%; }
.state .status { font-size: 15px; color: var(--as-body); }
.state .status:empty { display: none; }
.state .status.error { color: var(--as-alert); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 2px; }
.under { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--as-line); font-size: 14px; color: var(--as-body); }
.under[hidden] { display: none; }

/* the seat: who is signed in, and as what */
.seat { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; background: var(--as-ground); }
.seat .avatar { flex: 0 0 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--as-brand-moss); color: #fff; font-weight: 600; }
.seat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.seat-who strong { color: var(--as-ink); font-weight: 600; overflow-wrap: anywhere; }
.seat-who strong:empty { display: none; }
.seat-who .small { overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-good { background: #EDF7F0; color: var(--as-good); }
.pill-info { background: #E8F1FC; color: var(--as-info); }
/* "Signed in": a lit window beside it, the same gold as the house */
.state .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--as-brand-moss); margin-bottom: -4px; }
.state .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--as-brand-glow); box-shadow: 0 0 0 4px rgba(226, 176, 97, .22); }

/* checking who is here: a hairline that only shows when the answer is slow */
.checking { position: absolute; left: -38px; right: -38px; top: -38px; height: 2px; overflow: hidden; border-radius: 24px 24px 0 0; opacity: 0; transition: opacity var(--dur-medium) var(--ease-standard); }
.checking::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(226, 176, 97, 0), var(--as-brand-glow) 60%, var(--as-brand-brass)); transform-origin: 0 50%; transform: scaleX(0); }
[data-beta].is-checking .checking { opacity: 1; transition-delay: 450ms; }
[data-beta].is-checking .checking::before { animation: checking 2600ms var(--ease-standard) 450ms forwards; }
@keyframes checking { to { transform: scaleX(.86); } }

/* Google's light button, to its branding: white, #747775 border, #1f1f1f text, Roboto Medium 14 px */
.google {
  position: relative; display: flex; align-items: center; width: 100%; height: 48px; margin-top: 6px; padding: 0 14px;
  overflow: hidden; font-family: 'Roboto', arial, sans-serif; font-weight: 500; font-size: 14px; line-height: 20px; letter-spacing: .25px;
  white-space: nowrap; color: #1f1f1f; background: #fff; border: 1px solid #747775; border-radius: var(--as-radius-button);
  text-decoration: none; transition: box-shadow .218s;
}
.google .g { flex: none; width: 20px; height: 20px; margin-right: 12px; }
.google span { flex: 1; text-align: center; padding-right: 32px; }
.google::after { content: ""; position: absolute; inset: 0; background: #1f1f1f; opacity: 0; transition: opacity .218s; }
.google:hover { color: #1f1f1f; box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15); }
.google:hover::after { opacity: .08; }
.google:active::after, .google:focus-visible::after { opacity: .12; }

/* the two optional questions after applying (followup.js) */
.state .followup { width: 100%; display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 14px; background: var(--as-ground); }
.followup-intro { font-size: 15px; color: var(--as-body); }
.followup fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; }
.followup legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 500; color: var(--as-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #86868B; background: #fff; font-size: 15px; color: var(--as-ink); transition: background-color var(--dur-quick) var(--ease-standard), border-color var(--dur-quick), color var(--dur-quick); }
.chip:hover span { border-color: var(--as-ink); }
.chip input:checked + span { background: var(--as-accent); border-color: var(--as-accent); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--as-accent); outline-offset: 3px; }
.followup .field { display: flex; flex-direction: column; gap: 8px; }
.followup .field label { font-size: 14px; font-weight: 500; color: var(--as-ink); }
.followup .field input { min-height: 44px; padding: 10px 14px; border-radius: var(--as-radius-field); border: 1px solid #86868B; background: #fff; font: 400 16px/1.4 var(--font-ui); color: var(--as-ink); }
.followup .field input:focus { outline: none; border-color: var(--as-accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, .18); }
.followup button { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--as-radius-button); border: 1px solid transparent; background: var(--as-accent); color: #fff; font: 500 16px/1 var(--font-ui); cursor: pointer; }
.followup button:hover { background: var(--as-accent-hover); }
.followup button:disabled { opacity: .6; }
.followup .status { font-size: 15px; }
.followup .status:empty { display: none; }
.followup .status.error { color: var(--as-alert); }
.thanks { font-size: 16px; color: var(--as-ink); padding: 12px 14px; border-radius: 12px; background: #EDF7F0; }
.thanks:focus { outline: none; }

/* the header on this page: Google is the one strong action, so the waitlist is a quiet link here */
.nav .nav-quiet { color: var(--as-ink); }


/* Gentle arrival preserves readable first paint and does not change the photograph. */
@media screen and (prefers-reduced-motion: no-preference) {
  .js .signin-panel { animation: panel-rise 600ms var(--ease-settle) both; }
  .js .state:not([hidden]) > * { animation: words-rise 500ms var(--ease-settle) both; animation-delay: calc(var(--k, 0) * 50ms); }
  .state > :nth-child(2) { --k: 1; } .state > :nth-child(3) { --k: 2; } .state > :nth-child(4) { --k: 3; }
  .state > :nth-child(5) { --k: 4; } .state > :nth-child(6) { --k: 5; } .state > :nth-child(n+7) { --k: 6; }
  .js .under { animation: words-rise 500ms var(--ease-settle) 160ms both; }
  .js [data-beta].is-settled .state:not([hidden]) > * { animation: words-rise 320ms var(--ease-settle) both; animation-delay: calc(var(--k, 0) * 30ms); }
}
@keyframes panel-rise { from { transform: translateY(10px); } }
@keyframes words-rise { from { transform: translateY(6px); } }
html[data-pace="still"] .signin-panel, html[data-pace="still"] .state > *, html[data-pace="still"] .under { animation: none !important; }

/* a state change on this page (beta.js adds vt-state): the panel morphs to its new size and words; the
   scene, the bar and the house are simply the new page, so nothing behind the panel moves */
.signin .body { view-transition-name: signin-body; }
.signin .under { view-transition-name: signin-aside; }
html.vt-state::view-transition-old(root), html.vt-state::view-transition-old(as-bar), html.vt-state::view-transition-old(house) { display: none; }
html.vt-state::view-transition-new(root), html.vt-state::view-transition-new(as-bar), html.vt-state::view-transition-new(house),
html.vt-state::view-transition-group(root), html.vt-state::view-transition-group(as-bar), html.vt-state::view-transition-group(house) { animation: none; }
/* the white panel is captured without its words (they are their own group), so it simply grows or shrinks */
html.vt-state::view-transition-old(signin-panel) { display: none; }
html.vt-state::view-transition-new(signin-panel) { animation: none; height: 100%; }
html.vt-state::view-transition-group(signin-panel), html.vt-state::view-transition-group(signin-body), html.vt-state::view-transition-group(signin-aside) { animation-duration: 420ms; animation-timing-function: var(--ease-settle); }
/* the words fade through: the old ones leave first, the new ones arrive after, never on top of each other */
html.vt-state::view-transition-old(signin-body), html.vt-state::view-transition-old(signin-aside) { animation: vt-fade-out 140ms var(--ease-exit) both; }
html.vt-state::view-transition-new(signin-body), html.vt-state::view-transition-new(signin-aside) { animation: vt-fade-in 300ms var(--ease-settle) 110ms both; }


/* beta.js may add is-leaving while navigation proceeds. The photographic scene remains steady. */
.actions .btn { min-height: 44px; }

/* On smaller screens, a compact photograph leads into the same sign-in card. */
@media (max-width: 900px) {
  .signin { display: block; min-height: 0; padding: 0; }
  .scene { width: 100%; height: clamp(220px, 46vw, 380px); aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
  .scene-img { object-position: center 72%; }
  .scene-caption { top: 12px; right: 12px; bottom: auto; }
  .signin-stack { width: min(100% - var(--gutter) * 2, 520px); margin: -30px auto 0; padding-bottom: 40px; }
}
@media (max-width: 640px) {
  .scene { height: clamp(220px, 58vw, 320px); }
  .scene-caption { font-size: 12px; padding: 5px 8px; }
  .signin-stack { margin-top: -24px; }
  .signin-panel { padding: 28px 24px 22px; border-radius: 20px; }
  .checking { left: -24px; right: -24px; top: -28px; border-radius: 20px 20px 0 0; }
  .signin h1 { font-size: 32px; }
  .google { height: 48px; }
}
@media (max-width: 420px) { .nav .nav-quiet .lbl-long { display: none; } }

@media print {
  .signin { display: block; min-height: 0; padding: 24px var(--gutter); }
  .scene { display: none; }
  .signin-stack { width: min(100%, 520px); margin: 0 auto; padding: 0; }
  .signin-panel { box-shadow: none; animation: none !important; }
  .state > *, .under { animation: none !important; }
}
