:root {
  --chalk: #f5e9d7;
  --chalk-muted: #d8c3a7;
  --chalk-soft: #b79a7a;
  --focus: #ffd39a;
  --board: rgba(8, 8, 7, .95); /* 5% transparent blackboard */
  --board-soft: rgba(8, 8, 7, .78);
  --board-line: rgba(159, 101, 49, .88);
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --chalk-hand: "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", cursive;
  --body: "Aptos", "Segoe UI Variable Text", "Avenir Next", "Helvetica Neue", ui-sans-serif, sans-serif;
  color-scheme: dark;
  font-family: var(--body);
  color: var(--chalk);
  background: #27150c;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #27150c; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100%; margin: 0; background: #27150c; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.cafe-stage {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #27150c;
}

.cafe-stage::before,
.cafe-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cafe-stage::before {
  z-index: -2;
  background: url("assets/brick-counter-v3.png") center / cover no-repeat;
}

.cafe-stage::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(16, 7, 3, .16) 0%, rgba(16, 7, 3, .02) 48%, rgba(16, 7, 3, .16) 100%),
    linear-gradient(0deg, rgba(16, 7, 3, .56) 0%, rgba(16, 7, 3, .04) 35%, rgba(16, 7, 3, .16) 100%);
}

.board {
  color: var(--chalk);
  background-color: var(--board);
  background-image:
    radial-gradient(rgba(255, 255, 255, .052) .7px, transparent .8px),
    linear-gradient(125deg, rgba(255, 255, 255, .024), transparent 38%);
  background-size: 5px 5px, auto;
  border: 12px solid #5e3219;
  box-shadow: inset 0 0 0 2px rgba(225, 145, 69, .32), inset 0 0 34px rgba(0, 0, 0, .46), 0 18px 36px rgba(24, 12, 5, .36);
}

.site-header {
  position: absolute;
  z-index: 3;
  top: clamp(14px, 3.7vh, 52px);
  left: clamp(24px, 4vw, 80px);
  padding: 0;
}

.brand, .footer-brand { display: inline-flex; align-items: center; color: var(--chalk); text-decoration: none; }
.brand-logo { display: block; width: clamp(190px, 16vw, 320px); height: auto; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .62)); }

.welcome-board {
  position: absolute;
  z-index: 2;
  top: clamp(138px, 13.7vh, 168px);
  left: clamp(24px, 1.9vw, 42px);
  width: clamp(360px, 23vw, 480px);
  min-height: min(60.8vh, 680px);
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 2.3vw, 48px) clamp(28px, 2.2vw, 44px) clamp(28px, 2.5vw, 50px);
}

.welcome-board h1, .owner-copy h2 {
  margin: 0;
  color: var(--chalk);
  font-family: var(--chalk-hand);
  font-weight: 600;
  letter-spacing: -.085em;
  line-height: .88;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .14), 2px 2px 1px rgba(0, 0, 0, .62);
}

.welcome-board h1 { font-size: clamp(54px, 4.1vw, 86px); }
.owner-copy { margin-top: auto; }
.owner-copy h2 { font-size: clamp(48px, 3.65vw, 76px); }
.owner-copy p { max-width: 350px; margin: 22px auto 0; color: var(--chalk-muted); font-family: var(--chalk-hand); font-size: clamp(16px, 1.18vw, 24px); line-height: 1.22; letter-spacing: -.035em; text-align: center; text-shadow: 0 2px 9px rgba(0, 0, 0, .62); }

.access-board {
  position: absolute;
  z-index: 2;
  top: clamp(138px, 13.7vh, 168px);
  right: clamp(24px, 2.2vw, 44px);
  width: clamp(420px, 30.5vw, 620px);
  min-height: min(60.8vh, 680px);
  display: flex;
  align-items: center;
  padding: clamp(32px, 2.2vw, 45px) clamp(32px, 2.5vw, 50px) clamp(30px, 2.2vw, 44px);
}

#login-form { width: 100%; }
label { display: block; margin-bottom: 11px; color: var(--chalk); font-family: var(--chalk-hand); font-size: clamp(17px, 1.15vw, 24px); font-weight: 600; letter-spacing: -.035em; text-shadow: 0 2px 8px rgba(0, 0, 0, .58); }

