/* ==========================================================================
   Front page and sign-in card — ported from the approved mock-up
   (docs/devsoftuk-ERP-Landing.html). Served at / and /Account/Login (docs/LOGIN.md).

   The page stands alone: it loads neither Bootstrap nor app.css, so the mock-up's
   rules apply exactly as written and its class names (.btn, .row, .nav, .card, .lead)
   are safe to keep. Every value below is the mock-up's own. What differs:

     - the Admin / Employee switch (.seg) is gone, with its rules; the account
       decides the panel after signing in;
     - the image rule for .pic and the logo's text fallback went with the markup
       that used them (the scene is drawn in HTML, the logo is local);
     - the additions at the end: scrolling on a window shorter than the page, the
       form's messages, a checkbox that can still be reached with Tab, the card on
       narrow screens, the phone's top bar, and reduced motion.
   ========================================================================== */

:root { --paper: #eef4fb; --ink: #0b2a4a; --ink-2: #3d5570; --ink-3: #7f93aa; --blue: #1a76d1; --blue-d: #0f4c8a; --line: #cfdbea; --mark: #ffd166; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: Manrope, system-ui, sans-serif; color: var(--ink); background: var(--paper); min-height: 100%; display: flex; flex-direction: column; position: relative; overflow: hidden; }
body:before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); pointer-events: none; opacity: .7; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---- top bar ---- */
.nav { height: 78px; display: flex; align-items: center; padding: 0 64px; gap: 20px; position: relative; z-index: 2; }
.logo img { height: 38px; display: block; }
.sp { flex: 1; }
.lnk { font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 10px 14px; border-radius: 8px; }
.lnk:hover { background: #dde9f7; }
.btn { border: 1.5px solid var(--ink); border-radius: 999px; padding: 11px 22px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 10px; transition: .2s; background: transparent; }
.btn.p { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.p:hover { background: var(--ink); border-color: var(--ink); }
.btn:not(.p):hover { background: var(--ink); color: #fff; }
.btn .arr { display: inline-block; transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }

/* ---- left: the pitch ---- */
.main { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; padding: 0 64px 24px; position: relative; z-index: 2; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--blue-d); }
.eyebrow:before { content: ""; width: 34px; height: 2px; background: var(--blue); }
h1 { font-family: Fraunces, serif; font-weight: 600; font-size: 76px; line-height: .98; letter-spacing: -2px; margin: 18px 0 22px; font-variation-settings: "opsz" 144; }
h1 em { font-style: italic; font-weight: 500; color: var(--blue-d); position: relative; white-space: nowrap; }
h1 em svg { position: absolute; left: -2%; bottom: -6px; width: 104%; height: 16px; overflow: visible; }
h1 em path { stroke: var(--mark); stroke-width: 7; fill: none; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.1s .5s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 540px; }
.lead b { color: var(--ink); font-weight: 700; }
.cta { display: flex; align-items: center; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.facts { margin-top: 34px; display: grid; grid-template-columns: repeat(3, auto); gap: 36px; width: max-content; }
.facts div { border-left: 2px solid var(--line); padding-left: 14px; }
.facts b { font-family: Fraunces, serif; font-size: 30px; font-weight: 600; display: block; line-height: 1; letter-spacing: -1px; }
.facts span { font-size: 12.5px; color: var(--ink-3); }
.prods { margin-top: 30px; font-size: 13px; color: var(--ink-3); }
.prods a { color: var(--ink-2); font-weight: 600; border-bottom: 1.5px solid var(--line); padding-bottom: 1px; margin-right: 14px; transition: .2s; }
.prods a:hover { border-color: var(--blue); color: var(--blue); }

/* ---- right: the scene and the card share the space and swap ---- */
.right { position: relative; min-height: 540px; }
.panel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.panel.hide { opacity: 0; transform: translateX(36px); pointer-events: none; }
.pic { position: relative; width: 100%; max-width: 600px; }
.pic .card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px; box-shadow: 24px 24px 0 var(--blue); transform: rotate(-1.2deg); }
.pic .cap { position: absolute; right: -22px; top: -26px; background: var(--mark); color: var(--ink); font-family: Fraunces, serif; font-style: italic; font-size: 15px; padding: 10px 14px; transform: rotate(3deg); box-shadow: 4px 4px 0 rgba(20, 33, 61, .25); }
.pic .cap2 { position: absolute; left: -18px; bottom: -24px; background: #fff; border: 1.5px solid var(--ink); font-size: 12.5px; padding: 8px 12px; font-weight: 600; transform: rotate(-2deg); }
.pic .cap2 span { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; }

/* ---- the illustrated capture scene ---- */
.scene { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; background: #e6eef8; border-radius: 3px; padding: 14px; min-height: 340px; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 14px 14px 16px; position: relative; overflow: hidden; box-shadow: 0 6px 18px rgba(20, 33, 61, .08); }
.dh { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.stamp { font-family: Fraunces, serif; font-weight: 700; font-size: 13px; letter-spacing: 2px; color: var(--ink-3); }
.ln { height: 7px; border-radius: 4px; background: #dfe8f3; margin: 6px 0; }
.ln.dk { background: #c3d3e6; }
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
.rows { margin: 12px 0; }
.fld { display: flex; justify-content: space-between; font-size: 11px; padding: 5px 7px; border-radius: 4px; margin: 4px 0; border: 1.5px dashed transparent; animation: hl .6s both; }
.fld span { color: var(--ink-3); }
.fld b { font-weight: 700; color: var(--ink); }
.fld.f1 { animation-delay: 1.2s; } .fld.f2 { animation-delay: 1.5s; } .fld.f3 { animation-delay: 1.8s; } .fld.f4 { animation-delay: 2.1s; font-size: 12px; }
@keyframes hl { from { background: transparent; border-color: transparent; } to { background: #fff6d6; border-color: var(--mark); } }
.beam { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--blue), transparent); box-shadow: 0 0 14px var(--blue); animation: scan 1.4s .1s ease-in-out both; }
@keyframes scan { from { top: 0; opacity: 1; } to { top: 100%; opacity: 0; } }
.out { background: linear-gradient(160deg, #0f4c8a, #1a76d1); color: #fff; border-radius: 3px; padding: 12px 12px 10px; font-size: 11px; display: flex; flex-direction: column; }
.oh { font-weight: 700; font-size: 12px; letter-spacing: .5px; display: flex; justify-content: space-between; margin-bottom: 8px; }
.oh i { font-style: normal; color: #7ee0a6; font-weight: 600; }
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .12); opacity: 0; animation: up .4s both; }
.kv span { color: #9aa6bf; }
.kv b { font-weight: 600; text-align: right; }
.kv b.ok { color: #7ee0a6; }
.kv.k1 { animation-delay: 1.35s; } .kv.k2 { animation-delay: 1.65s; } .kv.k3 { animation-delay: 1.95s; } .kv.k4 { animation-delay: 2.25s; } .kv.k5 { animation-delay: 2.4s; }
.exp { margin-top: auto; padding-top: 8px; font-size: 10.5px; color: #9aa6bf; opacity: 0; animation: up .4s 2.7s both; }

/* ---- the sign-in card ---- */
.login { width: 420px; background: #fff; border: 1.5px solid var(--ink); border-radius: 6px; padding: 30px 32px 26px; box-shadow: 18px 18px 0 var(--blue); position: relative; }
.login .top { display: flex; justify-content: space-between; align-items: baseline; }
.login h2 { font-family: Fraunces, serif; font-size: 30px; font-weight: 600; letter-spacing: -1px; }
.login .x { border: 0; background: none; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.login .x:hover { color: var(--ink); }
.login .sub2 { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 20px; }
.fld { margin-bottom: 14px; }
.fld label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.fld .in { position: relative; }
.fld input { width: 100%; border: 0; border-bottom: 1.5px solid var(--line); background: transparent; padding: 8px 40px 10px 0; font-family: inherit; font-size: 15px; color: var(--ink); outline: 0; }
.fld .in:after { content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0; background: var(--blue); transition: width .3s; }
.fld .in:focus-within:after { width: 100%; }
.fld .eye { position: absolute; right: 0; top: 8px; border: 0; background: none; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin: 4px 0 20px; color: var(--ink-2); }
.row label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.row a { color: var(--blue-d); font-weight: 600; }
.cb { width: 18px; height: 18px; border: 1.5px solid var(--ink); border-radius: 4px; display: grid; place-items: center; transition: .2s; }
.row input:checked + .cb { background: var(--blue); border-color: var(--blue); }
.row input:checked + .cb:after { content: "✓"; color: #fff; font-size: 12px; }
.go { width: 100%; border: 1.5px solid var(--blue); background: var(--blue); color: #fff; border-radius: 999px; padding: 14px; font-weight: 700; font-size: 15px; display: flex; justify-content: center; gap: 10px; transition: .2s; }
.go:hover { background: var(--ink); border-color: var(--ink); }
.go:hover .arr { transform: translateX(4px); }
.go .arr { transition: transform .2s; }
.login .ft2 { font-size: 11.5px; color: var(--ink-3); margin-top: 14px; text-align: center; }
.st > * { animation: up .45s both; }
.st > *:nth-child(2) { animation-delay: .06s; } .st > *:nth-child(3) { animation-delay: .12s; } .st > *:nth-child(4) { animation-delay: .18s; } .st > *:nth-child(5) { animation-delay: .24s; } .st > *:nth-child(6) { animation-delay: .3s; } .st > *:nth-child(7) { animation-delay: .36s; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- footer ---- */
.foot { padding: 16px 64px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); position: relative; z-index: 2; }
.foot a:hover { color: var(--ink); }

@media (max-width: 1000px) {
  body { overflow: auto; }
  .main { grid-template-columns: 1fr; padding: 10px 24px 30px; }
  .nav, .foot { padding: 0 24px; }
  h1 { font-size: 44px; }
  .right { min-height: 0; }
  .panel { position: static; }
  #framePanel { display: none; }
  .facts { grid-template-columns: 1fr 1fr 1fr; width: auto; }
}

/* ==========================================================================
   Additions for the real form — none of this is in the mock-up
   ========================================================================== */

/* A window shorter than the page scrolls instead of cutting it off. The mock-up's overflow:hidden
   squeezed the top bar and hid the footer on a 1366 x 768 laptop, and the Sign in button once the
   page was zoomed. Where the page fits — the mock-up's 1440 x 900 — nothing changes. */
body { overflow-x: hidden; overflow-y: auto; }
.nav, .foot { flex-shrink: 0; }

/* The logo carries its real width and height, so the browser keeps its space before it loads;
   the width follows the 38px height, as in the mock-up. */
.logo img { width: auto; }

/* "Keep me signed in": the mock-up hid the box with display:none, which also takes it out of the
   Tab order. Invisible instead, with the drawn box showing where the focus is. */
.row input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.row input:focus-visible + .cb { outline: 2px solid var(--blue); outline-offset: 2px; }

/* A notice (after a password reset) and the reasons a sign-in was refused, in the space the
   Admin / Employee switch used to take. */
.msgs > * { margin-bottom: 16px; }
.msg { font-size: 13px; line-height: 1.45; padding: 9px 12px; border-left: 3px solid var(--blue); background: #e3eefa; color: var(--ink); }
.msg ul { list-style: none; }
.msg li + li { margin-top: 4px; }
.validation-summary-valid { display: none; }
.validation-summary-errors { border-left-color: #c62828; background: #fdecec; color: #8e1c1c; }
.fld input.input-validation-error { border-bottom-color: #c62828; }

/* The card's fields share the class .fld with the invoice lines in the capture scene, and so take
   that rule's flex row: label on the left, box on the right, as in the mock-up. Pinned to the top of
   the row, the label sat above the line the text is typed on; on the baseline it sits on it. */
.login .fld { align-items: baseline; }

/* Under 1000px the card is the full width of the page and, while it is open, comes first: on a
   phone, signing in is what the page is for. The panel out of sight takes no room. */
@media (max-width: 1000px) {
  .login { width: 100%; }
  .panel.hide { display: none; }
  .login-open .right { order: -1; }
}

/* A phone has no room for the logo, "Schedule a demo" and the button on one line; the button
   stays, since signing in is what the page is for there. In the card, each label sits above its box
   so a long work email has the full width to be typed into. */
@media (max-width: 540px) {
  .lnk { display: none; }
  .login { padding: 26px 22px 22px; }
  .login .fld { display: block; }
}

/* Reduced motion: every animation and transition finishes at once, so everything the animations
   reveal — the extracted values, the underline, the card — is simply there. */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
