/* ==========================================================================
   / — home page styles (Hamlet Homepage.dc.html)
   Loaded only on this page via $pageCss = ['contact', 'home'] (contact.css
   brings the enquiry form's paper-plane animation). Shared components come
   from site.css.
   ========================================================================== */

/* Section heading on this page runs a size larger than .h2 */
.home-h2 {
    font-family: var(--f-display); font-weight: 800;
    font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -0.025em;
}
.home-h2 .hl { padding: 0 10px; border-radius: 16px; }

.home-btns { gap: 12px; }
.home-btn-26 { padding-left: 26px; padding-right: 26px; }

/* ---------- Hero: full-width photo with the teal card overlapping it ---------- */
.home-hero { display: flex; flex-direction: column; }
.home-hero__media {
    position: relative; height: clamp(380px, 64vh, 680px);
    border-radius: 48px 48px 12px 48px; overflow: hidden; background: var(--c-teal-tint);
}
.home-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; }

.home-hero__card {
    position: relative; background: var(--c-teal); color: var(--c-ink);
    border-radius: 40px 40px 40px 10px; padding: clamp(24px, 3vw, 40px);
    max-width: 540px; margin: clamp(-220px, -18vw, -130px) 0 0 clamp(16px, 3vw, 40px);
    display: flex; flex-direction: column; gap: 18px;
}
/* Desktop: the card sits inside the photo's bottom-left corner instead of
   hanging below it, so there's no empty strip beside it. Both share one grid
   cell; the photo grows if the card is ever taller than it. */
@media (min-width: 1000px) {
    .home-hero { display: grid; }
    .home-hero__media, .home-hero__card { grid-area: 1 / 1; }
    .home-hero__media { height: auto; min-height: clamp(520px, 68vh, 680px); }
    .home-hero__img { position: absolute; inset: 0; object-position: 50% 30%; }
    .home-hero__card { align-self: end; max-width: 640px; margin: 40px; }
}
/* Up to wide screens the people in the photo sit where the card would be, so
   the card sits beside the photo instead, overlapping its edge by 48px. */
@media (min-width: 1000px) and (max-width: 1799px) {
    .home-hero { grid-template-columns: clamp(440px, 40vw, 580px) 48px minmax(0, 1fr); }
    .home-hero__card { grid-area: 1 / 1 / 2 / 3; align-self: center; max-width: none; margin: 0; }
    .home-hero__media { grid-area: 1 / 2 / 2 / 4; }
}
.home-hero__kicker { font-weight: 700; font-size: 16px; }
.home-hero__title {
    font-family: var(--f-display); font-weight: 800;
    font-size: clamp(36px, 4.5vw, 64px); line-height: .95; letter-spacing: -0.03em;
}
.home-hero__text { font-size: 17px; line-height: 1.55; text-wrap: pretty; }