input {
  width: 100%;
  height: clamp(56px, 5vw, 72px);
  padding: 0 19px;
  border: 2px solid rgba(244, 231, 210, .80);
  border-radius: 0;
  color: var(--chalk);
  background: rgba(0, 0, 0, .06);
  font-family: var(--chalk-hand);
  font-size: clamp(15px, 1vw, 20px);
  letter-spacing: -.025em;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

input::placeholder { color: rgba(231, 211, 185, .78); }
input:hover { border-color: #fffaf1; }
input:focus { outline: none; border-color: #fffaf1; background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 3px rgba(243, 231, 210, .16); }
#email { margin-bottom: clamp(24px, 2.2vw, 38px); }

.field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.forgot-link { color: var(--chalk-muted); font-family: var(--chalk-hand); font-size: clamp(14px, .95vw, 19px); letter-spacing: -.025em; text-decoration: none; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.forgot-link:hover { color: #fffaf1; text-decoration: underline; text-underline-offset: 4px; }

.password-field { position: relative; }
.password-field input { padding-right: 64px; }
.visibility-toggle { width: 47px; height: 47px; display: grid; place-items: center; position: absolute; top: 50%; right: 7px; border: 0; border-radius: 0; color: var(--chalk-muted); background: transparent; transform: translateY(-50%); transition: color .2s, background .2s; }
.visibility-toggle:hover { color: #fffaf1; background: rgba(255, 255, 255, .07); }
.visibility-toggle svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.eye-slash { display: none; }
[aria-pressed="true"] .eye-slash { display: block; }

.sign-in {
  width: 100%;
  min-height: clamp(56px, 5vw, 72px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(24px, 2.2vw, 38px);
  padding: 0 20px;
  border: 2px solid rgba(244, 231, 210, .80);
  border-radius: 0;
  color: var(--chalk);
  background: rgba(255, 255, 255, .015);
  font-family: var(--chalk-hand);
  font-size: clamp(17px, 1.15vw, 24px);
  font-weight: 600;
  letter-spacing: -.035em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}

.sign-in:hover { border-color: #fffaf1; color: #fffaf1; background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
.sign-in:active { transform: translateY(0); }
.sign-in svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

#login-status { margin: 16px 0 0; padding: 11px 13px; border-left: 2px solid var(--chalk); color: var(--chalk-muted); background: rgba(255, 255, 255, .04); font-family: var(--chalk-hand); font-size: 13px; line-height: 1.45; }

.site-footer {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: clamp(78px, 8.8vh, 104px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 0 clamp(28px, 4vw, 80px);
  color: var(--chalk-muted);
  background: var(--board);
  box-shadow: inset 0 1px 0 rgba(209, 136, 66, .16), 0 -12px 28px rgba(20, 8, 3, .18);
}

.footer-brand-logo { display: block; width: clamp(150px, 10vw, 215px); height: auto; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .62)); }
.site-footer p { margin: 0; color: var(--chalk-muted); font-family: var(--chalk-hand); font-size: clamp(13px, 1.05vw, 20px); letter-spacing: -.025em; }
.sr-only { width: 1px; height: 1px; position: absolute; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .site-header { top: 24px; left: 24px; }
  .welcome-board { left: 22px; width: min(360px, 31vw); }
  .welcome-board h1 { font-size: clamp(44px, 5vw, 65px); }
  .owner-copy h2 { font-size: clamp(40px, 4.4vw, 57px); }
  .access-board { right: 22px; width: min(430px, 40vw); }
}

@media (min-width: 721px) and (max-height: 780px) {
  .welcome-board, .access-board { min-height: calc(100svh - 218px); }
  .welcome-board { padding-top: 24px; padding-bottom: 25px; }
  .welcome-board h1 { font-size: clamp(46px, 3.65vw, 68px); }
  .owner-copy h2 { font-size: clamp(42px, 3.2vw, 60px); }
  .owner-copy p { margin-top: 14px; font-size: clamp(14px, 1.05vw, 18px); }
}

@media (max-width: 720px) {
  .cafe-stage {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    padding: 70px 12px calc(48px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-rows: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 10px;
  }
  .cafe-stage::before { background-position: center bottom; background-size: cover; }
  .cafe-stage::after { background: linear-gradient(90deg, rgba(16, 7, 3, .38), rgba(16, 7, 3, .18)), linear-gradient(0deg, rgba(16, 7, 3, .76), rgba(16, 7, 3, .12) 55%, rgba(16, 7, 3, .36)); }
  .site-header { position: absolute; inset: 10px auto auto 16px; padding: 0; }
  .brand-logo { width: min(185px, 48vw); }
  .welcome-board, .access-board { position: relative; inset: auto; width: 100%; min-height: 0; height: auto; border-width: 6px; }
  .welcome-board { padding: 18px 16px 17px; }
  .welcome-board h1 { font-size: clamp(42px, 12vw, 56px); }
  .owner-copy h2 { font-size: clamp(38px, 10vw, 50px); }
  .owner-copy p { max-width: 280px; margin-top: 12px; font-size: 13px; line-height: 1.15; }
  .access-board { align-self: stretch; padding: 14px 16px; }
  label { margin-bottom: 6px; font-size: 14px; }
  input, .sign-in { height: 42px; min-height: 42px; font-size: 13px; }
  input { padding-inline: 12px; }
  #email { margin-bottom: 12px; }
  .field-heading { gap: 10px; }
  .forgot-link { font-size: 12px; }
  .password-field input { padding-right: 46px; }
  .visibility-toggle { width: 38px; height: 38px; right: 2px; }
  .visibility-toggle svg { width: 18px; height: 18px; }
  .sign-in { gap: 7px; margin-top: 14px; padding-inline: 12px; font-size: 14px; }
  .sign-in svg { width: 16px; height: 16px; }
  #login-status { margin-top: 8px; padding: 6px 8px; font-size: 10px; }
  .site-footer { position: absolute; inset: auto 0 0; width: auto; min-height: 48px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); gap: 12px; }
  .footer-brand-logo { width: min(112px, 29vw); }
  .site-footer p { font-size: 10px; white-space: nowrap; }
}

@media (max-width: 480px) {
  .cafe-stage { padding: 66px 10px calc(44px + env(safe-area-inset-bottom)); gap: 8px; }
  .site-header { inset: 9px auto auto 14px; }
  .brand-logo { width: min(175px, 47vw); }
  .welcome-board { padding: 15px 14px 14px; }
  .access-board { padding: 12px 13px; }
  .welcome-board h1 { font-size: clamp(40px, 11.5vw, 50px); }
  .owner-copy h2 { font-size: clamp(36px, 9.5vw, 46px); }
  .owner-copy p { max-width: 250px; font-size: 12px; }
  label { font-size: 13px; }
  input, .sign-in { height: 40px; min-height: 40px; }
  .site-footer { padding-inline: 12px; gap: 9px; }
  .footer-brand-logo { width: min(105px, 28vw); }
  .site-footer p { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

