/*
 * Welcome Brands: the LLP's home page (welcomebrands.co.uk).
 * A shop window: an inviting, frosted pane with light and shapes moving behind it,
 * so you sense activity inside without seeing what it is.
 * Everything behind the glass is blurred and clipped to the pane, so nothing
 * sharp ever shows outside it.
 */

@font-face { font-family: "Bellefair"; src: url("assets/fonts/Bellefair-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

@property --shift { syntax: "<length>"; inherits: true; initial-value: 0px; }

:root {
  /* One typeface everywhere, matching the logo. */
  --font: "Bellefair", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --bg: #07080B;
  --ink: #F4F5F8;
  --soft: rgba(244, 245, 248, .66);
  --faint: rgba(244, 245, 248, .42);
  --edge: rgba(255, 255, 255, .14);
  --blue: #3D5BFF;
  --violet: #8B3DF0;
  --teal: #14B8A6;
  --amber: #F2A541;
  --rose: #FF5FA2;
  /* The title's slow shimmer: near-white with faint tints. Starts and ends on the same colour so it loops. */
  --shine: linear-gradient(90deg, #F4F5F8 0%, #CDD6FF 14%, #F4F5F8 28%, #E2D0FF 42%, #F4F5F8 56%, #CBEDE6 70%, #F4F5F8 84%, #FFE2CF 92%, #F4F5F8 100%);
  --shine-w: 1600px;
  --px: 0;
  --py: 0;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flow-root; /* keeps the pane's margin inside the page (no stray scroll) */
  min-height: 100svh;
  background: var(--bg);
  background:
    radial-gradient(60vmax 50vmax at 12% 18%, rgba(61, 91, 255, .22), transparent 70%),
    radial-gradient(60vmax 50vmax at 88% 70%, rgba(139, 61, 240, .18), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

/* ---------- Behind the glass ---------- */

.scene { position: absolute; inset: 0; z-index: -2; overflow: hidden; border-radius: inherit; }
/* The frosting: a pale tint over everything behind the glass. */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .05));
}
.aurora, .interior { position: absolute; inset: -10%; will-change: transform; }
.aurora   { transform: translate3d(calc(var(--px) * 26px), calc(var(--py) * 20px), 0); }
.interior { transform: translate3d(calc(var(--px) * -40px), calc(var(--py) * -30px), 0); }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: drift 26s var(--ease) infinite alternate;
}
.g1 { width: 46vmax; height: 46vmax; left: 4%;  top: 8%;  background: var(--blue);   }
.g2 { width: 40vmax; height: 40vmax; right: 2%; top: 30%; background: var(--violet); animation-duration: 31s; animation-delay: -8s; }
.g3 { width: 34vmax; height: 34vmax; left: 30%; bottom: -4%; background: var(--teal); opacity: .38; animation-duration: 23s; animation-delay: -14s; }
.g4 { width: 14vmax; height: 14vmax; left: 60%; top: 12%; background: var(--rose); opacity: .26; animation-duration: 19s; animation-delay: -4s; }

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vmax, -4vmax, 0) scale(1.08); }
  100% { transform: translate3d(-5vmax, 5vmax, 0) scale(.94); }
}

/* Shapes on the "shop floor": hints of screens, panels and lights. */
.form {
  position: absolute;
  background: linear-gradient(160deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .12));
  opacity: .5;
  filter: blur(18px);
  animation: float 18s ease-in-out infinite alternate;
}
.f1 { width: 9vmax;  height: 18vmax; left: 18%; top: 30%; border-radius: 2vmax; }
.f2 { width: 22vmax; height: 14vmax; left: 52%; top: 22%; border-radius: 1.4vmax; animation-duration: 22s; animation-delay: -6s; }
.f3 { width: 7vmax;  height: 7vmax;  left: 40%; top: 62%; border-radius: 50%; animation-duration: 15s; animation-delay: -3s; }
.f4 { width: 13vmax; height: 4vmax;  left: 66%; top: 66%; border-radius: 4vmax; opacity: .35; animation-duration: 20s; animation-delay: -11s; }
.f5 { width: 4vmax;  height: 4vmax;  left: 30%; top: 16%; border-radius: 50%; background: var(--amber); opacity: .55; animation-duration: 13s; }
.f6 { width: 16vmax; height: 22vmax; left: 78%; top: 40%; border-radius: 8vmax 8vmax 1.2vmax 1.2vmax; opacity: .3; animation-duration: 25s; animation-delay: -9s; }

