/* SubMac platform homepage. iOS language: paper surface, system type, one
   steel-blue accent, hairline rules. One photograph in the hero, real tool
   screenshots throughout. No pills, no equal-size card grid, no gradients
   except the functional fade that blends the photo into the page. */

.p-main { padding-bottom: clamp(48px, 6vw, 88px); }

/* hero: photo fades into paper so the section below continues the surface */
.h-hero { position: relative; padding: clamp(42px, 6vw, 96px) 0 clamp(36px, 5vw, 72px); isolation: isolate; }
.h-photo {
  position: absolute; inset: 0; z-index: -1;
  background: url('/img/hero.jpg?v=2') center 42% / cover no-repeat;
  opacity: .3;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 94%);
}
html[data-theme="dark"] .h-photo { opacity: .2; }
.h-hero h1 { margin: 0; max-width: 22ch; }
.h-lede { margin: 1rem 0 2rem; max-width: 56ch; color: var(--ios-label-2); font-size: clamp(1rem, .94rem + .4vw, 1.18rem); line-height: 1.55; }

/* flat search: a single baseline, no inset ring */
.h-search { display: flex; align-items: center; gap: .85rem; max-width: 700px; padding: .55rem 0; border-bottom: 1px solid var(--ios-label-3); box-shadow: none; }
.h-search svg { width: 20px; height: 20px; flex: none; color: var(--ios-label-2); fill: none; stroke: currentColor; stroke-width: 1.8; }
.h-search input {
  flex: 1; min-width: 0; min-height: 40px;
  font: 400 1.05rem/1.4 var(--ios-font); color: var(--ios-label);
  background: transparent !important; border: 0 !important;
  box-shadow: none !important; outline: 0 !important; border-radius: 0 !important;
  padding: 0 !important;
}
.h-search input::placeholder { color: var(--ios-label-3); }
.h-search .btn { flex: none; border-radius: 8px; }
.h-quick { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; }
.h-quick button { border: 0; border-bottom: 1px solid var(--ios-sep); border-radius: 0; background: transparent; color: var(--ios-label-2); font: 500 .875rem/1.4 var(--ios-font); padding: 0 0 2px; cursor: pointer; }
.h-quick button:hover { color: var(--ios-tint); border-color: var(--ios-tint); }
.h-results { max-width: 700px; margin-top: 1rem; background: var(--ios-surface-bg); border: 1px solid var(--ios-sep); border-radius: 6px; box-shadow: var(--ios-shadow); overflow: hidden; }
.h-results[hidden] { display: none; }
.h-results-head { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid var(--ios-sep); font-size: .75rem; color: var(--ios-label-3); }
.h-result { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--ios-sep); text-decoration: none; color: var(--ios-label); }
.h-result:last-child { border-bottom: 0; }
.h-result:hover, .h-result.is-active { background: var(--ios-fill); }
.h-result b { display: block; font-size: .9375rem; font-weight: 600; }
.h-result span { display: block; margin-top: .15rem; font-size: .8125rem; color: var(--ios-label-2); }
.h-kind { padding: 3px 7px; border: 1px solid var(--ios-sep); border-radius: 4px; font-size: .7rem; color: var(--ios-label-2); white-space: nowrap; }
.h-empty { padding: 1rem; font-size: .875rem; color: var(--ios-label-2); }

/* shared section rhythm */
.h-section { margin-top: clamp(56px, 5vw + 30px, 108px); }
.h-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ios-label); }
.h-head h2 { margin: 0; }
.h-head p { margin: 0; max-width: 46ch; font-size: .9375rem; line-height: 1.55; color: var(--ios-label-2); }

