/* FrostFolio: sign-in and registration */

:root {
    --ink: #10263a;        /* glacier ink: text, buttons, sheet background */
    --meltwater: #2e6f95;  /* links and focus */
    --rime: #e8f1f5;       /* page background */
    --frost: #f8fbfc;      /* input surfaces, text on ink */
    --slate: #4a6274;      /* secondary text */
    --edge: #c6d6de;       /* input borders */
    --alert: #a33a55;      /* errors */

    /* Same type as the signed-in pages: Archivo, expanded (125%) for the wordmark and headings. */
    --font: "Archivo", system-ui, -apple-system, sans-serif;
    --wide: 125%;
}

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

html,
body {
    margin: 0;
}

body {
    min-height: 100vh;
    background: var(--rime);
    color: var(--ink);
    font-family: var(--font);
    font-stretch: 100%;
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

/* ---------- The frozen contact sheet ---------- */

.sheet {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: clamp(2rem, 4vw, 3.5rem);
    background: var(--ink);
    color: var(--frost);
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    font-family: var(--font);
    font-stretch: var(--wide);
    font-size: 1.55rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1;
}

.wordmark__mark {
    width: 2rem;
    height: 2rem;
    flex: none;
}

.frames {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.5rem, 1.2vw, 0.9rem);
    width: 100%;
    max-width: 34rem;
}

.frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(248, 251, 252, 0.08);
    filter: saturate(0.55) brightness(1.05);
    transition: filter 1.2s ease;
}

/* The chill: a cool tint with frost gathered at the edges */
.frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(225, 240, 248, 0.28), rgba(225, 240, 248, 0.12));
    box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.35),
            inset 0 0 26px 2px rgba(235, 246, 252, 0.75);
    transition: opacity 1.2s ease, box-shadow 1.2s ease;
}

/* The thaw: color returns while the frost recedes into the edges.
   One frame thaws on load; any frame thaws on hover. */
.frame--thaw {
    animation: thaw-photo 2.6s 0.6s ease-out forwards;
}

.frame--thaw::after {
    animation: thaw-frost 2.6s 0.6s ease-out forwards;
}

.frame:hover {
    filter: saturate(1) brightness(1);
}

.frame:hover::after {
    opacity: 0;
    box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0),
            inset 0 0 0 0 rgba(235, 246, 252, 0);
}

@keyframes thaw-photo {
    to {
        filter: saturate(1) brightness(1);
    }
}

@keyframes thaw-frost {
    55% {
        opacity: 0.8;
        box-shadow:
                inset 0 0 0 1px rgba(255, 255, 255, 0.2),
                inset 0 0 10px 0 rgba(235, 246, 252, 0.45);
    }
    to {
        opacity: 0;
        box-shadow:
                inset 0 0 0 1px rgba(255, 255, 255, 0),
                inset 0 0 0 0 rgba(235, 246, 252, 0);
    }
}

/* The "photos" under the ice */
.frame--dusk {
    background:
            radial-gradient(circle at 68% 40%, #ffdcaa 0 9%, transparent 10%),
            linear-gradient(180deg, #f2a97e 0 54%, #3d4a73 54% 100%);
}

.frame--pines {
    background:
            radial-gradient(ellipse 70% 45% at 20% 72%, #2c4436 0 60%, transparent 61%),
            linear-gradient(180deg, #cfe3e8 0 42%, #5f8a72 42% 100%);
}

.frame--night {
    background:
            radial-gradient(circle at 74% 26%, #f4f1dc 0 5%, transparent 6%),
            linear-gradient(180deg, #1d2a4f 0 68%, #0f1730 68% 100%);
}

.frame--dunes {
    background:
            radial-gradient(ellipse 85% 40% at 30% 78%, #b5764f 0 60%, transparent 61%),
            linear-gradient(180deg, #f6e2c2 0 46%, #d59a6a 46% 100%);
}

.frame--coast {
    background:
            radial-gradient(circle at 30% 28%, #fff4d6 0 7%, transparent 8%),
            linear-gradient(180deg, #a9d8e6 0 48%, #3f86a6 48% 78%, #e9dcc0 78% 100%);
}

.frame--snow {
    background:
            radial-gradient(ellipse 60% 30% at 70% 40%, #6f8ea6 0 60%, transparent 61%),
            linear-gradient(180deg, #a7c2d4 0 38%, #f1f6f9 38% 100%);
}

.sheet__note {
    max-width: 32ch;
    margin: 0;
    color: rgba(248, 251, 252, 0.72);
    font-size: 0.9375rem;
}

/* ---------- The form panel ---------- */

.panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem);
}

.panel__inner {
    width: 100%;
    max-width: 24rem;
}

.panel h1 {
    margin: 0 0 0.5rem;
    font-family: var(--font);
    font-stretch: var(--wide);
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 640;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.lede {
    margin: 0 0 2rem;
    color: var(--slate);
}

.notice {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--meltwater);
    border-radius: 0 8px 8px 0;
    background: #dcebf2;
    font-size: 0.9375rem;
}

.notice--error {
    border-left-color: var(--alert);
    background: #f6e4ea;
    color: #6e2238;
}

.field {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.field label {
    font-size: 0.9375rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--edge);
    border-radius: 10px;
    background: var(--frost);
    color: var(--ink);
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
    outline: none;
    border-color: var(--meltwater);
    box-shadow: 0 0 0 3px rgba(46, 111, 149, 0.22);
}

.field input[aria-invalid="true"] {
    border-color: var(--alert);
}

.hint,
.field-error {
    margin: 0;
    font-size: 0.875rem;
}

.hint {
    color: var(--slate);
}

.field-error {
    color: var(--alert);
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.25rem 0 0.75rem;
  color: var(--slate);
  font-size: 0.9375rem;
  cursor: pointer;
}

.remember input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.remember input:focus-visible {
  outline: 3px solid var(--meltwater);
  outline-offset: 2px;
}

.button {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: 10px;
    background: var(--ink);
    color: var(--frost);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.button:hover {
    background: #1b3a55;
}

.button:focus-visible,
.switch a:focus-visible {
    outline: 3px solid var(--meltwater);
    outline-offset: 3px;
}

.switch {
    margin: 1.75rem 0 0;
    color: var(--slate);
}

.switch a {
    color: var(--meltwater);
    font-weight: 600;
    text-underline-offset: 0.2em;
}

/* ---------- Small screens: the sheet becomes a strip ---------- */

@media (max-width: 860px) {
    .auth {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sheet {
        gap: 1.25rem;
        padding: 1.5rem 1.25rem;
    }

    .frames {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        max-width: none;
    }

    .frame {
        aspect-ratio: 3 / 4;
    }

    .panel {
        align-items: flex-start;
        padding-top: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .frame,
    .frame::after {
        transition: none;
    }

    .frame--thaw {
        animation: none;
        filter: none;
    }

    .frame--thaw::after {
        animation: none;
        opacity: 0;
    }
}