/* Homepage tiles (Apple-style): big centred titles, one-line tagline, two links, large picture */
.ap-tile { position: relative; overflow: hidden; text-align: center; padding: 56px 20px 0; background: var(--bg-alt, #f5f5f7); color: #1d1d1f; }
.ap-tile.ap-white { background: #fff; }
.ap-tile.ap-dark { background: #000; color: #f5f5f7; }
.ap-tile h1, .ap-tile h2, .ap-tile h3 { margin: 0; font-family: var(--font-head); font-weight: 600; letter-spacing: -.015em; color: inherit; line-height: 1.07; }
.ap-tile h1, .ap-tile h2 { font-size: clamp(2.4rem, 5.4vw, 3.5rem); }
.ap-tile h3 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.ap-sub { margin: 8px auto 0; font-size: clamp(1.15rem, 2.1vw, 1.75rem); line-height: 1.2; letter-spacing: .004em; color: inherit; max-width: 720px; }
.ap-grid .ap-sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.ap-links { margin: 18px 0 0; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ap-btn { display: inline-block; padding: 11px 22px; border-radius: 980px; font-size: 17px; line-height: 1.2; font-family: var(--font-main); font-weight: 400;
  background: #0071e3; color: #fff !important; border: 1px solid #0071e3; text-decoration: none; cursor: pointer; transition: background .2s; }
.ap-btn:hover { background: #0077ed; }
.ap-btn.ap-ghost { background: transparent; color: #0066cc !important; }
.ap-btn.ap-ghost:hover { background: #0071e3; color: #fff !important; }
.ap-dark .ap-btn.ap-ghost { color: #2997ff !important; border-color: #2997ff; }
.ap-dark .ap-btn.ap-ghost:hover { background: #2997ff; color: #fff !important; }
.ap-visual { margin: 34px auto 0; max-width: 980px; }

/* first tile: before / after */
.ap-first { padding-top: 64px; background: #fff; }
.ap-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; padding-bottom: 8px; }
.ap-ba figure { margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; position: relative; background: #f5f5f7; }
.ap-ba img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-ba .ap-checker { background: conic-gradient(#fff 25%, #e8e8ed 0 50%, #fff 0 75%, #e8e8ed 0) 0 0 / 26px 26px; }
.ap-ba figcaption { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 5px 14px; border-radius: 980px; background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px); font-size: 13px; font-weight: 500; color: #1d1d1f; white-space: nowrap; }
.ap-first + .hero { background: #fff; }

/* PDF tile: a document with a stamp and a signature */
.ap-doc { position: relative; width: min(520px, 88vw); aspect-ratio: 1 / 1.1; margin: 34px auto 0; background: #fff; border-radius: 18px 18px 0 0; padding: 38px 40px 0;
  text-align: left; color: #1d1d1f; box-shadow: 0 -10px 60px rgba(41, 151, 255, .25); }
.ap-doc b { display: block; font-size: 22px; letter-spacing: -.01em; }
.ap-doc i { display: block; height: 10px; border-radius: 6px; background: #e8e8ed; margin: 14px 0; }
.ap-doc i.s { width: 60%; } .ap-doc i.m { width: 82%; }
.ap-seal { position: absolute; right: 36px; bottom: 60px; width: 132px; height: 132px; border-radius: 50%; border: 5px solid #1f3fbf; color: #1f3fbf; display: grid; place-items: center;
  font: 800 15px/1 var(--font-main); letter-spacing: .08em; transform: rotate(-12deg); opacity: .88; box-shadow: inset 0 0 0 9px #fff, inset 0 0 0 11px #1f3fbf; }
.ap-sign { position: absolute; left: 40px; bottom: 74px; font: 54px/1 'Great Vibes', cursive; color: #1a3c9e; }
@font-face { font-family: 'Great Vibes'; font-display: swap; src: url(/vendor/fonts/great-vibes-r.ttf) format('truetype'); }

/* two-column tiles */
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; background: #fff; }
.ap-grid .ap-tile { border-radius: 0; padding: 48px 20px 0; min-height: 580px; display: flex; flex-direction: column; align-items: center; }
.ap-grid .ap-visual { margin-top: auto; padding-top: 26px; width: 100%; max-width: 420px; }
.ap-shot { width: 100%; aspect-ratio: 1 / 1; border-radius: 24px 24px 0 0; overflow: hidden; position: relative; }
.ap-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-shot.white { background: #fff; box-shadow: 0 -6px 30px rgba(0, 0, 0, .06); }
.ap-shot.checker { background: conic-gradient(#fff 25%, #e8e8ed 0 50%, #fff 0 75%, #e8e8ed 0) 0 0 / 24px 24px; }
.ap-shot.photo img.blur { position: absolute; inset: 0; }
.ap-big { font: 700 clamp(4rem, 9vw, 7rem)/1 var(--font-head); letter-spacing: -.04em; background: linear-gradient(90deg, #2997ff, #a259ff 60%, #ff6b9a); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 40px 0 70px; }
.ap-sizes { display: flex; gap: 12px; justify-content: center; padding: 34px 0 60px; flex-wrap: wrap; }
.ap-sizes span { width: 92px; aspect-ratio: 35 / 45; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #1d1d1f; }
.ap-sizes span.sq { aspect-ratio: 1; }

/* questions and the last call */
.ap-faq { max-width: 820px; margin: 0 auto; padding: 70px 20px 20px; }
.ap-faq h2 { text-align: center; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 26px; }
.ap-end { text-align: center; padding: 60px 20px 70px; background: #fff; }
.ap-end h2 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 0; }

@media (max-width: 760px) {
  .ap-grid { grid-template-columns: 1fr; padding: 0; gap: 10px; }
  .ap-grid .ap-tile { min-height: 0; padding-top: 40px; }
  .ap-ba { gap: 10px; }
  .ap-ba figure { border-radius: 18px; }
  .ap-tile { padding-top: 44px; }
}

/* ===== Hero: centred headline over floating glossy shapes (Apple colours, light stage) ===== */
.aps { position: relative; overflow: hidden; isolation: isolate; min-height: min(86vh, 760px); display: grid; place-items: center; padding: 110px 20px 130px; text-align: center;
  background: radial-gradient(ellipse at 50% 35%, #ffffff 0%, #fbfbfd 45%, #f0f0f3 100%); }
.aps-inner { position: relative; z-index: 3; max-width: 900px; }
.aps h1 { margin: 0 0 18px; font-family: var(--font-head); font-weight: 600; font-size: clamp(2.6rem, 6.4vw, 4.8rem); line-height: 1.05; letter-spacing: -.035em; color: #1d1d1f; text-wrap: balance; }
.aps h1 span { background: linear-gradient(90deg, #0071e3, #a259ff 55%, #ff375f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.aps-ticks { display: flex; gap: 8px 24px; justify-content: center; flex-wrap: wrap; margin: 0 0 30px; padding: 0; list-style: none; color: #6e6e73; font-size: 17px; }
.aps-ticks li::before { content: '✓'; margin-right: 6px; color: #1d1d1f; }
.aps-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.aps-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 980px; font: 400 17px/1.2 var(--font-main); letter-spacing: -.01em;
  background: #0071e3; color: #fff !important; border: 1px solid #0071e3; cursor: pointer; text-decoration: none; transition: background .2s, transform .2s; box-shadow: 0 10px 30px rgba(0, 113, 227, .28); }
.aps-btn:hover { background: #0077ed; transform: translateY(-1px); }
.aps-btn span { opacity: .85; }
.aps-btn.ghost { background: rgba(255, 255, 255, .7); color: #0066cc !important; border-color: #0071e3; box-shadow: none; backdrop-filter: blur(10px); }
.aps-btn.ghost:hover { background: #0071e3; color: #fff !important; }
.aps-note { margin: 18px 0 0; color: #86868b; font-size: 14px; }
.aps-floor { position: absolute; left: -50%; right: -50%; bottom: -12%; height: 55%; z-index: 0; transform: perspective(620px) rotateX(64deg); transform-origin: 50% 100%;
  background-image: linear-gradient(rgba(0, 0, 0, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .08) 1px, transparent 1px); background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%); }
.aps-o { position: absolute; z-index: 1; animation: apsFloat var(--d, 9s) ease-in-out infinite; animation-delay: var(--delay, 0s); will-change: transform; }
.aps-c { border-radius: 30%; box-shadow: inset -10px -14px 26px rgba(0, 0, 0, .16), inset 10px 12px 24px rgba(255, 255, 255, .6), 0 28px 50px rgba(0, 0, 0, .14); }
.aps-c::after { content: ''; position: absolute; inset: -12px; border-radius: 34%; border: 1.5px solid rgba(0, 0, 0, .06); }
.k-blue { background: linear-gradient(145deg, #5fb3ff, #0071e3 75%); }
.k-purple { background: linear-gradient(145deg, #c79bff, #8944ff 75%); }
.k-pink { background: linear-gradient(145deg, #ff8fb1, #ff375f 75%); }
.k-orange { background: linear-gradient(145deg, #ffc56b, #ff9500 75%); }
.k-green { background: linear-gradient(145deg, #7ee8a0, #28cd41 75%); }
.k-yellow { background: linear-gradient(145deg, #fff08a, #ffcc00 75%); }
.aps-soft { filter: blur(1.5px); opacity: .75; }
.aps-cut { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .18)); }
.aps-cut img { display: block; width: 100%; height: auto; }
.aps-pill { position: absolute; z-index: 2; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 8px 18px; border-radius: 980px; background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(0, 0, 0, .06); color: #6e6e73; font-size: 14px; text-decoration: none; white-space: nowrap; backdrop-filter: blur(10px); }
.aps-pill:hover { color: #1d1d1f; }
@keyframes apsFloat { 0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); } 50% { transform: translate3d(0, -18px, 0) rotate(calc(var(--r, 0deg) + 6deg)); } }
@media (prefers-reduced-motion: reduce) { .aps-o { animation: none; } }
@media (max-width: 760px) {
  .aps { min-height: 0; padding: 80px 16px 100px; }
  .aps-o.m-hide { display: none; }
  .aps-c { max-width: 60px; max-height: 60px; opacity: .55; }
}
.aps + .hero { background: #fff; padding-top: 40px; }

/* ---- phone speed (mobile_fix.py) ---- */
.aps-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px auto 0; max-width: 640px; }
.aps-quick a { padding: 9px 15px; border-radius: 980px; background: #fff; border: 1px solid #d2d2d7; color: #1d1d1f !important; font-size: 15px; text-decoration: none; white-space: nowrap; }
.aps-quick a:hover { border-color: #0071e3; color: #0071e3 !important; }
@media (max-width: 760px) {
  .aps-floor { display: none; }
  .aps-o { animation: none; will-change: auto; }
  .aps-c { box-shadow: none; }
  .aps-c::after { display: none; }
  .aps-soft { filter: none; }
  .aps-btn { box-shadow: none; transition: none; }
  .aps-btn.ghost, .aps-pill { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .aps-quick a { flex: 1 1 calc(50% - 8px); text-align: center; font-size: 14px; padding: 10px 8px; }
  .aps-pill { display: none; }
}

/* ---- headline font (OFL Poppins, self-hosted) ---- */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(/vendor/webfonts/poppins-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(/vendor/webfonts/poppins-latin-700-normal.woff2) format('woff2'); }
.aps h1 { font-family: 'Poppins', var(--font-head) !important; font-weight: 700 !important; letter-spacing: -.035em !important; font-size: clamp(2.4rem, 5.6vw, 4.4rem) !important; line-height: 1.06 !important; }
.aps-lead { margin: 0 auto 20px; max-width: 640px; font-size: 19px; line-height: 1.5; color: #515154; letter-spacing: -.005em; }
.aps-btn { font-family: 'Poppins', var(--font-main) !important; font-weight: 600 !important; letter-spacing: 0 !important; }

/* ---- tool cards floating in the hero (home_tiles.py) ---- */
.aps-o.aps-dec { display: none !important; }
a.aps-tile { width: var(--s, 166px); padding: 16px 14px 14px; transform: rotate(var(--r, 0deg)); border-radius: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.06); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(15,23,42,.10);
  color: #1d1d1f !important; text-decoration: none !important; z-index: 2; cursor: pointer; transition: box-shadow .25s, transform .25s; }
a.aps-tile::after { display: none !important; }
a.aps-tile .t-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 10px rgba(0,0,0,.10); }
a.aps-tile .t-i svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a.aps-tile b { font-family: 'Poppins', var(--font-head); font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: -.01em; color: #1d1d1f; }
a.aps-tile small { font-size: 12px; line-height: 1.35; color: #6e6e73; letter-spacing: 0; }
a.aps-tile .t-go { position: absolute; right: 12px; top: 14px; font-size: 15px; color: #c7c7cc; transition: color .2s, transform .2s; }
a.aps-tile:hover, a.aps-tile:focus-visible { animation-play-state: paused; outline: none; box-shadow: 0 0 0 3px rgba(0,113,227,.25), 0 18px 40px rgba(15,23,42,.16); }
a.aps-tile:hover .t-go, a.aps-tile:focus-visible .t-go { color: #0071e3; transform: translateX(2px); }
@media (max-width: 1599px) {
  .aps-inner { max-width: min(860px, calc(90vw - 380px)); }
  a.aps-tile { width: 150px; padding: 14px 13px 12px; }
  a.aps-tile.t1, a.aps-tile.t2, a.aps-tile.t3, a.aps-tile.t4 { right: auto !important; bottom: auto !important; }
  a.aps-tile.t5, a.aps-tile.t6, a.aps-tile.t7, a.aps-tile.t8 { left: auto !important; bottom: auto !important; }
  a.aps-tile.t1 { left: 1.5% !important; top: 7% !important; }  a.aps-tile.t2 { left: 4.5% !important; top: 30% !important; }
  a.aps-tile.t3 { left: 1% !important; top: 53% !important; }   a.aps-tile.t4 { left: 4% !important; top: 75% !important; }
  a.aps-tile.t5 { right: 2% !important; top: 8% !important; }   a.aps-tile.t6 { right: 4.5% !important; top: 31% !important; }
  a.aps-tile.t7 { right: 1.5% !important; top: 54% !important; } a.aps-tile.t8 { right: 4% !important; top: 76% !important; }
}
@media (max-width: 1299px) { a.aps-tile { width: 140px; padding: 13px 12px 11px; } a.aps-tile b { font-size: 14px; } .aps-inner { max-width: calc(92vw - 340px); } }
@media (max-width: 520px) { .aps .aps-btn { font-size: 15.5px !important; white-space: nowrap; padding-left: 18px !important; padding-right: 18px !important; } .aps h1 { letter-spacing: -.025em !important; } .aps-lead { font-size: 16.5px; } }
/* desktop: the cards already show the main tools, so the pill row under the buttons is only needed on smaller screens */
@media (min-width: 1024px) { .aps-quick { display: none !important; } }
/* tablets and phones: the cards hide; the "Popular tools" buttons under the hero cover the same tools */
@media (max-width: 1023px) { a.aps-tile { display: none; } .aps-inner { max-width: 900px; } }

/* ---- tools directory under the photo box (home_sections.py) ---- */
.hx { padding: 72px 20px 40px; background: #fff; }
.hx-wrap { max-width: 1160px; margin: 0 auto; }
.hx h2 { font-family: 'Poppins', var(--font-head); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.03em; line-height: 1.1; text-align: center; margin: 0 0 10px; color: #1d1d1f; }
.hx-sub { text-align: center; color: #6e6e73; font-size: 18px; margin: 0 auto 36px; max-width: 620px; }
.hx-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 10px rgba(0,0,0,.10); }
.hx-ico svg { width: 23px; height: 23px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hx-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.hx-cat { position: relative; border-radius: 22px; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 10px; border: 1px solid rgba(0,0,0,.05); transition: transform .2s, box-shadow .2s; }
.hx-cat:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15,23,42,.10); }
.hx-cat.t-pink { background: #fff1f4; } .hx-cat.t-orange { background: #fff6e9; } .hx-cat.t-blue { background: #eef5ff; } .hx-cat.t-purple { background: #f5efff; } .hx-cat.t-green { background: #ecfaf0; }
.hx-cat .hx-count { position: absolute; right: 16px; top: 18px; font-size: 12px; font-weight: 600; color: #515154; background: rgba(255,255,255,.85); border-radius: 999px; padding: 4px 10px; }
.hx-cat a.hx-main { font-family: 'Poppins', var(--font-head); font-weight: 600; font-size: 18px; color: #1d1d1f !important; text-decoration: none !important; letter-spacing: -.01em; }
.hx-cat a.hx-main::after { content: ''; position: absolute; inset: 0; border-radius: 22px; }
.hx-cat p { margin: 0; font-size: 14px; line-height: 1.45; color: #515154; flex: 1; }
.hx-cat .hx-feat { position: relative; z-index: 1; font-size: 13px; color: #6e6e73; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.07); }
.hx-cat .hx-feat a { font-weight: 600; color: #0071e3 !important; text-decoration: none !important; }
.hx-cat .hx-feat a:hover { text-decoration: underline !important; }
.hx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 44px 0 72px; padding: 26px 20px; border-radius: 22px; background: #f5f5f7; text-align: center; }
.hx-stats b { display: block; font-family: 'Poppins', var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -.02em; color: #1d1d1f; }
.hx-stats span { font-size: 14px; color: #6e6e73; }
.hx-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 26px; }
.hx-tabs button { font: inherit; font-size: 14.5px; font-weight: 600; padding: 9px 16px; border-radius: 999px; border: 1px solid #d2d2d7; background: #fff; color: #1d1d1f; cursor: pointer; }
.hx-tabs button[aria-selected="true"] { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }
.hx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
a.hx-tool { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid #e8e8ed; text-decoration: none !important; color: #1d1d1f !important; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.hx-tool:hover { border-color: #c7c7cc; box-shadow: 0 10px 26px rgba(15,23,42,.08); transform: translateY(-2px); }
a.hx-tool .hx-ico { width: 40px; height: 40px; border-radius: 12px; } a.hx-tool .hx-ico svg { width: 21px; height: 21px; }
a.hx-tool b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 2px; }
a.hx-tool i { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; color: #86868b; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
a.hx-tool span.hx-d { display: block; font-size: 13.5px; line-height: 1.4; color: #6e6e73; }
a.hx-tool[hidden] { display: none; }
.hx-more { text-align: center; margin-top: 30px; }
.hx-more a { display: inline-block; padding: 12px 22px; border-radius: 999px; background: #0071e3; color: #fff !important; font-weight: 600; text-decoration: none !important; }
@media (max-width: 1100px) { .hx-cats { grid-template-columns: repeat(3, 1fr); } .hx-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .hx { padding: 48px 16px 24px; } .hx-cats { grid-template-columns: 1fr 1fr; gap: 12px; } .hx-cat { padding: 18px 16px 14px; } .hx-cat p { font-size: 13.5px; }
  .hx-stats { grid-template-columns: 1fr 1fr; margin: 32px 0 48px; } .hx-grid { grid-template-columns: 1fr 1fr; gap: 10px; } a.hx-tool { padding: 14px 12px; gap: 10px; }
  .hx-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; } .hx-tabs button { white-space: nowrap; } }
@media (max-width: 480px) { .hx-cats { grid-template-columns: 1fr 1fr; gap: 10px; } .hx-cat { padding: 14px 12px 12px; gap: 8px; } .hx-cat:last-child { grid-column: 1 / -1; }
  .hx-cat p { display: none; } .hx-cat a.hx-main { font-size: 15.5px; } .hx-cat .hx-count { right: 10px; top: 12px; font-size: 11px; padding: 3px 8px; } .hx-cat .hx-feat { font-size: 12px; padding-top: 8px; }
  .hx-ico { width: 38px; height: 38px; border-radius: 11px; } .hx-grid { grid-template-columns: 1fr; } }
