/* ==========================================================================
   Unyte base styles: tokens, reset, glass marks, glass buttons.
   Shared by every page. Page layouts live in home.css, auth.css and dashboard.css.
   ========================================================================== */

:root {
  color-scheme: dark;

  --black: #000;
  --white: #fff;
  --muted: #9b9494;         /* "(coming soon)" */
  --cue: #c5c3c3;           /* "scroll down"   */
  --blue: 0 153 255;        /* Log In tint     */
  --silver: 217 217 217;    /* Sign Up tint    */

  /* SF Pro on Apple devices (the design's typeface); Inter elsewhere. */
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
          "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Logo glass tuning ------------------------------------------------------ */
  --glass-opacity: .07;     /* frost/tint inside each hexagon (0-1)           */
  --glass-sheen: .12;       /* soft highlight pooled toward the light source  */
  --edge-light: 1;          /* strength of the edge lights (0 = off, 1.3 = strong) */
  /* Refraction strength lives in the #lens filter (feDisplacementMap scale).  */
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --------------------------------------------------------------------------
   Vector marks (Unyte logo + app icons) with liquid-glass hexagon
   -------------------------------------------------------------------------- */
.mark {
  --blur: 5px;
  position: relative;
  aspect-ratio: 78.0825 / 90.824;
  flex: none;
}
.mark--lg { aspect-ratio: 194.929 / 226.738; }

.mark__glass,
.mark__rim,
.mark__hex,
.mark__tri,
.mark__glyph { position: absolute; }

/* Glass lens: Figma Glass (refraction .8, depth 29, dispersion .53, frost 5, light 234°) */
.mark__glass {
  inset: 0;
  clip-path: url(#hex-clip);
  background:
    radial-gradient(90% 70% at var(--lx, 12%) var(--ly, 92%), rgb(255 255 255 / var(--glass-sheen)), transparent 60%),
    radial-gradient(70% 55% at calc(102% - var(--lx, 12%)) calc(100% - var(--ly, 92%)),  rgb(255 255 255 / calc(var(--glass-sheen) * .7)), transparent 60%),
    radial-gradient(closest-side, transparent 62%, rgb(255 255 255 / calc(var(--glass-opacity) * .9)) 100%),
    rgb(255 255 255 / var(--glass-opacity));
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.35) brightness(1.08);
          backdrop-filter: blur(var(--blur)) saturate(1.35) brightness(1.08);
}
/* Edge refraction where the browser supports SVG filters in backdrop-filter (Chromium) */
.has-lens .mark__glass {
  -webkit-backdrop-filter: url(#lens) blur(var(--blur)) saturate(1.35) brightness(1.08);
          backdrop-filter: url(#lens) blur(var(--blur)) saturate(1.35) brightness(1.08);
}
.mark__rim { inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

/* Hexagon outline - small mark (polygon1.svg) */
.mark__hex { left: 7.95%; top: 7.55%; width: 84.1%; height: 83.82%; }
.mark__hex img { position: absolute; inset: 1.43% 0; width: 100%; height: 97.14%; max-width: none; }

/* Large mark (polygon2.svg + polygon5.svg) */
.mark--lg .mark__hex { left: 7.95%; top: 7.555%; width: 84.1%; height: 83.82%; }
.mark--lg .mark__hex img { inset: .57% 0; height: 98.86%; }
.mark__tri { left: 12.45%; top: 11.51%; width: 75.1%; aspect-ratio: 1; }
.mark__tri > div { position: absolute; inset: 1.37% 7.7% 25% 7.7%; }
.mark__tri img { width: 100%; height: 100%; max-width: none; }

/* Glyphs inside the small marks */
.mark__glyph img { position: absolute; width: auto; height: auto; max-width: none; }
.mark__glyph--wave { left: 11.36%; top: 12.12%; width: 77.28%; height: 76.19%; }
.mark__glyph--wave img { left: -3.59%; top: 22.29%; width: 107.18%; height: 54.45%; }
.mark__glyph--fold { left: 11.36%; top: 30.49%; width: 77.28%; height: 38.73%; }
.mark__glyph--fold img { left: -2.53%; top: -8.95%; width: 103.27%; height: 118.82%; }
.mark__glyph--page { left: 17.66%; top: 17.62%; width: 32.66%; height: 64.41%; }
.mark__glyph--page img { left: -4.57%; top: 0; width: 118.3%; height: 100%; }

/* --------------------------------------------------------------------------
   Brand ("Unyte")
   -------------------------------------------------------------------------- */
.brand {
  container-type: inline-size;
  display: grid;
  justify-items: center;
}
.brand .mark { width: 41.21cqw; --blur: 1.057cqw; }
.brand__name {
  font-size: 20.294cqw;
  font-weight: 900;
  letter-spacing: -.2114cqw;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

@property --pa { syntax: "<number>"; inherits: true; initial-value: 0; }

/* Glass edge light gradients (referenced by the SVG defs) */
.er0 { stop-opacity: calc(.95 * var(--edge-light, 1)); }
.er1 { stop-opacity: calc(.38 * var(--edge-light, 1)); }
.er2 { stop-opacity: calc(.07 * var(--edge-light, 1)); }
.er3 { stop-opacity: calc(.38 * var(--edge-light, 1)); }
.er4 { stop-opacity: calc(.9 * var(--edge-light, 1)); }
.eb0 { stop-opacity: calc(.6 * var(--edge-light, 1)); }
.eb1 { stop-opacity: calc(.14 * var(--edge-light, 1)); }
.eb2 { stop-opacity: 0; }
.eb3 { stop-opacity: calc(.14 * var(--edge-light, 1)); }
.eb4 { stop-opacity: calc(.55 * var(--edge-light, 1)); }

/* Glass surface shared by buttons, fields and the dock */
/* --------------------------------------------------------------------------
   Glass buttons
   -------------------------------------------------------------------------- */
.btn {
  --tint: var(--blue);
  --tint-a: .3;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  border-radius: 999px;
  color: var(--white);
  font-weight: 274;
  line-height: 1;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  scale: 1;
  transition:
    transform .5s var(--ease),
    filter .5s var(--ease),
    translate .55s cubic-bezier(.34, 1.56, .64, 1),
    scale .55s cubic-bezier(.34, 1.56, .64, 1);
}
.btn--signup { --tint: var(--silver); --tint-a: .2; }

.btn__glass,
.glass {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--px, 50%) var(--py, -80%), rgb(255 255 255 / var(--pa, 0)), transparent 66%),
    linear-gradient(135deg, rgb(255 255 255 / 0) 30%, rgb(255 255 255 / .05) 100%),
    rgb(var(--tint) / var(--tint-a));
  -webkit-backdrop-filter: blur(6px) saturate(1.5) brightness(1.08);
          backdrop-filter: blur(6px) saturate(1.5) brightness(1.08);
  box-shadow:
    inset 0 0 0 .5px rgb(255 255 255 / .10),
    inset 1px 1px 1.5px rgb(255 255 255 / .12),
    inset -1px -1px 1.5px rgb(255 255 255 / .06);
  transition: background-color .5s var(--ease), box-shadow .5s var(--ease);
}
/* Specular rim (light angle −45°) */
.btn__glass::before,
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgb(255 255 255 / .50),
    rgb(255 255 255 / .09) 32%,
    rgb(255 255 255 / .09) 68%,
    rgb(255 255 255 / .38));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.btn:focus-visible { outline: 2px solid rgb(255 255 255 / .9); outline-offset: 4px; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); filter: brightness(1.18); transition: transform .5s var(--ease), filter .5s ease, translate .14s ease-out, scale .5s cubic-bezier(.34, 1.56, .64, 1); }
  .btn:hover .btn__glass,
.glass { box-shadow: inset 0 0 0 .5px rgb(255 255 255 / .2), inset 1px 1px 2px rgb(255 255 255 / .22), inset -1px -1px 2px rgb(255 255 255 / .12); }
}
.btn:active { transform: translateY(0); scale: .965; filter: brightness(1.1); transition-duration: .15s; }