/* ---------- Stats ---------- */
.home-stats {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
}
.home-stats__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.home-stat { border-radius: 32px; padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.home-stat__num { font-family: var(--f-display); font-weight: 800; font-size: 52px; line-height: 1; }
.home-stat__text { font-size: 17px; font-weight: 500; }

/* ---------- Services ---------- */
.home-svc-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
}
.home-svc-pair {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.home-svc {
    background: var(--c-white); border: 2px solid var(--c-ink); border-radius: 32px; padding: 30px;
    display: flex; flex-direction: column; gap: 14px;
}
.home-svc:hover { color: var(--c-ink); }
.home-svc.hover-tint-pink:hover   { background: var(--c-pink-tint); }
.home-svc.hover-tint-yellow:hover { background: var(--c-yellow-tint); }
.home-svc.hover-tint-orange:hover { background: var(--c-orange-tint); }
.home-svc.hover-tint-teal:hover   { background: var(--c-teal-tint); }
.home-svc__icon { width: 48px; height: 48px; border-radius: 16px 16px 16px 4px; }
/* A service's illustration (Services admin), in place of the colour tile.
   Decorative (alt=""): the card's title already says what it is. */
.home-svc__img {
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
    border: 2px solid var(--c-ink); border-radius: 20px 20px 20px 6px; background: var(--c-cream);
}
.home-svc__title { font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1.05; }
.home-svc__text { font-size: 17px; line-height: 1.5; }
.home-svc__more { font-weight: 700; }

/* ---------- "Built to last" ---------- */
.home-how {
    border-radius: var(--r-hero); padding: clamp(36px, 6vw, 80px);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 48px; align-items: start;
}
.home-how__list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.home-how__say {
    background: var(--c-cream); border-radius: 24px 24px 24px 6px; padding: 20px 24px;
    font-size: 18px; font-weight: 500; line-height: 1.45;
}
.home-how__say--right { border-radius: 24px 24px 6px 24px; margin-left: clamp(0px, 4vw, 48px); }
.home-how__say--teal { background: var(--c-teal); color: var(--c-ink); font-weight: 600; }

/* ---------- Products ---------- */
.home-prods {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.home-prods__more {
    display: grid; gap: 16px; align-content: start;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(200px, calc(50% - 8px))), 1fr));
}
.home-prod { border-radius: 32px; padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.home-prod > .chip { align-self: flex-start; }
.home-prod--featured { color: var(--c-ink); gap: 16px; }
.home-prod--wide { grid-column: 1 / -1; }
.home-prod__name { font-family: var(--f-display); font-weight: 800; font-size: 30px; line-height: 1; }
.home-prod__name--lg { font-size: 40px; }
.home-prod__text { font-size: 17px; line-height: 1.5; }
.home-prod__text--lg { font-size: 18px; }
.home-prod__shot {
    flex: 1; min-height: 200px; border-radius: 24px;
    background: repeating-linear-gradient(135deg, #52dcdf 0 10px, #45d8db 10px 20px);
    display: flex;
}
.home-prod__shot .img-ph { color: #164a4c; }
.home-prod__shot img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; border: 2px solid var(--c-ink); display: block; }
/* The featured product's link, with a bit of flair but still plainly a link:
   a hand-drawn pink squiggle for the underline, a pulsing "live" dot, and on
   hover a yellow highlighter swipe, the squiggle rippling along and the arrow
   badge turning to point up and out (it leaves the site). Flex so the badge
   centres on the text. The squiggle is a data: SVG, which the CSP's img-src
   allows. */
.home-prod__link {
    display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
    color: var(--c-ink); font-weight: 700; font-size: 18px; text-decoration: none;
}
.home-prod__link:hover { color: var(--c-ink); }
.home-prod__link-text {
    position: relative; padding: 2px 6px; margin: 0 -6px; border-radius: 8px 8px 8px 2px;
    background: linear-gradient(var(--c-yellow), var(--c-yellow)) no-repeat 0 50% / 0% 100%;
    transition: background-size .35s var(--ease-spring);
}
.home-prod__link-text::after {
    content: ""; position: absolute; left: 6px; right: 6px; bottom: -7px; height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 4 Q4 0.5 8 4 T16 4' fill='none' stroke='%23e5336f' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 50% / 16px 8px;
}
.home-prod__link:hover .home-prod__link-text,
.home-prod__link:focus-visible .home-prod__link-text { background-size: 100% 100%; }
.home-prod__link:hover .home-prod__link-text::after { animation: hdSquiggle .5s linear infinite; }
@keyframes hdSquiggle { to { background-position-x: 16px; } }

/* The squiggle hangs 7px below the words, so the badge and the live dot drop
   by half that (a 7px top margin in a centred flex row) to sit centred on the
   words and squiggle together. */
.home-prod__link .arrow, .home-prod__live { margin-top: 7px; }
.home-prod__link .arrow {
    width: 34px; height: 34px; margin-left: 0; vertical-align: 0; border-width: 2.5px;
    transition: transform .35s var(--ease-pop);
}
.home-prod__link .arrow svg { width: 16px; height: auto; }
/* Site-wide, a hovered arrow badge turns teal — invisible on this teal card —
   so here it turns pink with a cream arrow, matching the squiggle. */
.home-prod__link:hover .arrow,
.home-prod__link:focus-visible .arrow { transform: rotate(-45deg) scale(1.12); background: var(--c-pink); }
.home-prod__link:hover .arrow path,
.home-prod__link:focus-visible .arrow path { stroke: var(--c-cream); }

.home-prod__live {
    position: relative; flex: none; width: 10px; height: 10px; border-radius: 50%;
    background: var(--c-pink); border: 2px solid var(--c-ink);
}
.home-prod__live::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid var(--c-pink); opacity: 0;
    animation: hdLivePulse 2s ease-out infinite;
}
@keyframes hdLivePulse { 0% { transform: scale(.4); opacity: .9; } 80%, 100% { transform: scale(1.3); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .home-prod__link-text, .home-prod__link .arrow { transition: none; }
    .home-prod__link:hover .home-prod__link-text::after, .home-prod__live::after { animation: none; }
}

.home-chip--yellow { background: var(--c-yellow); color: var(--c-ink); }
.home-chip--new { background: var(--c-pink-text); color: var(--c-white); }

/* TwoCans banner */
.home-twocans {
    border-radius: var(--r-panel); padding: clamp(28px, 4vw, 48px);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 40px; align-items: center;
}
.home-twocans__copy { display: flex; flex-direction: column; gap: 18px; }
.home-twocans__chips { gap: 8px; }
.home-twocans__name { font-family: var(--f-display); font-weight: 800; font-size: clamp(36px, 4vw, 52px); line-height: 1; }
.home-twocans__tag { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1.2; }
.home-twocans__text { font-size: 18px; line-height: 1.55; text-wrap: pretty; }
.home-twocans__shots {
    display: grid; grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr); gap: 14px; align-items: end;
}
.home-twocans__img {
    display: block; width: 100%; height: auto;
    border-radius: 32px 32px 32px 8px; border: 3px solid var(--c-ink);
}

/* ---------- Contact panel ---------- */
.home-contact { position: relative; }
.home-contact__panel {
    background: var(--c-yellow); border-radius: 48px 48px 48px 0; padding: clamp(36px, 6vw, 80px);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 48px; position: relative; overflow: hidden;
}
.home-contact__panel > :not(.blob) { position: relative; }
.home-contact__blob { left: -60px; bottom: -60px; width: 200px; height: 200px; }
.home-contact__copy { display: flex; flex-direction: column; gap: 20px; }
.home-contact__title {
    font-family: var(--f-display); font-weight: 800;
    font-size: clamp(40px, 5vw, 72px); line-height: .98; letter-spacing: -0.025em;
}
.home-contact__text { font-size: 19px; line-height: 1.6; max-width: 460px; text-wrap: pretty; }
.home-contact__ticks {
    display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none;
    font-weight: 600; font-size: 16px;
}

.home-form {
    background: var(--c-cream); border-radius: 32px; padding: 32px;
    display: flex; flex-direction: column; gap: 16px;
}

.home-done {
    background: var(--c-cream); border-radius: 32px 32px 32px 8px; padding: 40px;
    display: flex; flex-direction: column; gap: 12px; justify-content: center;
}
.home-done:focus { outline: none; }
.home-done__title { font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 1.05; }
.home-done__text { font-size: 18px; line-height: 1.5; }

/* ---------- Status labels on the smaller product cards ----------
   Not just a word in a pill: the label shows the state. In development —
   a slowly turning cog and faint "work in progress" stripes drifting through
   the pill. Planned — a pencil that doodles now and then. Both get the
   site's offset ink shadow. Driven by the product's status. */
.home-status {
    display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
    padding: 5px 14px 5px 9px; box-shadow: 0 3px 0 var(--c-ink);
}
.home-status__icon { width: 20px; height: 20px; flex: none; overflow: visible; }
.home-status__icon circle, .home-status__icon path {
    fill: none; stroke: var(--c-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.home-status__teeth { stroke-width: 3; stroke-dasharray: 2.99 2.98; stroke-linecap: butt; }
.home-status__cog circle:nth-child(2) { fill: var(--c-yellow); stroke-width: 1.8; }
.home-status__hub { fill: var(--c-ink); stroke: none; }
.home-status__pencil path:first-child { fill: var(--c-pink); }

.home-status--in-development {
    background:
        repeating-linear-gradient(-45deg, rgba(59, 23, 88, .07) 0 5px, transparent 5px 10px) 0 0 / 28.28px 28.28px,
        var(--c-cream);
    animation: hdWip 1.6s linear infinite;
}
@keyframes hdWip { to { background-position: 28.28px 0, 0 0; } }
.home-status__cog { animation: hdCog 4s linear infinite; transform-origin: 50% 50%; }
@keyframes hdCog { to { transform: rotate(360deg); } }

.home-status__pencil { transform-origin: 20% 80%; animation: hdDoodle 3.2s ease-in-out infinite; }
@keyframes hdDoodle {
    0%, 70%, 100% { transform: none; }
    76% { transform: rotate(-14deg) translateX(-1px); }
    82% { transform: rotate(8deg) translateX(1px); }
    88% { transform: rotate(-8deg); }
    94% { transform: rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
    .home-status--in-development, .home-status__cog, .home-status__pencil { animation: none; }
}

/* ---------- "Get it on GitHub" (the TwoCans banner) ----------
   GitHub's light theme (white, #1f2328 text and mark) laid out like an app-store
   badge, in the site's chunky pressed-pill shape with a pink shadow so it
   still belongs to the pink banner. Hover: presses like every .btn, the cat
   waves, and a shine sweeps across. */
.btn-github {
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; gap: 12px;
    padding: 10px 26px 10px 18px; border-radius: var(--r-pill);
    background: #fff; color: #1f2328; text-decoration: none;
    border: 3px solid var(--c-ink); box-shadow: 0 6px 0 var(--c-pink);
    transition: transform .08s, box-shadow .08s;
}
.btn-github:hover, .btn-github:focus-visible { color: #1f2328; background: #f6f8fa; transform: translateY(4px); box-shadow: 0 2px 0 var(--c-pink); }
.btn-github:active { transform: translateY(6px); box-shadow: 0 0 0 var(--c-pink); }
.btn-github__mark { width: 30px; height: 30px; flex: none; fill: #1f2328; transform-origin: 50% 85%; }
.btn-github:hover .btn-github__mark { animation: hdOctoWave .7s ease-in-out; }
@keyframes hdOctoWave {
    0%, 100% { transform: none; }
    20% { transform: rotate(-14deg) scale(1.08); }
    45% { transform: rotate(10deg) scale(1.08); }
    70% { transform: rotate(-5deg); }
}
.btn-github__label { display: flex; flex-direction: column; line-height: 1; }
.btn-github__label small {
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #59636e;
}
.btn-github__label strong { font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; margin-top: 3px; }
/* The shine: a faint pink diagonal band that crosses once per hover. */
.btn-github::after {
    content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -60%; width: 45%;
    background: linear-gradient(100deg, transparent, rgba(229, 51, 111, .14), transparent);
    transform: skewX(-20deg); pointer-events: none;
}
.btn-github:hover::after { animation: hdShine .7s ease-out; }
@keyframes hdShine { to { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
    .btn-github:hover .btn-github__mark, .btn-github:hover::after { animation: none; }
}
