/* Tip 003: a Lumno sign-in page whose art panel runs the wallpaper filters
   live. The portrait canvas splits in two: the result on top (the sign-in
   card over a soft cream and blue backdrop), the controls below in dark mode. */

.tip-stage:has(> .tip-credit) { padding: 0; }

/* The title's palette colors, registered so they can ease between palettes. */
@property --ink-a {
  syntax: '<color>';
  inherits: false;
  initial-value: #2b3520;
}

@property --ink-b {
  syntax: '<color>';
  inherits: false;
  initial-value: #66784a;
}

/* ---------- The two areas ---------- */

.area-top,
.area-bottom {
  position: absolute;
  left: 0;
  right: 0;
}

.area-top {
  top: 0;
  height: 700px;
  overflow: hidden;
  background: #f5f2e9;
}

.area-top[data-bg="tree"] {
  background: url('media/backdrop-tree.jpg') center 42% / cover no-repeat;
}

.area-top[data-bg] .area-top-glow { display: none; }

/* Larger than the area's diagonal, so it can turn without baring a corner. */
.area-top-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1360px;
  height: 1360px;
  margin: -680px 0 0 -680px;
  background: url('media/backdrop.png') center / cover no-repeat;
}

.area-bottom {
  top: 700px;
  bottom: 0;
  background: #151515;
}

/* ---------- Card: art panel on the left, the form on the right ----------
 * Laid out at a desktop page's size (1280 x 800, 14px type), then scaled as a
 * whole to the canvas width, so it keeps a real page's proportions.
 */

.card {
  position: absolute;
  left: 79px;
  top: 62px;
  width: 1280px;
  height: 800px;
  transform: scale(0.72);
  transform-origin: 0 0;
  border-radius: 40px;
  background: #ffffff;
  /* Kept short so it ends inside the canvas. */
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.05),
    0 30px 60px -30px rgba(30, 36, 50, 0.4);
}

.art {
  position: absolute;
  left: 24px;
  top: 24px;
  bottom: 24px;
  width: 600px;
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
}

.art-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* The homepage slogan: a roman lead and an italic accent line. */
.art-title {
  position: absolute;
  left: 40px;
  bottom: 40px;
  margin: 0;
  font-family: var(--tip-font-serif);
  font-size: 58px;
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.035em;
  /* Printed onto the art: a translucent gradient from the palette's darkest
     steps, multiplied over the filtered picture so its dots and glyphs show
     through the letters. */
  background: linear-gradient(180deg, var(--ink-a) 0%, var(--ink-b) 100%);
  transition: --ink-a 400ms ease, --ink-b 400ms ease;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  mix-blend-mode: multiply;
  opacity: 0.9;
}

/* The italic line tucks up under the first, so the two interlock; it runs
   wider, so its "d" rises just past the comma above instead of into it. */
.art-title em {
  display: block;
  margin-top: -0.12em;
  padding-left: 0.04em;
  font-family: var(--tip-font-accent);
  font-size: 1.38em;
  font-style: italic;
  letter-spacing: -0.015em;
}

/* ---------- Form ----------
 * One rhythm: 8px inside a group (label to field, title to subtitle),
 * 20px between groups, 28px between sections. Ink steps down from the
 * title (#111827) to labels (#374151), body (#6b7280) and hints (#9ca3af).
 */

