/* ==========================================================================
   Hyfolio — landing page V1
   Rebuilt from Pencil frame tLpAS ("Hyfolio / Landing Page").
   Tokens lifted verbatim from the .pen document variables (Nitro design system).
   ========================================================================== */

/* NO @import for the webfont — deliberately.
 *
 * The published page carries a meta CSP of
 *   default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:
 * so a stylesheet from fonts.googleapis.com is blocked, and with no font-src
 * the woff2 from fonts.gstatic.com falls back to default-src 'self' and is
 * blocked too. An @import here only produces console CSP violations.
 *
 * Geist stays FIRST in the stack below, so the moment it is installed
 * same-origin (admin → fonts install, which downloads the woff2 server-side)
 * the page picks it up with no CSS change. Until then it renders on the
 * system UI stack, which is metrically close. */

:root {
  /* Surfaces */
  --background: #f5f5f5;
  --card: #ffffff;
  --muted: #f2f3f0;
  --popover: #ffffff;

  /* Ink */
  --foreground: #333333;
  --card-foreground: #111111;
  --muted-foreground: #5b5f66;

  /* Brand */
  --primary: #0f5ffe;
  --primary-foreground: #ffffff;
  --secondary: #333333;
  --secondary-foreground: #ffffff;

  /* Semantic */
  --success: #ddf0c9;
  --success-foreground: #1a3300;
  --info: #c9d6f0;
  --info-foreground: #001133;

  /* Lines */
  --border: #e1e2e5; /* hairline on cards, sections, dividers */
  --input: #9da4b3; /* outlined controls only — Hero Secondary CTA, Solo/Agency CTAs */
  --ring: #e1e2e5;

  /* Geometry — read from the .pen, not invented.
   * 23 nodes carry $--radius-none: every button, badge, CTA, engine card,
   * pricing card and the hero mock are SQUARE. Only two things are rounded:
   * the icon chips (8) and the four use-case cards (10). */
  --radius-none: 0;
  --radius-chip: 8px;
  --radius-card: 0; /* .pen value is 10px — squared by owner decision */

  /* Rhythm */
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(56px, 7vw, 88px);
  --maxw: 1312px;

  /* Type */
  --font: "Geist", "Geist Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* The design uses NO shadows anywhere — separation is done with 1px
   * $--border hairlines (#E1E2E5). Outlined controls use the darker
   * $--input (#9DA4B3); the featured pricing card uses 2px $--primary. */
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

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

.narrow {
  max-width: 760px;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Type primitives
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.h1 {
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--muted-foreground);
  line-height: 1.6;
  text-wrap: pretty;
}

.sub {
  font-size: 16px;
  color: var(--muted-foreground);
  margin-top: 12px;
  text-wrap: pretty;
}

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

.section--card {
  background: var(--card);
}

.section--muted {
  background: var(--muted);
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

/* Section hairlines, straight from the .pen stroke map:
     Engines Section        top 1
     How It Works Section   top 1 + bottom 1
     Pricing Section        top 1 + bottom 1
     Final CTA Section      top 1
   These carry the page's structure — without them the sections float. */
.section--rule-top {
  border-top: 1px solid var(--border);
}

.section--rule-both {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding-inline: 22px;
  border-radius: var(--radius-none);
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    transform 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn--primary:hover {
  background: #0b4fd6;
}

/* Outlined controls stroke with $--input (#9DA4B3), not $--border —
   matches "Hero Secondary CTA" and the Solo/Agency pricing CTAs. */
.btn--outline {
  background: var(--card);
  color: var(--foreground);
  border-color: var(--input);
}

.btn--outline:hover {
  background: var(--muted);
}

.btn--sm {
  height: 36px;
  padding-inline: 16px;
}

.btn--block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Top nav
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin-right: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.nav__links a:hover {
  color: var(--foreground);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }
  .brand {
    margin-right: 0;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(40px, 5vw, 56px);
  text-align: center;
}

/* "Preview Badge" is $--radius-none — square, not a pill. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--info-foreground);
  background: var(--info);
  border-radius: var(--radius-none);
  padding: 7px 16px;
  margin-bottom: 26px;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.hero .lead {
  margin: 20px auto 0;
  max-width: 680px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.hero__shot {
  margin-top: clamp(36px, 5vw, 52px);
}

/* --------------------------------------------------------------------------
   Card grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 20px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 880px) {
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

/* Engine cards: square, 1px hairline, no shadow, no lift. */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-none);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.18s ease;
}

.card:hover {
  border-color: var(--input);
}

.card__title {
  font-size: 19px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.01em;
}

.card__body {
  font-size: 15px;
  color: var(--muted-foreground);
  line-height: 1.6;
}

:root {
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.pricing-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 44px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 940px) {
  .plans {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-inline: auto;
  }
}

.plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-none);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* "Pricing Card Growth" is stroke $--primary at 2px — a real 2px border,
   not a ring plus a shadow. */
.plan--featured {
  border: 2px solid var(--primary);
}

.plan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan__name {
  font-size: 19px;
  font-weight: 700;
  color: var(--foreground);
}

.plan__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--info);
  border-radius: var(--radius-none);
  padding: 4px 11px;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan__amount {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foreground);
  line-height: 1;
}

.plan__per {
  font-size: 14px;
  color: var(--muted-foreground);
}

.plan__for {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.55;
  min-height: 44px;
}

.plan__features {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-top: 4px;
}

.plan__features li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--foreground);
}

.plan__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 15px;
  height: 15px;
  background: var(--primary);
  -webkit-mask: var(--tick) center / contain no-repeat;
  mask: var(--tick) center / contain no-repeat;
}

.plan .btn {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}

/* "FAQ List" has a 1px top border and each item a 1px bottom border —
   a flat divided list, not a stack of rounded cards. */
.faq {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.faq details {
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-none);
  overflow: hidden;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: var(--muted-foreground);
  -webkit-mask: var(--chev) center / contain no-repeat;
  mask: var(--chev) center / contain no-repeat;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

:root {
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.faq__answer {
  padding: 0 22px 20px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted-foreground);
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */

.final {
  text-align: center;
}

.final__title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.022em;
  max-width: 780px;
  margin-inline: auto;
  text-wrap: balance;
}

.final .lead {
  margin: 18px auto 0;
  max-width: 560px;
  font-size: 17px;
}

.final__cta {
  margin-top: 30px;
}

.final__note {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 18px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding-block: 32px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__meta {
  font-size: 13px;
  color: var(--muted-foreground);
}

.footer__links {
  display: flex;
  gap: 26px;
}

.footer__links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.footer__links a:hover {
  color: var(--foreground);
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .card:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Repository-owned product contract additions
   -------------------------------------------------------------------------- */

.product-shot {
  background: var(--card);
  border: 1px solid var(--border);
}

.product-shot img {
  width: 100%;
}

.product-shot figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 13px;
}

.contract-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: start;
}

.contract-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--background);
}

.contract-list p {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.contract-list p:last-child {
  border-bottom: 0;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.availability-card {
  min-height: 180px;
  padding: 24px;
  background: var(--card);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.availability-card__status {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.availability-card p:last-child {
  color: var(--muted-foreground);
}

.plan__standard {
  margin-top: 6px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.plan__qualification {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.founding-note {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.founding-note p {
  min-height: 132px;
  padding: 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 14px;
}

.rollback-hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
}

@media (max-width: 860px) {
  .contract-grid,
  .availability-grid,
  .founding-note {
    grid-template-columns: 1fr;
  }

  .availability-card,
  .founding-note p {
    min-height: auto;
  }
}
