/* UNITEKNO corporate site.
 *
 * No framework, no build step, no external requests. The last of those is not
 * minimalism for its own sake: the company's product position is that it runs
 * no telemetry and no vendor cloud, and a site that loads a third-party font or
 * analytics script while saying so is not credible. Every colour, glyph, and
 * animation here is inline or generated.
 *
 * Motion is deliberate and small. This is a company page a reviewer will open
 * to verify a business exists, not a product launch, so nothing moves that does
 * not help the eye find where to start. `prefers-reduced-motion` removes all of
 * it, and the page is complete without a single frame having played.
 */

:root {
  color-scheme: light dark;

  --ink: #0a1520;
  --ink-soft: #4c5a6b;
  --ink-faint: #8494a6;
  --ground: #eef3f9;
  --ground-deep: #e2ebf6;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;
  --edge: rgba(10, 37, 64, 0.09);
  --edge-strong: rgba(10, 37, 64, 0.16);
  --accent: #0b6a9e;
  --accent-pane: #a3d5f2;
  --accent-alt: #8fe3d8;
  /* The breath's floor and ceiling. Named because the keyframes set opacity,
   * so a plain `body::after { opacity }` override is dead the moment the
   * animation starts — which is how the dark-mode value below spent its life
   * doing nothing. Tokens are the only way both themes get a say. */
  --breathe-low: 0.24;
  --breathe-high: 0.62;

  --shadow: 0 1px 2px rgba(10, 37, 64, 0.06), 0 18px 40px rgba(10, 37, 64, 0.07);
  --shadow-lift: 0 2px 4px rgba(10, 37, 64, 0.07), 0 28px 60px rgba(10, 37, 64, 0.11);
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f6fa;
    --ink-soft: #aebccc;
    --ink-faint: #7a8798;
    --ground: #080d14;
    /* Wider than light, because the ground it swells against is nearly black
     * and a swell that lands under about a tenth of an opacity step there is
     * a swell nobody sees. Measured: the old 0.2-to-0.42 pair moved the blob
     * centre by roughly six per cent of luminance over eleven seconds, which
     * is below what an eye catches without something to compare against. */
    --breathe-low: 0.26;
    --breathe-high: 0.78;
    --ground-deep: #0d141d;
    --panel: rgba(29, 38, 50, 0.6);
    --panel-solid: #141b25;
    --edge: rgba(255, 255, 255, 0.08);
    --edge-strong: rgba(255, 255, 255, 0.16);
    --accent: #7fc8ee;
    --accent-pane: #2b5f7d;
    --accent-alt: #2f7d72;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px rgba(0, 0, 0, 0.45);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.55), 0 28px 60px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The ground breathes.
 *
 * Two independent layers rather than one. A single animated gradient reads as a
 * loop — the eye finds the period within a few seconds and then it is a moving
 * wallpaper. Two layers on durations that share no common factor (37s and 23s)
 * drift in and out of phase, so the combination does not visibly repeat and the
 * page feels alive rather than animated.
 *
 * Both are generated: layered radial gradients, no image to download. That is
 * what lets the footer keep claiming the page fetches nothing.
 */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -30vmax;
  z-index: -1;
  pointer-events: none;
  will-change: transform, opacity;
}

/* The slow layer: large, cool, and mostly still. It sets the depth. */
body::before {
  background:
    radial-gradient(40vmax 40vmax at 16% 10%, color-mix(in srgb, var(--accent-pane) 60%, transparent), transparent 70%),
    radial-gradient(34vmax 34vmax at 84% 6%, color-mix(in srgb, var(--accent-alt) 45%, transparent), transparent 70%),
    radial-gradient(44vmax 44vmax at 58% 92%, color-mix(in srgb, var(--accent-pane) 34%, transparent), transparent 72%);
  filter: blur(12px);
  opacity: 0.55;
  animation: drift 37s ease-in-out infinite alternate;
}

/* The breathing layer: smaller, warmer, and it swells and fades. This is the
 * one that reads as a breath rather than a slide. */
