/* Sign-in pages of the thesis archive. Same tokens as the site (webapp/hof/
   static/css/app.css): Infineon ocean and engineering, Source Sans 3.
   No PatternFly. */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-ext.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --black: #1d1d1d;
  --white: #ffffff;
  --eng-100: #f7f7f7;
  --eng-200: #eeeded;
  --eng-300: #bfbbbb;
  --eng-400: #8d8786;
  --eng-500: #575352;
  --eng-600: #3c3a39;
  --ocean-100: #dff4f3;
  --ocean-200: #b8deda;
  --ocean-500: #0a8276;
  --ocean-600: #08665c;
  --ocean-700: #06534b;
  --red-100: #fbe9ed;
  --red-500: #cd002f;
  --red-600: #a2001e;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --radius: 2px;
}

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

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body.hof {
  margin: 0; min-height: 100dvh; background: var(--white); color: var(--black);
  font: 400 1rem/1.5 "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  accent-color: var(--ocean-500); caret-color: var(--ocean-500);
}
::selection { background: var(--ocean-200); color: var(--black); }
h1, p { margin: 0; }
a { color: var(--ocean-600); text-decoration-thickness: 1px; text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--ocean-500); outline-offset: 2px; border-radius: var(--radius); }

.hof-shell { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }

/* ---- the picture --------------------------------------------------------
   Streams of particles that build leaves, drawn on the canvas by the web app's
   /assets/js/visual.js.
   On a phone it is a low band, so the form stays in view above the keyboard. */

.hof-vis {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(8.75rem, 38vw, 10rem);
  background: #07594f; color: var(--white);
}
.hof-vis__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hof-vis__text { position: relative; z-index: 1; margin: 0; padding: 1.05rem 1.25rem 0; max-width: 17.5rem; }
.hof-vis__unit { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ocean-100); }
.hof-vis__name { display: block; margin-top: .3rem; font-size: 1.36rem; font-weight: 300; line-height: 1.1; letter-spacing: -.012em; }
.hof-vis__sub { display: none; }
.hof-vis ::selection { background: var(--white); color: var(--ocean-700); }

/* ---- the form ----------------------------------------------------------- */