@keyframes float {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(2.5vmax, -3vmax, 0) rotate(6deg); }
}

/* ---------- The glass ---------- */

.pane {
  position: relative;
  min-height: calc(100svh - 2 * var(--gap));
  margin: var(--gap);
  --gap: clamp(12px, 2.6vw, 32px);
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 4vw, 56px);
  border-radius: clamp(20px, 3vw, 36px);
  border: 1px solid var(--edge);
  background: #0C0E14;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 0 0 1px rgba(255, 255, 255, .03),
    0 40px 120px -40px rgba(0, 0, 0, .8);
  overflow: hidden;
  isolation: isolate;
  animation: pane-in 1.4s var(--ease) both;
}
/* Light caught on the glass, following the pointer. */
.pane::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    45rem circle at calc((var(--px) + 1) * 50%) calc((var(--py) + 1) * 50%),
    rgba(255, 255, 255, .11), transparent 60%);
}
@keyframes pane-in {
  from { opacity: 0; transform: scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* A slow band of light sweeping across the window now and then. */
.sheen {
  position: absolute;
  inset: -50% -20%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .07) 48%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .07) 52%, transparent 58%);
  transform: translateX(-70%);
  animation: sheen 11s ease-in-out 2.2s infinite;
}
@keyframes sheen {
  0%   { transform: translateX(-70%); }
  38%  { transform: translateX(70%); }
  100% { transform: translateX(70%); }
}

/* Fine grain so the glass reads as frosted, not just dark. */
.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- On the glass ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: rise 1s var(--ease) .5s both;
}
.brand { display: inline-flex; align-items: center; gap: 14px; border-radius: 999px; outline-offset: 6px; }
.word { font-size: 21px; letter-spacing: .02em; line-height: 1; }

/*
 * The logo. W over B inside a fine circle, with a light travelling round it.
 * Proportions follow the golden ratio. The script adds up to 13 lights (each .ring),
 * rotates them, and sets:
 *   --g / --hi  colour and highlight   --tail  trail length   --full  solid-ring strength
 * Without the script, one light spins with plain CSS instead.
 */
.orb {
  --g: #CDD6FF; --hi: #FFFFFF; --tail: 36%; --full: 0;
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; flex: none;
}
.orb::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); }
/* The solid glowing ring that appears when the light is spinning very fast. */
.orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--g); opacity: var(--full);
  box-shadow: 0 0 6px var(--g), 0 0 14px var(--g), inset 0 0 6px var(--g);
}
.ring {
  position: absolute; inset: 0;
  animation: orbit 8s linear infinite;
  filter: drop-shadow(0 0 2px var(--g)) drop-shadow(0 0 6px var(--g));
}
.js-orb .ring { animation: none; }
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 calc(100% - var(--tail)), var(--g) 90%, var(--hi) 97%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.6px), #000 calc(100% - 1.4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.6px), #000 calc(100% - 1.4px));
}
@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(1turn); } }
/* The W and B (an inline SVG in a 100 x 100 box), in the same slow shimmer as the big title. */
.mono { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }


