/* GOJOB-550: the sign-in and sign-up page (views/login.php), drawn by Oleksii like the homepage (landing.css): the art panel on
   the left, the Sign up / Log in form on the right. Scripts in login.js. */
:root {
  --kale: #003d29;
  --carrot: #ffa323;
  --cashew-100: #faf1e5;
  --cashew-80: #32302e;
  --cashew-60: #716c67;
  --cashew-025: #fefbf9;
  --spinach: #3a682f;
  --lime: #0aad0a;
  --cantaloupe-20: #fff1e2;
  --page-bg: #fdf8f2;
  --toggle-bg: #efe1cf;
  --line: #e1d9ce;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --pad: 30px;
}

*, *::before, *::after { box-sizing: border-box; }
h1, h2, p, ul { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--kale); outline-offset: 2px; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--kale);
  font-family: "Geologica", sans-serif;
  font-weight: 400;
}

/* sign up / log in copy switch */
[data-mode="signup"] [data-only="login"],
[data-mode="login"] [data-only="signup"] { display: none; }
/* the email form opens from its button (login.js); without JavaScript it is open and the button is not there */
.js [data-email="closed"] .email { display: none; }
[data-email="open"] #email-open, html:not(.js) #email-open { display: none; }

.page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--pad);
}

/* ---- art panel ---- */
.art {
  position: relative;
  flex: none;
  width: 575px; /* 5 of 12 grid columns (the form takes 7) */
  min-height: 600px; /* 1280x720 (660 inside the page padding) must fit without scrolling */
  /* the whole panel tilts toward the cursor (--px/--py from login.js, same idea and numbers as the landing's steps picture); the text rides on a raised layer below */
  transform: perspective(1500px) rotateX(calc(var(--py, 0) * 2.7deg)) rotateY(calc(var(--px, 0) * -4.2deg));
  transform-style: preserve-3d;
}
/* panel colour + picture live on their own layer, so on load only the background fades in while the text rises */
.art__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--cashew-100);
}
/* the landing's hare clip (1920x836) sits on the bottom edge, scaled so its cream bottom fade is cropped away; object-position keeps the hare in the right part of the panel, the rest is cropped by the panel */
.art__video {
  position: absolute;
  left: 0; bottom: -97px; /* the clip's own cream fade and black last row sit below the panel edge */
  width: 100%; height: 700px;
  object-fit: cover;
  object-position: 40% 100%;
  translate: 0 clamp(0px, 900px - 100vh, 15px); /* short screens: sinks a little so the hills stay below the text */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%);
  mask-image: linear-gradient(to bottom, transparent, #000 22%); /* the clip's cream sky melts into the panel colour */
}
.art__copy {
  position: relative;
  transform: translate3d(calc(var(--px, 0) * 5px), calc(var(--py, 0) * -3px), 60px) scale(calc(1 - 60 / 1500)); /* 60px above the panel; scale() cancels the perspective growth */
  margin: 57px 70px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.art__logo, .panel__logo { display: block; width: 144px; height: 32px; }
.art__logo { margin-bottom: -10px; }
.panel__logo { display: none; }
.art__text { display: flex; flex-direction: column; gap: 14px; margin-top: 40px; }
.art__text h2 {
  width: 420px;
  font-size: 42px;
  font-weight: 600;
  line-height: 48px;
  letter-spacing: -1px;
}
.art__text p { font-size: 16px; line-height: 20px; color: var(--cashew-80); }
.points { list-style: none; display: flex; flex-direction: column; gap: 18px; margin-top: -10px; }
.points li { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 20px; font-weight: 600; }
.check {
  flex: none;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--carrot);
  color: var(--kale);
}
.check .ic { width: 12px; height: 12px; }

/* ---- form panel ---- */
.panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0 0; /* the form is centred in the white space: from the art panel to the page edge, from the page top to the legal line */
  padding: 0 var(--pad) 32px; /* the panel runs to the page edge, so without this the form touches it on narrow desktops (about 1000px) */
}
.form { width: 420px; max-width: 100%; margin: auto 0; display: flex; flex-direction: column; gap: 32px; }
.head { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.head__text { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.head h1 { font-size: 28px; font-weight: 600; line-height: 34px; letter-spacing: -.5px; text-align: center; }
.head p { font-size: 15px; line-height: 23px; color: var(--cashew-60); text-align: center; }
.head p strong { color: var(--kale); font-weight: 600; }

.toggle {
  position: relative;
  width: 100%;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--toggle-bg);
}
/* the white pill slides between the tabs (GSAP moves it, see login.js); flat, no shadow (tools/ui/CLAUDE.md) */
.toggle__thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 12px) / 2);
  border-radius: 8px;
  background: #fff;
}
[data-mode="login"] .toggle__thumb { transform: translateX(calc(100% + 4px)); } /* the start, before GSAP takes over (and without it) */
.tab {
  position: relative;
  flex: 1;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  color: #625c57; /* cashew-60 is 4.0:1 on the toggle track, this is 5.1:1 */
  transition: color 300ms ease, background-color 300ms ease;
}
.tab[aria-selected="true"] { color: var(--kale); font-weight: 600; }
.tab[aria-selected="false"]:hover { color: var(--kale); background: rgba(255, 255, 255, .5); }

