/* ha-texecom website: one page, no build step. Colours are tokens, redefined for dark mode below. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #2756bc;
  --accent-hover: #1e4699;
  --link: #2756bc;
  --accent-soft: rgba(39, 86, 188, 0.1);
  --on-accent: #ffffff;
  --chip: #ffffff;
  --well: #f5f5f7;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --shot-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04), 0 30px 70px -30px rgba(23, 36, 90, 0.35);
  --shot-filter: none;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #3466d6;
    --accent-hover: #4374e0;
    --link: #7aa5ff;
    --accent-soft: rgba(122, 165, 255, 0.14);
    --chip: #2c2c2e;
    --well: #1c1c1e;
    --nav-bg: rgba(22, 22, 24, 0.72);
    --shot-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
    --shot-filter: brightness(0.9);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

[id] {
  scroll-margin-top: 64px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap.wide {
  max-width: 1200px;
}

/* Navigation: a thin translucent bar. */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  height: 52px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
}

.brand img {
  border-radius: 7px;
}

.brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.nav-links a {
  color: var(--text);
  opacity: 0.8;
}

.nav-links a:hover {
  opacity: 1;
  text-decoration: none;
}

/* Hero */

.hero {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(64px, 8vw, 112px);
  text-align: center;
  overflow: hidden;
}

.eyebrow {
  color: var(--link);
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 600;
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 15em;
  margin-inline: auto;
}

.nowrap {
  white-space: nowrap;
}

.lede {
  margin: 20px auto 0;
  max-width: 30em;
  color: var(--text-2);
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 32px;
}

.button {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 980px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.button:active {
  transform: scale(0.98);
}

.more {
  font-size: 17px;
}

.more::after {
  content: "\00a0\203a";
  content: "\00a0\203a" / "";
}

.note {
  margin-top: 20px;
  color: var(--text-2);
  font-size: 14px;
}

.shot {
  border-radius: var(--radius);
  box-shadow: var(--shot-shadow);
  filter: var(--shot-filter);
  background: #fff;
}

.hero-shot {
  margin-top: clamp(40px, 4.5vw, 64px);
  width: 100%;
  border-radius: clamp(12px, 2vw, 24px);
}

/* Sections: one idea each, alternating white and grey. */

.section {
  padding-block: clamp(72px, 9vw, 128px);
}

.section.alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}

h2 {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-head p {
  margin-top: 20px;
  color: var(--text-2);
  font-size: clamp(19px, 2vw, 21px);
  line-height: 1.45;
  text-wrap: pretty;
}

.section-head + * {
  margin-top: clamp(48px, 6vw, 72px);
}

h3 {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* Feature tiles */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tile {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
}

.tile svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--link);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile p,
.points p,
.steps p {
  margin-top: 8px;
  color: var(--text-2);
}

.tile .more,
.way .more {
  margin-top: auto;
  padding-top: 14px;
}

/* Side by side: text and a picture. */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}

.split-text h2 {
  text-align: left;
}

.split-text p {
  margin-top: 20px;
  color: var(--text-2);
  font-size: clamp(19px, 2vw, 21px);
  line-height: 1.45;
}

.shot.narrow {
  width: 100%;
  max-width: 400px;
  justify-self: center;
}

/* Ways to connect */

.ways {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.way {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.5vw, 44px);
  border-radius: var(--radius);
  background: var(--well);
}

.tag {
  margin-bottom: 8px;
  color: var(--link);
  font-size: 15px;
  font-weight: 600;
}

.way h3 {
  font-size: clamp(24px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.way p:not(.tag) {
  margin-top: 12px;
  color: var(--text-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.chips li {
  padding: 6px 16px;
  border-radius: 980px;
  background: var(--chip);
  font-size: 15px;
  font-weight: 500;
}

.aside {
  max-width: 640px;
  margin: 40px auto 0;
  color: var(--text-2);
  font-size: 15px;
  text-align: center;
  text-wrap: pretty;
}

/* Install steps */

.steps {
  counter-reset: step;
  display: grid;
  gap: 36px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 64px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--link);
  font-size: 21px;
  font-weight: 600;
}

.actions.center {
  margin-top: clamp(48px, 6vw, 72px);
}

/* Safety */

.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px 48px;
  text-align: center;
}

/* Footer */

.footer {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
}

/* Narrow screens */

@media (max-width: 760px) {
  .nav-links .wide {
    display: none;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split-text h2,
  .split-text {
    text-align: center;
  }

  .steps-split .shot {
    order: -1;
  }

  .shot.narrow {
    max-width: 340px;
  }

  .tile {
    padding: 28px 24px;
  }
}

/* Motion: a gentle fade-in, only for people who haven't asked for less motion. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero .wrap > * {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero .wrap > :nth-child(2) { animation-delay: 0.06s; }
  .hero .wrap > :nth-child(3) { animation-delay: 0.12s; }
  .hero .wrap > :nth-child(4) { animation-delay: 0.18s; }
  .hero .wrap > :nth-child(5) { animation-delay: 0.24s; }
  .hero .wide > * { animation-delay: 0.3s; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

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