/* Hallmark · macrostructure: Marquee Hero (centered narrative) · tone: Apple modern-minimal · anchor hue: green ~152
 * theme: custom (light paper · black ink · green brand accent · SF Pro system stack)
 */
@import url("tokens.css");

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

html, body { overflow-x: clip; }

/* No rubber-band / overscroll bounce at the page boundaries */
html { overscroll-behavior: none; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.47;             /* Apple SF Pro Text body leading */
  letter-spacing: -0.01em;
  color: var(--color-ink);
  text-wrap: pretty;             /* avoid widows / lines ending on a lone word or dash */
  /* Light pitch-green wash up top, fading to paper by ~2.1 screens down */
  background: linear-gradient(to bottom, var(--color-pitch), transparent 210vh);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;              /* SF Pro Display Semibold — Apple's headline weight */
  letter-spacing: -0.015em;      /* Apple's tight negative tracking on display type */
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;            /* even line lengths, no orphaned prepositions */
  overflow-wrap: anywhere;
  min-width: 0;
}

p { margin: 0; }

a { color: inherit; }

img, video { display: block; max-width: 100%; }

::selection { background: var(--color-select); }

/* Visible focus ring for keyboard users on any link (buttons style their own) */
a:not(.btn):focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 5px;
}

.wrap {
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* ============ Buttons ============ */
.btn {
  --_bg: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.375rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 590;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--_bg);
  color: var(--color-accent-ink);
  transition: transform var(--dur-fast) var(--ease-out),
              filter var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.btn--lg {
  padding: 0.9375rem 2rem;
  font-size: var(--text-lg);
}
/* Large CTAs get a subtle lift + soft shadow on hover */
.btn--lg:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -12px oklch(22% 0.004 260 / 0.5);
}
.btn--lg:active { transform: translateY(0); }

.btn__apple {
  flex: none;
  width: auto;
  height: 1.05em;
  margin-top: -0.12em;   /* optical centering of the Apple mark */
}

/* ============ Hero ============ */
.hero {
  text-align: center;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.hero__brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--space-md);   /* sits close to the headline */
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-decoration: none;
}
.hero__brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.hero h1 {
  font-size: var(--text-display);
  max-width: min(15ch, 100%);
  margin-inline: auto;
}

.hero__grad {
  color: var(--color-accent);
}

.hero__lede {
  margin: var(--space-md) auto 0;
  max-width: min(40ch, 100%);
  font-size: var(--text-lg);
  line-height: 1.4;
  color: var(--color-ink-soft);
  letter-spacing: -0.012em;
  text-wrap: balance;   /* even two-line wrap, no dangling "So" */
}

.hero__cta {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.hero__note {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-ink-faint);
}

/* ============ Video ============ */
.video {
  padding-top: var(--space-sm);      /* pull the demo up toward the fold */
  padding-bottom: var(--space-lg);   /* tight — features read as its caption */
}

/* ---- MacBook mockup ----
   The demo plays inside macbook.svg's screen cutout. All screen metrics are
   percentages of the 1008×623 viewBox so it stays aligned at any width:
   screen fill = x103–909, y5–533 → left 10.22% top 0.80% w 79.96% h 84.75%,
   top-corner radius 22px (2.73% × / 4.17% y). */
.mac {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
}

.mac__frame {
  display: block;
  width: 100%;
  height: auto;
}

.mac__screen {
  position: absolute;
  top: 0.80%;
  left: 10.22%;
  width: 79.96%;
  height: 84.75%;
  padding: 1.5%;                 /* black bezel around the display */
  background: #000;
  overflow: hidden;
  border-radius: 2.73% 2.73% 0 0 / 4.17% 4.17% 0 0;   /* match the SVG screen */
}

.mac__screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* rounded only at the top — Mac screens are square at the bottom edge */
  border-radius: clamp(3px, 0.9%, 9px) clamp(3px, 0.9%, 9px) 0 0;
}

/* Small glass pause / play control, bottom-right. Stays out of the way while
   the loop plays (reveals on hover / focus), and pins visible when paused. */
.video__toggle {
  position: absolute;
  bottom: calc(var(--space-md) + 1%);
  right: calc(var(--space-md) + 1%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  color: var(--color-ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur-mid) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.mac__screen:hover .video__toggle,
.video__toggle:focus-visible,
.video__toggle.is-paused { opacity: 1; }
.video__toggle:hover { transform: scale(1.06); }
.video__toggle:active { transform: scale(0.97); }
.video__toggle:focus-visible { outline: 2px solid var(--color-accent-ink); outline-offset: 3px; }
.video__icon { width: 17px; height: 17px; }
.video__icon--play { display: none; }
.video__toggle.is-paused .video__icon--play { display: block; }
.video__toggle.is-paused .video__icon--pause { display: none; }

@media (prefers-reduced-motion: reduce) {
  .video__toggle { opacity: 1; }   /* always show the control when we don't autoplay */
}

/* ============ Features ============ */
.features {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-2xl);
  text-align: center;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.features__cta { margin-top: var(--space-2xl); }

.features__note {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-ink-faint);
}

.feature { text-align: center; }

.feature h3 {
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.375rem;
}

.feature p {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--color-ink-soft);
}

@media (max-width: 600px) {
  .features__grid { grid-template-columns: 1fr; gap: var(--space-xl); }

  .hero__lede { font-size: var(--text-base); }

  /* Full-width, thumb-friendly CTA on phones */
  .hero__cta { display: block; }
  .hero__cta .btn { width: 100%; }
}

/* ============ Footer ============ */
.footer {
  position: relative;
  padding-block: var(--space-xl);
}

/* Centered hairline that fades out toward both edges */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 2 * var(--space-lg), 460px);
  height: 1px;
  background: linear-gradient(to right,
    transparent,
    var(--color-hairline) 25%,
    var(--color-hairline) 75%,
    transparent);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;               /* never overflow narrow screens */
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.625rem;
  font-size: var(--text-sm);
  color: var(--color-ink-faint);
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

.footer__icon { width: 20px; height: 20px; border-radius: 5px; }

.footer__inner a {
  color: var(--color-ink-soft);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer__inner a:hover { color: var(--color-ink); }