.alert { padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: 14px; line-height: 20px; }
.form > .alert { margin-top: -12px; } /* closer to the tabs than the 32px between blocks */

.methods { display: flex; flex-direction: column; gap: 20px; }
.social { display: flex; flex-direction: column; gap: 12px; }

.btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid;
  border-radius: 8px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
}
.btn .badge, .btn > .ic, .btn .logo { margin-right: 8px; }
/* hover (same as the landing): a translucent circle grows from the pointer behind the text; --x/--y/--d are set by login.js. The 1px border of the filled buttons is dropped so the circle covers the whole button */
.btn { position: relative; isolation: isolate; overflow: hidden; }
.btn--google, .btn--linkedin { border: 0; }
.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--d, 150%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 400ms cubic-bezier(.4, 0, .2, 1);
}
.btn--email::before { background: var(--cantaloupe-20); }
.btn:hover::before { transform: translate(-50%, -50%) scale(1); }
.badge {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: #fff;
}
.btn--google { background: #fbbc05; border-color: #fbbc05; color: #202124; }
.btn--linkedin { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.btn--email { background: #fff; border-color: var(--line); color: var(--cashew-80); }
/* "Last used" (GOJOB-136): a small pill at the button's right end */
.last-used { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 2px 8px; border-radius: 9999px; background: #fff; color: var(--kale); font-size: 11px; line-height: 14px; font-weight: 600; }
.btn--email .last-used { background: var(--cantaloupe-20); }

.divider { display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 16px; color: var(--cashew-60); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.email { display: flex; flex-direction: column; gap: 20px; }
.fields { display: flex; flex-direction: column; gap: 12px; }
.pw { display: flex; flex-direction: column; gap: 6px; }

.input {
  position: relative;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.input:focus-within { border-color: var(--kale); }
.input span { font-size: 12px; font-weight: 500; line-height: 15px; color: var(--cashew-80); }
.input input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 14px;
  line-height: 18px;
  height: 18px;
}
.input:has(.eye) input { padding-right: 32px; }
.input input::placeholder { color: var(--cashew-60); opacity: 1; }
.eye {
  position: absolute;
  top: 50%; right: 4px; /* 44x44 hit area, the icon stays 16px from the edge */
  transform: translateY(-50%);
  display: grid;
  padding: 12px;
  border: 0;
  background: none;
  color: var(--cashew-60);
}
html:not(.js) .eye { display: none; }
/* the honeypot field people never see (bots fill it in) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.hint, .note { font-size: 13px; line-height: 16px; color: var(--cashew-60); }
.note { text-align: center; }
.forgot { align-self: flex-end; font-size: 13px; font-weight: 500; }
.alt { display: flex; justify-content: center; gap: 24px; font-size: 14px; }

/* the underline sits at rest and slides out to the right on hover, then slides back in from the left */
.link { position: relative; display: inline-block; padding-bottom: 1px; line-height: 16px; color: var(--spinach); transition: color 300ms ease; }
.link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform 500ms cubic-bezier(.16, 1, 0.3, 1);
}
/* hidden until the reveal in login.js starts (it adds .rv only when motion is allowed) */
.rv .art__bg, .rv .art__logo, .rv .art__text, .rv .points, .rv .head, .rv .legal,
.rv .social .btn, .rv .divider, .rv #email-open, .rv .email, .rv .note, .rv .alert, .rv .alt, .rv .form > .submit { opacity: 0; }
.link:hover, .link:focus-visible { color: var(--lime); }
.link:hover::after, .link:focus-visible::after { transform: scaleX(0); transform-origin: right; }
@media (prefers-reduced-motion: reduce) { .btn::before, .link, .link::after, .tab { transition: none; } }

.submit { border: 0; background: var(--carrot); color: var(--kale); } /* size, font and the hover circle come from .btn */

.legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin-top: 24px; font-size: 13px; line-height: 16px; color: var(--cashew-60); text-align: center; }

/* ---- tablet / mobile: art panel goes away, the logo moves over the form ---- */
@media (max-width: 960px) {
  .art { display: none; }
  .panel { margin-right: 0; padding: 0 0 32px; }
  .panel__logo { display: block; margin: calc(var(--pad) + 6px) 0 32px; }
  .input input { font-size: 16px; line-height: 20px; height: 20px; } /* under 16px iOS Safari zooms the page on focus */
}
@media (max-width: 760px) {
  :root { --pad: 16px; }
  .head h1 { font-size: 24px; }
}
/* touch: tabs get a 44px target (the white thumb follows the track height) */
@media (pointer: coarse) {
  .tab { height: 44px; }
  .link::before { content: ""; position: absolute; inset: -12px 0; } /* taller invisible tap area for text links */
}