.form {
  position: absolute;
  left: 624px;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-inner {
  width: 360px;
  color: #111827;
}


.form h1 {
  margin: 0;
  font-family: var(--tip-font-serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* The app icon closes the title, as on the homepage hero, but upright. */
.title-icon {
  display: inline-block;
  width: 0.92em;
  height: 0.92em;
  margin-left: 0.3em;
  border-radius: 0.22em;
  vertical-align: -0.11em;
}

.form-sub {
  margin: 8px 0 28px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.field { display: block; }
.field + .field { margin-top: 20px; }

.field > span {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}

.input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 400;
}

.input[data-empty] { color: #9ca3af; }
.input svg { width: 18px; height: 18px; color: #9ca3af; }

.form .sk {
  width: 100%;
  height: 44px;
  margin-top: 24px;
  font-size: 14px;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
}

.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
}

/* The alternative sign-in steps back: flat, hairline edge, lighter ink. */
.social {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #374151;
  font-size: 14px;
  font-weight: 500;
}

.social img { width: 16px; height: 16px; }

.form-foot {
  margin: 20px 0 0;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

.form-foot b { color: #374151; font-weight: 500; }

/* ---------- The new tab's wallpaper settings, set straight on the canvas ---------- */

/* Centered on the canvas under the sign-in card. The anchor carries the
   position, since zoom on the card would scale its offsets too. */
.fx-anchor {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 730px;
  translate: -50% 0;
}

.fx-card {
  position: relative;
  width: 420px;
  zoom: 1.8;
  color: #e5e5e5;
  font-size: 13px;
}

.fx-row {
  display: grid;
  grid-template-columns: 136px 1fr;
  align-items: center;
  gap: 12px;
  height: 46px;
  overflow: hidden;
  transition: height 280ms cubic-bezier(0.32, 0.72, 0, 1), opacity 200ms ease;
}

/* Sample tones only applies to ASCII. */
.fx-row[data-hidden] { height: 0; opacity: 0; }

.fx-value {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-value .x-range-slider { flex: 1; }

/* Slider: an outlined rounded-rectangle track, filled up to the value, with
   an upright rounded handle; the radius matches the tabs and number boxes. */
.x-range-slider-input {
  height: 32px;
}

.x-range-slider-input::-webkit-slider-runnable-track {
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.12) 0 var(--x-range-slider-percent, 50%),
    rgba(255, 255, 255, 0.7) var(--x-range-slider-percent, 50%) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.x-range-slider-input::-webkit-slider-thumb {
  width: 9px;
  height: 30px;
  margin-top: -4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #404859 0%, #273042 100%);
  box-shadow:
    0 0 0 1px #12161f,
    0 2px 4px -1px rgba(15, 23, 42, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 150ms ease;
}

.x-range-slider-input:not(:disabled):hover::-webkit-slider-thumb,
.x-range-slider-input:not(:disabled):focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 1px #12161f,
    0 2px 4px -1px rgba(15, 23, 42, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.x-range-slider-input:not(:disabled):active::-webkit-slider-thumb {
  transform: scaleY(1.08);
}

.fx-num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 52px;
  height: 30px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  font-variant-numeric: tabular-nums;
}

.fx-num small { color: #6b7280; font-size: 11px; }

/* Segmented choice with a sliding knob, as in the panel. */
.seg {
  position: relative;
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  padding: 2px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.05);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.seg-knob {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

.seg span {
  position: relative;
  padding: 7px 10px;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.seg span[data-on] { color: #111827; }
.seg span { cursor: pointer; }


.seg-knob {
  transition:
    transform 280ms cubic-bezier(0.32, 0.72, 0, 1),
    width 280ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* ---------- Credit on the canvas, under the card ---------- */

.tip-credit { bottom: 38px; }

/* ---------- Controls in dark mode ---------- */

.fx-num {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f5;
}

.fx-num small { color: #9a9a9a; }

.seg {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.seg-knob {
  background: #3d3d3d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.seg span { color: #8f8f8f; }
.seg span[data-on] { color: #f5f5f5; }

.x-range-slider-input::-webkit-slider-runnable-track {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2) 0 var(--x-range-slider-percent, 50%),
    rgba(255, 255, 255, 0.05) var(--x-range-slider-percent, 50%) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* A light handle reads on the dark track. */
.x-range-slider-input::-webkit-slider-thumb,
.x-range-slider-input:not(:disabled):hover::-webkit-slider-thumb,
.x-range-slider-input:not(:disabled):focus-visible::-webkit-slider-thumb {
  background: linear-gradient(180deg, #fafafa 0%, #d6d6d6 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 #ffffff;
}


/* The credit sits in the dark area: light ink, and the wordmark's dark twin.
   It also resets the controls to our recommended values. */
.tip-credit { color: #8f8f8f; bottom: 34px; cursor: pointer; }
.tip-credit img { filter: invert(1); }

/* Palette swatches: round, the selected one ringed. */
.swatches {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swatches button {
  all: unset;
  --lumno-corner-shape: round;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.swatches button[data-on] {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 0 2px #151515,
    0 0 0 3.5px #f5f5f5;
}
