/* jasonfrovich.com: palette and type (taste-skill start.mjs, cool-white-slate + Schibsted Grotesk) */
:root {
  --p-bg: #f7f9fa; --p-surface: #ecf0f2; --p-ink: #1f3038; --p-muted: #5d6b72;
  --p-accent: #0d7480; --p-accent-ink: #ffffff; --p-action: #0d7480; --p-action-ink: #ffffff;
  --p-inv-bg: #1f3038; --p-inv-surface: #2c3c44; --p-inv-ink: #f7f9fa; --p-inv-muted: #9ea7ab;
  --p-inv-accent: #f7f9fa; --p-inv-accent-ink: #1f3038; --p-inv-action: #f7f9fa; --p-inv-action-ink: #1f3038;
  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-text: "Schibsted Grotesk", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.035em;
  --display-tracking-xl: -0.042em;
  --ly-scale: 0.98;
}

/* page styles shared by every page */
  /* browser surfaces in the palette */
  ::selection { background: #0d7480; color: #fff; }
  html { caret-color: #0d7480; scrollbar-color: #9ea7ab #ecf0f2; }
  /* the hero portrait: keep the face in the frame */
  .hero__media img { --ly-pos: 50% 18%; }
  /* the reader's two lists */
  .fit-col h3 { font: 500 var(--t-lead)/1.4 var(--font-text); margin-bottom: var(--s-4); }
  .fit-col .rows > li { grid-template-columns: 1fr; }
  /* plan cards: the product's own picture on white, whole */
  #compare .plan-pic { background: #fff; border-radius: var(--r-md); height: 148px; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
  #compare .plan-pic img { max-height: 124px; height: auto; width: auto; max-width: 100%; object-fit: contain; }
  #compare dl { display: grid; gap: var(--s-1); font-size: var(--t-small); }
  #compare dt { color: var(--muted); }
  #compare dd { margin: 0 0 var(--s-2); }
  #compare .plan-step { font: 500 var(--t-small)/1.3 var(--font-text); color: var(--muted); }
  /* the quote, set large */
  #why .big-quote { font: var(--display-weight) clamp(1.75rem, 3.2vw, 2.75rem)/1.18 var(--font-display); letter-spacing: var(--display-tracking); text-wrap: balance; }
  #why .big-quote cite { display: block; margin-top: var(--s-5); font: 500 var(--t-small)/1.4 var(--font-text); font-style: normal; letter-spacing: 0; color: var(--muted); }
  /* picture-develops on the dog photograph */
  .develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(560px, var(--ly-fit, 560px)); }
  .develop > img { display: block; width: 100%; height: 100%; object-fit: cover; }
  @media (max-width: 1023px) { .develop { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-7); } }
  /* the four promises, set large enough to carry their screen */
  .protect > li { grid-template-columns: 1fr; padding-block: var(--s-6); }
  .protect .rows__name { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); }
  .protect p { font-size: var(--t-lead); line-height: 1.5; color: var(--muted); }
  /* a phone: the photograph stands alone, its face clear */
  @media (max-width: 639px) { .hero__media .ly-float { display: none; } }
  /* the FAQ in two columns from 1024 */
  @media (min-width: 1024px) { .faq--cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter, 32px); } .faq--cols > .faq__item:nth-child(2) { padding-top: 0; } }
  /* phone: compact plan cards (thumbnail beside the name), a hero that ends on the first screen, a tighter FAQ */
  @media (max-width: 639px) {
    #compare .card--plan { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: var(--s-4); row-gap: var(--s-2); align-items: center; }
    #compare .plan-pic { grid-row: 1 / span 2; height: 72px; padding: 6px; }
    #compare .plan-pic img { max-height: 60px; }
    #compare .card--plan > :is(.plan-step, h3) { grid-column: 2; }
    #compare .card--plan > :is(dl, .btn) { grid-column: 1 / -1; }
    #compare dl { grid-template-columns: 88px minmax(0, 1fr); column-gap: var(--s-3); row-gap: var(--s-1); }
    #compare dd { margin: 0; }
    .hero h1 { font-size: 36px; }
    .hero__lead { font-size: 16px; line-height: 1.45; }
    .hero .t-small { margin-top: var(--s-2); }
    #faq .faq__item > h3 { font-size: 18px; }
    #faq .faq__item p { font-size: 16px; line-height: 1.5; }
    #compare .card--plan { padding: 16px; }
    .hero .btn-row { flex-direction: row; flex-wrap: nowrap; gap: var(--s-3); }
    .hero .btn-row .btn { flex: 1 1 0; width: auto; }
  }
  /* the three free steps: picture, name, one line, one button each */
  .steps { list-style: none; padding: 0; row-gap: var(--s-7); }
  .step { display: flex; flex-direction: column; gap: var(--s-3); }
  .step h3 { margin-top: var(--s-3); font: 500 var(--t-lead)/1.35 var(--font-text); }
  .step p { color: var(--muted); flex: 1 0 auto; }
  .step .btn { align-self: flex-start; margin-top: var(--s-2); }
  .step__pic { aspect-ratio: 3 / 2; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
  .step__pic img { width: 100%; height: 100%; object-fit: cover; }
  .step__pic--book { background: #fff; display: grid; place-items: center; padding: var(--s-4); }
  .step__pic--book img { width: auto; height: 100%; object-fit: contain; }
  .steps__note { margin-top: var(--s-6); max-width: 64ch; }
  /* a short laptop window: the hero headline scales with the window's height so the column ends inside the first screen */
  @media (min-width: 640px) and (max-height: 820px) {
    .hero h1 { font-size: clamp(2.25rem, 7vh, 4.5rem); }
    .hero__lead { font-size: 17px; line-height: 1.5; }
  }
  /* critique fixes */
  .step__pic--book { position: relative; }
  .step__pic--book img { position: absolute; inset: var(--s-4); width: calc(100% - 2 * var(--s-4)); height: calc(100% - 2 * var(--s-4)); object-fit: contain; }
  .promises { list-style: none; padding: 0; row-gap: var(--gutter, 24px); }
  .promise { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); }
  .promise__big { font: var(--display-weight) clamp(2rem, 3vw, 2.75rem)/1 var(--font-display); letter-spacing: var(--display-tracking); color: var(--accent); }
  .promise h3 { font: 500 var(--t-lead)/1.35 var(--font-text); }
  .promise p { color: var(--muted); }
  .promises__note { margin-top: var(--s-6); max-width: 72ch; }
  .promises__links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin-top: var(--s-2); }
  .creds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); padding-top: var(--s-6); border-top: 1px solid var(--line); }
  .creds > div { display: flex; flex-direction: column-reverse; gap: var(--s-1); }
  .creds dd { margin: 0; font: var(--display-weight) clamp(1.75rem, 2.6vw, 2.25rem)/1.1 var(--font-display); letter-spacing: var(--display-tracking); color: var(--ink); }
  .creds dt { font-size: var(--t-small); color: var(--muted); }
  /* links inside sentences stay inline (no lifted underline, no arrow before punctuation) */
  :is(p, dd, .footer__lede) > .link { display: inline; min-height: 0; }
  :is(p, dd, .footer__lede) > .link::after { content: none; }
  .promises__links > .link { display: inline-flex; min-height: 44px; }
  .promises__links > .link::after { content: "\2192"; }
  /* one secondary-button look everywhere: an outline at the button height */
  html[data-buttons="block"] .btn--secondary { border: 1px solid currentColor; padding-inline: var(--s-5); text-decoration: none; }
  html[data-buttons="block"] .btn--secondary:hover { border-color: currentColor; background: color-mix(in oklab, currentColor 8%, transparent); }
  .footer__lede { line-height: 1.45; }
  #compare dd, .step p, .promise p { text-wrap: pretty; }
  @media (max-width: 1023px) { .creds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .fit-col--after { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-6); }
  .fit-col--after h3 { color: var(--accent); }
  .fit-col--after .rows > li { border-color: color-mix(in oklab, var(--line) 70%, var(--accent)); }
  @media (max-width: 1023px) { .fit-col--after { margin-top: var(--s-6); } }
  /* My Pet Meditation: one compact row at the top of the footer links */
  .pet-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: var(--s-6); align-items: center; padding-bottom: var(--s-7); margin-bottom: var(--s-7); border-bottom: 1px solid var(--line); }
  .pet-row__pic { width: 120px; height: 90px; object-fit: cover; border-radius: var(--r-md); }
  footer.closing .pet-row h3 { font: 500 var(--t-lead)/1.35 var(--font-text); color: var(--ink); margin: 0 0 var(--s-2); }
  .pet-row p { max-width: 60ch; color: var(--muted); }
  @media (max-width: 767px) { .pet-row { grid-template-columns: 96px minmax(0, 1fr); align-items: start; } .pet-row__pic { width: 96px; height: 72px; } .pet-row > .btn { grid-column: 1 / -1; justify-self: start; } }
  /* the owner's call: sections take the height of their content, with one even gap between them
     (the kit's one-section-per-screen rhythm left too much empty space) */
  main > :is(section, .section):not(.hero), footer.closing { height: auto; min-height: 0; padding-block: clamp(36px, 3vw, 44px); }
  main > .section .section-head { margin-bottom: 28px; gap: 10px; }
  main > :is(section, .section):not(.hero) > .wrap { height: auto; }
  footer.closing > .wrap { height: auto; display: grid; grid-template-rows: auto auto; row-gap: 40px; }
  footer.closing .closing__links { align-self: start; }
  @media (min-width: 640px) { .closing__cta > .close__media { flex: none; height: clamp(160px, 18vw, 240px); } }
  /* two light sections in a row: a hairline marks where one ends */
  #fit + #start, #why + #share, #share + #faq { border-top: 1px solid var(--line); }
  @media (max-width: 639px) {
    main > :is(section, .section):not(.hero), footer.closing { padding-block: 36px; }
    footer.closing { padding-bottom: calc(36px + var(--bar, 0px)); }
    .closing__cta > .close__media { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
    footer.closing:has(> .wrap > .closing__cta > .close__media) { min-height: 0; }
    footer.closing:has(> .wrap > .closing__cta > .close__media) > .wrap { grid-template-rows: auto auto; row-gap: 36px; }
  }
  /* tighter rhythm inside sections, so the page reads with less scrolling */
  main .rows > li { padding-block: 10px; }
  main .rows > li:first-child { padding-top: 0; }
  .fit-col h3 { margin-bottom: 12px; }
  .fit-col--after { padding: 20px 24px; }
  .faq > .faq__item { padding-block: 14px; gap: 6px; }
  .steps { row-gap: 32px; }
  .step { gap: 8px; }
  .step h3 { margin-top: 6px; }
  .steps__note { margin-top: 20px; }
  .promise { padding: 20px; gap: 8px; }
  .promises__note { margin-top: 20px; }
  .promises__links { margin-top: 4px; }
  #why .stack-6 { gap: 24px; }
  #why .stack-5 { gap: 16px; }
  .creds { padding-top: 20px; gap: 16px 20px; }
  #share .stack-5 { gap: 16px; }
  #share .form { gap: 14px; }
  .pet-row { padding-bottom: 24px; margin-bottom: 28px; gap: 20px; }
  #compare .card--plan { gap: 10px; }
  .hp { position: absolute; left: -9999px; }
  .check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-small); font-weight: 400; min-height: 44px; }
  .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: #0d7480; flex: none; }

/* contrast: the primary button keeps white text at 4.5:1 or more when hovered or pressed */
html:not([data-motion="off"]) .btn--primary:is(:hover, :focus-visible, :active), .btn--primary:is(:hover, :focus-visible, :active) { background: #0a5f69; border-color: #0a5f69; color: #fff; }
html:not([data-motion="off"]) :is(.ground-inverse, .footer--dark) .btn--primary:is(:hover, :focus-visible, :active) { background: #e3ebee; border-color: #e3ebee; color: #1f3038; }

/* 1024–1279px: the six menu words and "Work with me" do not fit together; the footer keeps the Edge52 link */
@media (min-width: 1024px) and (max-width: 1279px) { .nav__actions > .nav__link { display: none; } }