.hof-main {
  display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
  padding: clamp(1.75rem, 6vw, 4rem) max(1.25rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
}
.hof-card { width: 100%; max-width: 25rem; }
.hof-logo { display: block; width: 7.25rem; height: auto; margin: 0 0 clamp(1.75rem, 5vw, 2.75rem) -.2rem; }

.hof-head h1, #kc-page-title { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 300; line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.hof-intro { margin-top: .75rem; color: var(--eng-600); font-size: 1.06rem; }
.hof-sent { margin-top: .75rem; display: grid; gap: .25rem; color: var(--eng-600); font-size: 1.06rem; overflow-wrap: anywhere; }
.hof-sent strong { color: var(--black); font-weight: 600; }
.hof-sent a { justify-self: start; font-size: .98rem; }

.hof-form { margin-top: 1.75rem; }
.hof-field { display: grid; gap: .4rem; }
.hof-label { font-weight: 600; }
.hof-input {
  width: 100%; height: 3.1rem; padding: 0 .9rem;
  border: 1px solid var(--eng-400); border-radius: var(--radius);
  background: var(--white); color: var(--black); font: inherit; font-size: 1.08rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hof-input::placeholder { color: color-mix(in srgb, var(--eng-500) 88%, var(--white)); }
.hof-input:focus { outline: none; border-color: var(--ocean-500); box-shadow: 0 0 0 3px var(--ocean-100); }
.hof-input[aria-invalid="true"] { border-color: var(--red-500); }
.hof-input--code {
  height: 3.6rem; text-align: center; font-size: 1.7rem; font-weight: 600;
  letter-spacing: .42em; padding-left: .42em; font-variant-numeric: tabular-nums;
}
.hof-error { color: var(--red-600); font-weight: 600; font-size: .98rem; }
.hof-hint { color: var(--eng-500); font-size: .94rem; }

.hof-buttons { margin-top: 1.25rem; display: grid; gap: .6rem; }
.hof-btn, #kc-content input[type="submit"], #kc-content button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  min-height: 3.1rem; padding: .6rem 1.2rem;
  border: 1px solid var(--ocean-500); border-radius: var(--radius);
  background: var(--ocean-500); color: var(--white);
  font: 600 1.08rem/1.2 "Source Sans 3", "Segoe UI", system-ui, sans-serif; text-decoration: none; cursor: pointer;
  touch-action: manipulation; -webkit-appearance: none; appearance: none;
  transition: background-color .15s ease, border-color .15s ease, transform .14s var(--ease-out);
}
.hof-btn:active, #kc-content input[type="submit"]:active { transform: scale(.98); }
.hof-btn:disabled, #kc-content input[type="submit"]:disabled { background: var(--eng-300); border-color: var(--eng-300); color: var(--eng-600); cursor: default; }
#kc-content input.hof-btn--link, #kc-content input.hof-btn--link:disabled {
  min-height: 2.75rem; background: transparent; border-color: transparent; color: var(--ocean-600); font-weight: 600;
}
#kc-content input.hof-btn--link:disabled { color: var(--eng-500); }
@media (hover: hover) and (pointer: fine) {
  .hof-btn:hover:not(:disabled), #kc-content input[type="submit"]:hover:not(:disabled) { background: var(--ocean-600); border-color: var(--ocean-600); color: var(--white); }
  #kc-content input.hof-btn--link:hover:not(:disabled) { background: var(--ocean-100); border-color: transparent; color: var(--ocean-700); }
}

.hof-alert { margin-top: 1.25rem; padding: .8rem 1rem; border: 1px solid; border-radius: var(--radius); font-weight: 600; }
.hof-alert--error { background: var(--red-100); border-color: #efb9c5; color: var(--red-600); }
.hof-alert--warning { background: #fdf0e6; border-color: #f2c7a8; color: #8a3d0c; }
.hof-alert--success, .hof-alert--info { background: var(--ocean-100); border-color: var(--ocean-200); color: var(--ocean-700); }

/* Keycloak's own pages (error, sign-out, expired): plain text and links */
#kc-content p, #kc-content .instruction { margin-top: 1rem; color: var(--eng-600); font-size: 1.06rem; }
#kc-content form.form-actions { margin-top: 1.5rem; }
.hof-back { margin-top: 1.5rem !important; }
#kc-info-message { margin-top: 1rem; }

.hof-foot { width: 100%; max-width: 25rem; margin-top: clamp(2rem, 6vw, 3.5rem); padding-top: 1rem; border-top: 1px solid #d9d6d6; color: var(--eng-500); font-size: .94rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---- wide screens: the picture beside the form --------------------------- */

@media (min-width: 60rem) {
  .hof-shell { grid-template-rows: none; grid-template-columns: minmax(0, 1.12fr) minmax(26rem, 1fr); }
  .hof-vis { min-height: 100dvh; }
  .hof-vis__text { position: absolute; left: clamp(2.5rem, 5.4vw, 5.25rem); top: clamp(2.75rem, 9.5vh, 5.75rem); padding: 0; max-width: none; }
  .hof-vis__unit { font-size: .92rem; }
  .hof-vis__name { margin-top: .95rem; max-width: 6.9em; font-size: clamp(2.5rem, 4.2vw, 4.25rem); font-weight: 250; line-height: 1.02; letter-spacing: -.026em; text-wrap: balance; }
  .hof-vis__sub { display: block; margin-top: 1.35rem; font-size: 1.1rem; color: var(--ocean-100); }
  .hof-main { justify-content: center; padding-inline: clamp(2rem, 5vw, 5rem); }
}

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