/* BasketCoach.se — the landing page.
   Every colour, radius and shadow here comes from the two products' own design
   systems. See docs/design-tokens.md for the file each value was read from.
   Nothing is invented. */

:root {
  --primary: #067a5b;
  --primary-hover: #056249;
  --focus-ring: #067a5b;

  /* The hero's green stays the brand's green in both themes: it is artwork,
     not a surface, so it is NOT redefined in the dark block below. The two
     values are the products' --primary-color and --primary-dark, light. */
  --brand-from: #067a5b;
  --brand-to: #04503c;

  --bg-canvas: #f6f8fa;
  --bg-surface: #ffffff;

  --text: #101828;
  --text-secondary: #475467;
  --text-muted: #667085;
  --text-inverse: #ffffff;

  --border: #e4e7ec;
  --border-strong: #d0d5dd;

  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-float: 0 8px 24px rgba(16, 24, 40, 0.18);

  --tap: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #0c7454;
    --primary-hover: #0a6248;
    --focus-ring: #2fd6a4;

    --bg-canvas: #0d1117;
    --bg-surface: #161b22;
  
    --text: #e6edf3;
    --text-secondary: #b1bac4;
    --text-muted: #8b949e;

    --border: #30363d;
    --border-strong: #444c56;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14.4px;
  line-height: 1.55;

  /* On a tall window the page is shorter than the screen; the footer sits at
     the bottom instead of floating in the middle of empty canvas. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- the site's name, on the hero --- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
}

.brand__mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.brand__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-inverse);
}

/* --- hero --- */

.hero {
  background: linear-gradient(135deg, var(--brand-from) 0%, var(--brand-to) 100%);
  color: var(--text-inverse);
  padding: 16px 0 40px;
}

.hero__title {
  margin: 24px 0 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
  max-width: 20ch;
}

.hero__text {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.55;
  max-width: 46ch;
  color: var(--text-inverse);
}

/* --- the two products --- */

.products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: -24px 0 0;
  padding-bottom: 48px;
}

.product {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.product:hover,
.product:focus-visible {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-float);
}

.product:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.product:active {
  background: var(--bg-canvas);
  transition: none;
}

@media (hover: hover) {
  .product:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product {
    transition: none;
  }
  .product:hover {
    transform: none;
  }
}

.product__name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.product__job {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.product__text {
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.product__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 24px;
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 600;
}

.product:hover .product__cta,
.product:focus-visible .product__cta {
  background: var(--primary-hover);
}

.product__cta svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.product__url {
  margin: 12px 0 0;
  font-size: 12.8px;
  color: var(--text-muted);
}

/* --- footer --- */

.foot {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 12.8px;
}

/* --- two across once there is room for it --- */

@media (min-width: 760px) {
  .hero {
    padding: 24px 0 64px;
  }

  .hero__title {
    font-size: 40px;
  }

  .products {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: -32px;
  }
}

/* A heading that is read aloud but not drawn: the products need an h2 above
   them so the heading order has no gap, but the page says nothing there. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
