/* 25.10.26 REIMARI: sanamerkki + kirjautumis- ja rekisteröintisivu.
   Hyväksytty malli (Joakim: "B itäviitta on täydellinen ja kirjautumissivut myös"):
   vasemmalla tumma meri haaleine syvyyskäyrineen, oikealla lomake; puhelimessa meri on
   yläpalkki. Fontti Archivo (SIL OFL 1.1, static/vendor/fonts/archivo/LICENSE.txt)
   omalta palvelimelta kuten Inter. Värit:
     meri #0E2A38, itäviitta musta #111418 / keltainen #F2C200, aalto #1D6F78 / #5FB3B3. */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../vendor/fonts/archivo/archivo-latin-wght-normal.woff2') format('woff2');
  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: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../vendor/fonts/archivo/archivo-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

/* --- Sanamerkki --- */
.rm-wordmark {
  display: inline-flex; align-items: flex-end; line-height: 1;
  font-family: 'Archivo', var(--font-ui, system-ui), sans-serif; font-weight: 800; letter-spacing: -0.025em;
  color: #0E2A38; white-space: nowrap;
}
.rm-wordmark.rm-dark { color: #F4F6F6; }
.rm-wordmark .rm-i { width: 0.62em; height: 1.24em; margin: 0 0 -0.09em -0.03em; flex: 0 0 auto; display: block; }

/* --- Kirjautumissivu --- */
:root {
  --rm-sea: #0E2A38; --rm-ink: #0E2A38; --rm-sub: #4A5F69; --rm-faint: #5C6F78;
  --rm-line: #C9D4D8; --rm-line-soft: #D5DEE1; --rm-bg: #FFFFFF; --rm-on-sea: #F4F6F6;
  --rm-on-sea-sub: #B9CBD1; --rm-link: #1D6F78; --rm-focus: #1D6F78; --rm-danger: #B42318;
}
html.rm-auth, html.rm-auth body { height: 100%; }
body.rm-auth-page {
  margin: 0; min-height: 100%; display: flex; flex-wrap: wrap;
  background: var(--rm-bg); color: var(--rm-ink);
  font-family: 'Archivo', var(--font-ui, system-ui), sans-serif;
  -webkit-font-smoothing: antialiased;
}
.rm-sea {
  flex: 1 1 520px; min-height: 100vh; min-height: 100dvh; position: relative; overflow: hidden;
  background: var(--rm-sea); color: var(--rm-on-sea);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px 64px; box-sizing: border-box;
}
.rm-sea > svg.rm-contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rm-contours g { fill: none; stroke: #5FB3B3; stroke-width: 1.4; opacity: 0.22; }
.rm-sea > *:not(svg) { position: relative; }
.rm-tagline { max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.rm-tagline p { margin: 0; }
.rm-tagline .rm-t1 { font-size: 34px; font-weight: 600; line-height: 1.18; letter-spacing: -0.5px; }
.rm-tagline .rm-t2 { font-size: 17px; line-height: 1.55; color: var(--rm-on-sea-sub); }

.rm-main {
  flex: 999 1 480px; min-width: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; padding: 32px 40px; box-sizing: border-box;
}
.rm-top { display: flex; justify-content: flex-end; }
.rm-lang {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--rm-line-soft); border-radius: 8px;
  background: var(--rm-bg); color: var(--rm-ink); font: inherit; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.rm-center { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.rm-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 20px; }
.rm-head { display: flex; flex-direction: column; gap: 6px; }
.rm-head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.4px; }
.rm-head p { margin: 0; font-size: 15px; color: var(--rm-sub); }
.rm-field { display: flex; flex-direction: column; gap: 8px; }
.rm-field label { font-size: 14px; font-weight: 600; }
.rm-field .rm-hint { font-size: 13px; color: var(--rm-sub); line-height: 1.4; margin: -2px 0 0; }
.rm-hint { font-size: 13px; color: var(--rm-sub); line-height: 1.45; margin: 0; }
.rm-optional { font-weight: 500; color: var(--rm-sub); }
.rm-forgot { margin: -8px 0 0; text-align: right; font-size: 14px; }
.rm-btn-link { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
.rm-btn-link:hover { color: #fff; }
.rm-input {
  height: 48px; padding: 0 14px; border: 1px solid var(--rm-line); border-radius: 8px;
  font: inherit; font-size: 16px; color: var(--rm-ink); background: var(--rm-bg); box-sizing: border-box; width: 100%;
}
.rm-input:focus-visible, .rm-lang:focus-visible, .rm-btn:focus-visible, .rm-iconbtn:focus-visible, .rm-link:focus-visible {
  outline: 2px solid var(--rm-focus); outline-offset: 2px;
}
.rm-btn {
  height: 50px; border: none; border-radius: 8px; background: var(--rm-sea); color: #fff;
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 4px;
}
.rm-btn:hover { background: #163A4B; }
.rm-switch { margin: 6px 0 0; font-size: 15px; color: var(--rm-sub); text-align: center; }
.rm-link { color: var(--rm-link); font-weight: 700; text-decoration: none; }
.rm-link:hover { color: var(--rm-ink); text-decoration: underline; }
.rm-flash {
  display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 8px;
  border: 1px solid rgba(180,35,24,0.35); background: rgba(180,35,24,0.06); color: var(--rm-danger);
  font-size: 14px; font-weight: 600; line-height: 1.4;
}
.rm-flash.rm-ok { border-color: rgba(29,111,120,0.4); background: rgba(29,111,120,0.07); color: var(--rm-link); }
.rm-captcha { display: flex; align-items: center; gap: 10px; }
.rm-captcha img { height: 56px; width: auto; border-radius: 8px; background: #fff; padding: 3px; border: 1px solid var(--rm-line-soft); }
.rm-iconbtn {
  height: 48px; width: 48px; flex: 0 0 48px; border: 1px solid var(--rm-line); border-radius: 8px;
  background: var(--rm-bg); color: var(--rm-ink); cursor: pointer; font-size: 15px;
}
.rm-slots { font-size: 13px; color: var(--rm-sub); }
.rm-disclaimer { margin: 0; font-size: 12px; line-height: 1.5; color: var(--rm-faint); text-align: center; }

/* Puhelin / kapea: meri = yläpalkki, lomake alla. */
@media (max-width: 899px) {
  body.rm-auth-page { flex-direction: column; flex-wrap: nowrap; }
  .rm-sea {
    flex: 0 0 auto; min-height: 0; padding: calc(env(safe-area-inset-top, 0px) + 24px) 24px 28px; gap: 22px;
    justify-content: flex-start;
  }
  .rm-sea .rm-row { display: flex; justify-content: space-between; align-items: center; }
  .rm-sea .rm-wordmark { font-size: 30px !important; }
  .rm-tagline { gap: 0; }
  .rm-tagline .rm-t1 { font-size: 22px; line-height: 1.25; letter-spacing: 0; }
  .rm-tagline .rm-t2 { display: none; }
  .rm-main { flex: 1 0 auto; min-height: 0; padding: 28px 24px calc(env(safe-area-inset-bottom, 0px) + 20px); }
  .rm-main .rm-top { display: none; }
  .rm-center { align-items: flex-start; padding: 0 0 24px; }
  .rm-form { max-width: 480px; margin: 0 auto; }
  .rm-head h1 { font-size: 24px; }
  .rm-head p { display: none; }
  .rm-head p.rm-show, .rm-head p.rm-slots { display: block; }
  .rm-input { height: 50px; }
  .rm-btn { height: 52px; }
  .rm-lang.rm-on-sea { border-color: rgba(244,246,246,0.35); background: transparent; color: var(--rm-on-sea); padding: 0 12px; }
}
@media (min-width: 900px) {
  .rm-sea .rm-lang.rm-on-sea { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
