@import "./tokens.css";

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

html {
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  line-height: var(--leading-normal);
  font-weight: var(--font-weight-regular);
}

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

a {
  color: var(--text-link);
  transition: color var(--duration-fast) var(--ease-out);
}

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

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

/* ── Typography ── */

.display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text-secondary);
}

.heading-1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

.heading-2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-snug);
}

.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.body-lg {
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

.body-muted {
  color: var(--text-tertiary);
}

.price {
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-medium);
}

/* ── Signature: bloom line ── */

.bloom-line {
  width: var(--bloom-line-width);
  height: var(--bloom-line-height);
  background: var(--gradient-brand-horizontal);
  border-radius: var(--radius-full);
}

.bloom-line--center {
  margin-inline: auto;
}

.bloom-line--wide {
  width: min(12rem, 40vw);
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--button-padding-y) var(--button-padding-x);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.btn--primary {
  background: var(--action-primary-bg);
  color: var(--action-primary-text);
}

.btn--primary:hover {
  background: var(--action-primary-bg-hover);
  color: var(--action-primary-text);
}

.btn--secondary {
  background: var(--action-secondary-bg);
  color: var(--action-secondary-text);
  border-color: var(--action-secondary-border);
}

.btn--secondary:hover {
  background: var(--surface-accent);
}

/* Minimal confident CTA — text, arrow, bloom underline */
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  position: relative;
  padding-bottom: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.01em;
  color: var(--color-sage-ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.link-cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--bloom-line-height);
  background: var(--gradient-brand-horizontal);
  border-radius: var(--radius-full);
  transform: scaleX(0.4);
  transform-origin: left center;
}

.link-cta__arrow {
  display: inline-block;
}

/* Touch: static confident state — no sticky pseudo-hover */
@media (hover: none), (pointer: coarse) {
  .link-cta::after {
    transform: scaleX(1);
  }

  .link-cta:active {
    color: var(--color-forest);
  }
}

/* Mouse: reveal on hover */
@media (hover: hover) and (pointer: fine) {
  .link-cta {
    transition: color var(--duration-fast) var(--ease-out);
  }

  .link-cta::after {
    transition: transform var(--duration-normal) var(--ease-out);
  }

  .link-cta__arrow {
    transition: transform var(--duration-fast) var(--ease-out);
  }

  .link-cta:hover {
    color: var(--color-forest);
  }

  .link-cta:hover::after {
    transform: scaleX(1);
  }

  .link-cta:hover .link-cta__arrow {
    transform: translateX(3px);
  }
}

/* ── Cards ── */

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--card-padding);
}

.card--accent-top {
  border-top: var(--bloom-line-height) solid transparent;
  border-image: var(--gradient-brand) 1;
}

/* ── Layout helpers ── */

.container {
  width: min(100% - var(--space-8), var(--content-max));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - var(--space-8), var(--content-narrow));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-16);
}

.stack-4 > * + * {
  margin-top: var(--space-4);
}

.stack-6 > * + * {
  margin-top: var(--space-6);
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