/* tool tiles: varied scale, images lead, no card containers */
.h-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(24px, 3vw, 36px); }
@media (min-width: 900px) { .h-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.h-tool { display: block; padding: 10px; border: 1px solid var(--ios-sep); border-radius: 6px; text-decoration: none; color: inherit; transition: transform var(--ios-dur-2) var(--ios-ease-out), box-shadow var(--ios-dur-2) var(--ios-ease-out); }
.h-tool:hover, .h-tool:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 24px -16px rgba(0,0,0,.5); }
.h-shot { overflow: hidden; border-radius: 4px; background: #fff; }
.h-shot img { display: block; width: 100%; height: 132px; object-fit: cover; object-position: center center; }
.h-meta { display: block; padding-top: .7rem; }
.h-meta h3 { margin: 0; font-size: .9375rem; font-weight: 700; letter-spacing: -.01em; }
.h-meta p { margin: .25rem 0 0; font-size: .8125rem; line-height: 1.45; color: var(--ios-label-2); }
.h-open { display: none; }
.h-kind { display: block; margin-top: .4rem; font-size: .75rem; color: var(--ios-label-3); }

/* the workflow, our own structure */
.h-flow { margin-top: clamp(64px, 6vw, 110px); padding: clamp(28px, 3vw, 48px) 0; border-top: 1px solid var(--ios-label); border-bottom: 1px solid var(--ios-label); }
.h-flow h2 { margin: 0 0 .6rem; }
.h-flow > p { margin: 0 0 2.5rem; max-width: 60ch; color: var(--ios-label-2); }
.h-flow-steps { display: grid; gap: 2rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .h-flow-steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
.h-flow-steps li { position: relative; padding-top: 1rem; border-top: 1px solid var(--ios-sep); }
.h-flow-n { font-size: .75rem; font-weight: 700; color: var(--ios-tint); font-variant-numeric: tabular-nums; }
.h-flow-steps h3 { margin: .5rem 0 .4rem; font-size: 1.0625rem; font-weight: 700; }
.h-flow-steps p { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--ios-label-2); }

/* categories: two image-led panels, no fills */
.h-cats { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; margin-top: clamp(28px, 3vw, 44px); }
@media (min-width: 760px) { .h-cats { grid-template-columns: 1fr 1fr; } }
.h-cat { text-decoration: none; color: inherit; display: block; }
.h-cat img { width: 100%; height: 200px; object-fit: cover; object-position: center center; border: 1px solid var(--ios-sep); border-radius: 6px; }
.h-cat h3 { margin: .9rem 0 .35rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.h-cat p { margin: 0 0 .5rem; font-size: .875rem; line-height: 1.55; color: var(--ios-label-2); }
.h-cat span { font-size: .8125rem; font-weight: 600; color: var(--ios-tint); }

/* plain statements */
.h-why { display: grid; gap: 0; grid-template-columns: 1fr; margin-top: clamp(28px, 3vw, 44px); }
@media (min-width: 760px) { .h-why { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.h-why div { padding: 1.1rem 0; border-top: 1px solid var(--ios-sep); }
.h-why b { display: block; font-size: .9375rem; }
.h-why span { display: block; margin-top: .3rem; font-size: .875rem; line-height: 1.55; color: var(--ios-label-2); }

/* guides */
.h-guides { margin-top: clamp(28px, 3vw, 44px); }
.h-guide { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline; padding: 1.1rem 0; border-bottom: 1px solid var(--ios-sep); text-decoration: none; color: inherit; }
.h-guide:first-child { border-top: 1px solid var(--ios-sep); }
.h-guide b { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.h-guide small { display: block; margin-top: .25rem; color: var(--ios-label-3); font-size: .75rem; }
.h-guide span { font-size: .8125rem; font-weight: 600; color: var(--ios-tint); }

.h-cta { margin-top: clamp(64px, 6vw, 112px); padding-top: clamp(28px, 3vw, 44px); border-top: 1px solid var(--ios-label); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1.5rem; }
.h-cta h2 { margin: 0; }
.h-cta p { margin: .4rem 0 0; color: var(--ios-label-2); }
.h-cta .btn { border-radius: 8px; }

/* homepage fixes, 2026-11-17 (Hark audit)
   - section spacing: .wrap's `margin: 0 auto` was cancelling .h-section's
     margin-top, so headings sat on the rule above. Spacing now uses padding.
   - tool images are rendered previews at 16:10, shown whole, not cropped strips.
   - tool labels are plain text, not boxed like inputs. */
main.p-main > section.h-section { margin-top: 0; padding-top: clamp(56px, 4vw + 36px, 104px); }
main.p-main > .h-flow + section.h-section { padding-top: clamp(48px, 3vw + 32px, 88px); }

.h-shot { background: #f3f1ec; }
.h-shot img { height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center top; }
.h-tool { padding: 8px 8px 14px; background: var(--ios-card, #fff); }
.h-meta { padding: .8rem .35rem 0; }
.h-tool .h-kind { display: inline-flex; align-items: center; gap: 6px; margin-top: .55rem; padding: 0; border: 0; border-radius: 0; background: none; font-size: .75rem; font-weight: 500; color: var(--ios-label-3); }
.h-tool .h-kind::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ios-label-3); opacity: .6; }
.h-tool .h-kind.is-paid { color: var(--ios-tint); }
.h-tool .h-kind.is-paid::before { background: var(--ios-tint); opacity: 1; }

.h-cat img { height: auto; aspect-ratio: 2 / 1; object-fit: cover; background: #f3f1ec; }
.h-cat span { display: inline-block; padding: 6px 0; }

.h-cta { margin-top: 0; padding-top: clamp(28px, 3vw, 44px); }
.p-main { padding-bottom: clamp(56px, 5vw, 80px); }
html .seo-links { padding-top: clamp(32px, 4vw, 48px); padding-bottom: clamp(32px, 4vw, 48px); border-top: 1px solid var(--ios-sep); }

/* header: solid enough that the hero photo doesn't ghost through */
html .site-head { background: rgba(250, 249, 246, .94); }
html[data-theme="dark"] .site-head { background: rgba(0, 0, 0, .9); }

/* comfortable tap targets for text links on touch screens */
@media (max-width: 759px) {
  .seo-links .foot-links a, .site-foot .foot-links a { display: inline-block; padding: 9px 0; }
  .h-quick { gap: .5rem 1.25rem; }
  .h-quick button { padding: 8px 0 4px; }
  .h-grid { gap: 12px; }
}
html[data-theme="dark"] .h-shot, html[data-theme="dark"] .h-cat img { background: #1c1c1e; }
main.p-main > .h-hero + section.h-section { padding-top: clamp(16px, 2vw + 8px, 40px); }

/* 2026-11-17b: hero photo clearer in light mode; tool and category cards use
   the site's iOS surface (rim gradient, inner gloss, 20px radius) like
   .plan, .feat and .free-row on the other pages. */
.h-photo { opacity: .82; background-position: center 45%; }
.h-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(248,247,244,.92) 0%, rgba(248,247,244,.72) 42%, rgba(248,247,244,.18) 78%, rgba(248,247,244,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 96%);
}
html[data-theme="dark"] .h-photo { opacity: .28; }
html[data-theme="dark"] .h-hero::before { display: none; }
@media (max-width: 759px) {
  .h-photo { opacity: .6; background-position: 70% 40%; }
  .h-hero::before { background: linear-gradient(180deg, rgba(248,247,244,.55), rgba(248,247,244,.8)); }
}

.h-tool, .h-cat {
  display: flex; flex-direction: column;
  padding: 8px; border: 1px solid transparent; border-radius: var(--r-lg, 20px);
  background: var(--ios-surface-bg); box-shadow: var(--ios-ring), var(--ios-shadow);
  text-decoration: none; color: inherit;
  transition: transform var(--ios-dur-2) var(--ios-ease-out), box-shadow var(--ios-dur-2) var(--ios-ease-out);
}
.h-tool:hover, .h-cat:hover, .h-tool:focus-visible, .h-cat:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--ios-ring), 0 14px 30px -22px rgba(0,0,0,.35);
}
.h-tool:active, .h-cat:active { transform: scale(.985); transition-duration: var(--ios-dur-1); }
.h-shot { border-radius: 13px; background: var(--ios-fill); }
.h-cat img { border: 0; border-radius: 13px; background: var(--ios-fill); }
.h-meta { flex: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px 10px 8px; }
.h-meta h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.015em; }
.h-meta p { color: var(--ios-label-2); }
.h-tool .h-open, .h-cat .h-open {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--ios-fill); color: var(--ios-label-2); font-size: 0; transition: background var(--ios-dur-1) var(--ios-ease), color var(--ios-dur-1) var(--ios-ease);
}
.h-tool .h-open::before, .h-cat .h-open::before {
  content: ''; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateX(-1px) rotate(45deg); border-radius: 1px;
}
.h-tool:hover .h-open, .h-cat:hover .h-open { background: var(--ios-tint); color: #fff; }
html[data-theme="dark"] .h-tool:hover .h-open, html[data-theme="dark"] .h-cat:hover .h-open { color: #000; }
.h-cat-body { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px 12px 10px; }
.h-cat h3 { margin: 0 0 .25rem; font-size: 1.125rem; font-weight: 600; }
.h-cat p { margin: 0; }
@media (max-width: 759px) {
  .h-tool { padding: 6px; border-radius: 16px; }
  .h-shot { border-radius: 11px; }
  .h-meta { grid-template-columns: 1fr; padding: 10px 6px 6px; }
  .h-tool .h-open { display: none; }
}

/* featured tool: Resume tailor gets a blue rim with a light that travels round the edge */
@property --h-spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.h-tool.is-featured {
  position: relative;
  background:
    linear-gradient(var(--ios-card), var(--ios-card)) padding-box,
    conic-gradient(from var(--h-spin), #3a78c2 0deg, #5aa0ec 50deg, #e6f3ff 90deg, #5aa0ec 130deg, #3a78c2 200deg, #3a78c2 360deg) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 0 4px rgba(79,143,214,.12), 0 0 28px 2px rgba(79,143,214,.38), 0 12px 30px -18px rgba(52,97,143,.6);
  animation: h-spin 5s linear infinite;
}
.h-tool.is-featured:hover, .h-tool.is-featured:focus-visible {
  box-shadow: 0 0 0 5px rgba(79,143,214,.16), 0 0 38px 4px rgba(79,143,214,.5), 0 16px 34px -20px rgba(52,97,143,.6);
}
.h-tool.is-featured .h-open { background: var(--ios-tint); color: #fff; }
@keyframes h-spin { to { --h-spin: 360deg; } }
html[data-theme="dark"] .h-tool.is-featured {
  background:
    linear-gradient(var(--ios-card), var(--ios-card)) padding-box,
    conic-gradient(from var(--h-spin), rgba(154,184,214,.3) 0deg, #6aa6e8 60deg, #d6ecff 90deg, #6aa6e8 120deg, rgba(154,184,214,.3) 200deg, rgba(154,184,214,.3) 360deg) border-box;
  box-shadow: 0 0 26px -4px rgba(106,166,232,.5);
}
html[data-theme="dark"] .h-tool.is-featured .h-open { color: #000; }
@media (prefers-reduced-motion: reduce) { .h-tool.is-featured { animation: none; --h-spin: 300deg; } }