.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vh, 96px) 0;
}
.title {
  margin: 0;
  font-size: clamp(68px, 17vw, 208px);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.01em;
  animation: shine 22s linear infinite;
}
@keyframes shine { to { --shift: 1600px; } } /* = --shine-w */
.line { display: block; overflow: hidden; padding: .04em .1em .08em; margin: 0 -.1em; }
.line b {
  display: inline-block;
  /* Padding lets the colour reach the parts of each letter that overhang its box. */
  padding: 0 .08em;
  margin: 0 -.08em;
  font-weight: inherit;
  background-image: linear-gradient(180deg, transparent 38%, rgba(10, 12, 18, .3)), var(--shine);
  background-size: 100% 100%, var(--shine-w) 100%;
  background-repeat: no-repeat, repeat-x;
  /* --off (set by the script) lines every letter up on one shared gradient. */
  background-position: 0 0, calc(var(--shift) - var(--off, 0px)) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: letter 1.1s var(--ease) both;
  animation-delay: calc(.35s + var(--i, 0) * 45ms);
}
.line:nth-child(2) b { --row: 7; }
.line b:nth-child(1)  { --i: calc(var(--row, 0) + 1); }
.line b:nth-child(2)  { --i: calc(var(--row, 0) + 2); }
.line b:nth-child(3)  { --i: calc(var(--row, 0) + 3); }
.line b:nth-child(4)  { --i: calc(var(--row, 0) + 4); }
.line b:nth-child(5)  { --i: calc(var(--row, 0) + 5); }
.line b:nth-child(6)  { --i: calc(var(--row, 0) + 6); }
.line b:nth-child(7)  { --i: calc(var(--row, 0) + 7); }
@keyframes letter {
  from { transform: translateY(105%) rotate(4deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.lede {
  margin: clamp(22px, 3.5vw, 40px) 0 0;
  max-width: 30ch;
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.3;
  letter-spacing: .005em;
  color: var(--soft);
  animation: rise 1.1s var(--ease) 1.15s both;
}

.fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.fields li {
  padding: 7px 15px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 15.5px;
  letter-spacing: .04em;
  color: rgba(244, 245, 248, .62);
  animation: rise .9s var(--ease) both;
}
/* The apps chip links to Welcome Apps: slightly brighter, and on hover its words roll over to say where it goes. */
.fields li.link { padding: 0; border-color: rgba(205, 214, 255, .32); color: rgba(244, 245, 248, .85); transition: border-color .4s, background-color .4s; }
.fields li.link:hover, .fields li.link:focus-within { border-color: rgba(205, 214, 255, .7); background-color: rgba(205, 214, 255, .07); }
.fields a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px 6px; border-radius: inherit; text-decoration: none; }
.swap { display: inline-grid; overflow: hidden; height: 1.25em; line-height: 1.25em; }
.swap > span { grid-area: 1 / 1; text-align: center; transition: transform .55s var(--ease), opacity .55s var(--ease); }
.swap > span + span { transform: translateY(100%); opacity: 0; }
.fields a:hover .swap > span:first-child, .fields a:focus-visible .swap > span:first-child { transform: translateY(-100%); opacity: 0; }
.fields a:hover .swap > span + span, .fields a:focus-visible .swap > span + span { transform: none; opacity: 1; }
.arrow { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.fields a:hover .arrow, .fields a:focus-visible .arrow { transform: translate(2px, -2px); }
.fields a:focus-visible { outline-offset: 2px; border-radius: 999px; }
.fields li:nth-child(1) { animation-delay: 1.45s; }
.fields li:nth-child(2) { animation-delay: 1.6s; }
.fields li:nth-child(3) { animation-delay: 1.75s; }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  animation: rise 1s var(--ease) 1.9s both;
}
.foot p { margin: 0; }
.enq { font-size: 17px; letter-spacing: .01em; color: var(--faint); }
.enq a { margin-left: 8px; color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .25); transition: border-color .3s; }
.enq a:hover, .enq a:focus-visible { border-color: var(--ink); }

/* Company details (a legal requirement), folded away behind one quiet line. */
.co { max-width: 46ch; text-align: right; color: rgba(244, 245, 248, .4); }
.co summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  font-size: 14px; letter-spacing: .04em; border-radius: 6px; transition: color .3s;
}
.co summary::-webkit-details-marker { display: none; }
.co summary::after { content: "+"; font-size: 1.15em; line-height: 1; transition: transform .4s var(--ease); }
.co[open] summary::after { transform: rotate(45deg); }
.co summary:hover, .co summary:focus-visible { color: rgba(244, 245, 248, .75); }
.co summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.co p { margin: 10px 0 0; font-size: 14px; line-height: 1.5; letter-spacing: .01em; animation: rise .5s var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
  .glow { filter: blur(50px); }
  .foot { flex-direction: column; align-items: flex-start; }
  .co { text-align: left; }
}

/* ---------- Less motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .aurora, .interior { transform: none; }
  .ring { transform: rotate(137.5deg); } /* the golden angle */
}
