/* Nexen Compounds welcome page
   Palette is taken from the logo: graphite black, helix crimson, helix cyan. */

:root {
  --paper: #f6f7f9;
  --ink: #111214;
  --ink-soft: #555a63;
  --ink-faint: #8a8f99;
  --crimson: #c4234e;
  --cyan: #1795bd;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0 24px;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0 32px;
}

.logo {
  display: block;
  width: clamp(190px, 24vw, 300px);
  height: auto;
}

/* Two-tone rule, echoing the red and blue strokes beside "COMPOUNDS" in the logo */
.rule {
  display: flex;
  gap: 10px;
  margin: clamp(26px, 4vh, 40px) 0 clamp(22px, 3.4vh, 32px);
}

.rule span {
  display: block;
  width: 46px;
  height: 2px;
  border-radius: 2px;
}

.rule__l { background: var(--crimson); transform-origin: right; }
.rule__r { background: var(--cyan); transform-origin: left; }

h1 {
  margin: 0;
  max-width: 16em;
  font-size: clamp(1.9rem, 4.2vw, 3.25rem);
  font-weight: 700;
  font-stretch: 110%;
  line-height: 1.06;
  letter-spacing: -0.022em;
}

.lede {
  max-width: 27em;
  margin: 18px 0 0;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: var(--ink-soft);
}

/* Button */

.cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding: 18px 26px 18px 30px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-stretch: 120%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Colour bar that slides in along the bottom edge on hover */
.cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--crimson) 0 50%, var(--cyan) 50% 100%);
  transform: scaleX(0);
  transition: transform 0.35s ease;
}

.cta__arrow { flex: none; transition: transform 0.25s ease; }

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(17, 18, 20, 0.55);
}

.cta:hover::after, .cta:focus-visible::after { transform: scaleX(1); }
.cta:hover .cta__arrow { transform: translateX(4px); }
.cta:active { transform: translateY(0); }

.cta:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

/* Footer */

.foot {
  padding: 20px 0 24px;
  text-align: center;
}

.foot p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
}

/* Motion: a staggered entrance, the rule drawing out from the centre,
   a slow float on the logo and a periodic nudge on the arrow. */

@media (prefers-reduced-motion: no-preference) {
  .logo { animation: logo-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both, float 7s ease-in-out 1s infinite; }
  .rule span { animation: draw 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.45s both; }
  h1 { animation: rise 0.7s ease 0.55s both; }
  .lede { animation: rise 0.7s ease 0.68s both; }
  .cta { animation: rise 0.7s ease 0.82s both; }
  .foot { animation: fade 0.8s ease 1.1s both; }
  .cta__arrow { animation: nudge 3.2s ease-in-out 2s infinite; }
  .cta:hover .cta__arrow { animation: none; }

  @keyframes logo-in {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: none; }
  }

  @keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
  }

  @keyframes draw {
    from { transform: scaleX(0); opacity: 0; }
    to { transform: scaleX(1); opacity: 1; }
  }

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

  @keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes nudge {
    0%, 70%, 100% { transform: translateX(0); }
    82% { transform: translateX(4px); }
  }
}

/* Mobile */

@media (max-width: 560px) {
  .hero { padding: 32px 0 24px; }

  .cta {
    width: 100%;
    max-width: 360px;
    justify-content: center;
    padding: 19px 20px;
    font-size: 12px;
    font-stretch: 112%;
    letter-spacing: 0.1em;
  }

  .foot p { font-size: 11.5px; }
}

@media (max-width: 350px) {
  h1 { font-size: 1.5rem; }
  .cta { font-stretch: 100%; letter-spacing: 0.06em; }
}