body::after {
  background:
    radial-gradient(26vmax 26vmax at 72% 34%, color-mix(in srgb, var(--accent-alt) 55%, transparent), transparent 68%),
    radial-gradient(30vmax 30vmax at 26% 68%, color-mix(in srgb, var(--accent-pane) 48%, transparent), transparent 68%);
  filter: blur(18px);
  /* The floor, so a reduced-motion visitor gets the composition rather than a
   * frame of it. The animation takes over from here. */
  opacity: var(--breathe-low);
  animation: breathe-ground 23s ease-in-out infinite;
}

@media (prefers-color-scheme: dark) {
  body::before { opacity: 0.46; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(2.5%, -2%, 0) scale(1.07); }
}

/* Asymmetric on purpose: the swell is slower than the release, which is what a
 * breath actually does. A symmetric ease reads as a pulse. */
@keyframes breathe-ground {
  0% { transform: scale(1) translate3d(0, 0, 0); opacity: var(--breathe-low); }
  45% { transform: scale(1.14) translate3d(-2%, 1.4%, 0); opacity: var(--breathe-high); }
  100% { transform: scale(1) translate3d(0, 0, 0); opacity: var(--breathe-low); }
}

.shell {
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.25rem) clamp(1.25rem, 5vw, 2.5rem) 4rem;
}

/* Header */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

.wordmark span {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-soft);
}

.lang {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Type */

h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1.1rem;
  max-width: var(--measure);
}

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 44ch;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-thickness 120ms ease;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-bottom: clamp(2rem, 6vw, 3.5rem);
}

@media (max-width: 47rem) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
  }
}

.hero-art svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* The route draws itself once, then the nodes breathe. It is the only thing on
 * the page that moves on load, which is what makes it read as intent rather
 * than decoration. */
.route-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.2s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.node {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: pop 600ms cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: scale(1); }
}

.node-live {
  animation:
    pop 600ms cubic-bezier(0.34, 1.4, 0.64, 1) forwards,
    breathe 3.4s ease-in-out 1.6s infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Sections */

section {
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-top: 1px solid var(--edge);
}

section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.cards {
  display: grid;
  gap: 1rem;
  /* Four cards, so two columns rather than three: a 3+1 grid leaves an orphan
   * that reads as a mistake. */
  grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr));
  margin-top: 1.75rem;
}

.card {
  position: relative;
  background: var(--panel);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 1.4rem 1.45rem;
  box-shadow: var(--shadow);
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease;
}

/* The bright inner top edge that makes a translucent pane read as glass rather
 * than as a flat sheet. */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.75),
    transparent
  );
}

@media (prefers-color-scheme: dark) {
  .card::before {
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.18),
      transparent
    );
  }
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--edge-strong);
}

.card h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.6rem;
}

.card p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--ink-soft);
}

.card-icon {
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: 0.9rem;
  color: var(--accent);
}

/* Business areas: a tighter row than the cards, for the group's segments. */

.areas {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin-top: 1.5rem;
}

.area {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-solid) 55%, transparent);
  transition: border-color 260ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.area:hover {
  border-color: var(--edge-strong);
  transform: translateY(-2px);
}

.area strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.area span {
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* Scroll reveal. Everything is visible by default; the script adds the
 * pre-reveal state, so a browser with no JavaScript, or one that fails to run
 * it, shows a complete page rather than a blank one. */
.reveal-ready {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-in {
  opacity: 1;
  transform: none;
}

/* Contact and footer */

.contact a {
  font-size: 1.1rem;
  font-weight: 600;
}

footer {
  border-top: 1px solid var(--edge);
  margin-top: 2rem;
  padding-top: 1.75rem;
  font-size: 0.87rem;
  color: var(--ink-faint);
}

footer p {
  max-width: none;
  margin: 0 0 0.4rem;
}

/* Someone who has asked their system to stop animating things has asked for
 * exactly that. Not "less", not "faster" — stopped. The page is complete
 * without a frame having played, so there is nothing to compensate for. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  body::before,
  body::after {
    transform: none;
  }
  .route-line {
    stroke-dashoffset: 0;
  }
  .node,
  .node-live {
    opacity: 1;
  }
  .reveal-ready {
    opacity: 1;
    transform: none;
  }
}
