/* ============================================================
   home.css — the home page (index.html) only
   Four bands, each advertising one part of the work:
   1. Company Brain  dark in both themes (.theme-dark), like /brain,
                     with a still of the formed particle brain
   2. clir           the clir.ai look: warm stone, a mountain lake,
                     the clir Voice phone (its own palette, both themes)
   3. Projects       tiles in the page theme
   4. Get in touch   the general inquiry form (contact-form.js)
   ============================================================ */

.home-band { position: relative; overflow: hidden; }
.home-band .container { position: relative; z-index: 1; }
.home-eyebrow { margin: 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.4; letter-spacing: 0; color: var(--text-3); }
.home-h { margin: 0; font-family: var(--font-sans); font-weight: 500; font-size: clamp(2.25rem, 4.4vw, 4rem); line-height: 1.02; letter-spacing: -0.045em; color: var(--text); text-wrap: balance; }
.home-h em { font-style: normal; color: var(--text-dim); }
.home-lead { margin: 0; max-width: 38rem; font-size: clamp(1.0625rem, 0.4vw + 0.95rem, 1.1875rem); line-height: 1.55; letter-spacing: -0.005em; color: var(--text-2); text-wrap: pretty; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.home-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.01em; color: var(--text-2); transition: color 150ms ease; }
.home-link:hover { color: var(--text); }

/* ---- hero: who I am, the big portrait (layout.css .hero), then a small index of the bands ---- */
.home-hero { padding-top: clamp(7rem, 13vh, 9rem); padding-bottom: clamp(4.5rem, 9vh, 6.5rem); }
.home-hero .home-eyebrow { margin-bottom: 1.5rem; }
.home-hero .hero__title { font-size: clamp(3rem, 6vw, 5.75rem); max-width: 12ch; }
.home-num span { font-family: var(--font-mono); font-size: 11px; color: var(--accent-mind); }

/* each band opens with its number: one of several things */
.home-num { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.home-clir .home-num { color: var(--clir-muted); }
.home-clir .home-num span { color: var(--clir-accent); }

/* ---- 1. Company Brain ---- */
.home-cb { background: var(--bg); color: var(--text); padding: clamp(5.5rem, 11vh, 8rem) 0 clamp(5rem, 10vh, 7rem); }
.home-cb::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 72% 38%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 55% at 72% 38%, #000 15%, transparent 72%); }
.home-cb__grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .home-cb__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; } }
.home-cb__copy { display: flex; flex-direction: column; gap: 1.75rem; }
.home-who { display: flex; align-items: center; gap: 0.75rem; }
.home-who img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; filter: var(--photo-grade); }
.home-who span { display: flex; flex-direction: column; gap: 2px; }
.home-who strong { font-size: 0.875rem; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.home-who small { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.home-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.6rem; min-height: 32px; padding: 0.35rem 0.85rem 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 0.8125rem; line-height: 1.35; color: var(--text-2); }
.home-badge::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-mind); animation: home-ring 2s ease-out infinite; }
@keyframes home-ring { 0% { box-shadow: 0 0 0 0 rgba(140, 203, 255, .45); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
.home-cb .home-h { font-size: clamp(2.375rem, 3.9vw, 3.75rem); }
.home-cb .home-h .accent { color: var(--accent-mind); }

/* the two ways to get it: the software and the service */
.home-offers { display: grid; gap: 0.875rem; }
@media (min-width: 640px) { .home-offers { grid-template-columns: 1fr 1fr; } }
.home-offer { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.25rem 1.25rem 1.375rem; border-radius: 16px; border: 1px solid var(--line); background: rgba(14, 16, 21, .62); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.home-offer__tag { align-self: flex-start; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.home-offer h3 { margin: 0.25rem 0 0; font-size: 1.1875rem; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; color: var(--text); }
.home-offer p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }

/* the brain still, on its own near-black, with the three numbers under it */
.home-cb__visual { position: relative; display: flex; flex-direction: column; gap: 1.25rem; }
.home-cb__visual figure { position: relative; margin: 0; }
.home-cb__visual figure::after { content: ''; position: absolute; inset: 12% 10%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(140, 203, 255, .10), transparent); }
.home-cb__visual img { display: block; width: 100%; height: auto; filter: brightness(1.25) contrast(1.05);
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 48%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 48%, #000 55%, transparent 100%); }
.home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.home-stats li { display: flex; flex-direction: column; gap: 0.35rem; padding-top: 0.875rem; border-top: 1px solid var(--line); }
.home-stats strong { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.home-stats span { font-size: 0.8125rem; line-height: 1.45; color: var(--text-3); }
.home-stats a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.home-cb__offer { margin: 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.home-cb__offer strong { color: var(--text); font-weight: 500; }

/* ---- 2. clir: the clir.ai look (warm stone, near-black type, mint) in both themes ---- */
.home-clir {
  --clir-bg: #F4F3EF; --clir-text: #1F201E; --clir-muted: #5D605B; --clir-line: rgba(31, 32, 30, .12); --clir-accent: #0C8A68;
  background: var(--clir-bg); color: var(--clir-text); padding: clamp(5.5rem, 11vh, 8rem) 0 0; isolation: isolate;
}
.home-clir__landscape { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; opacity: .62; }
.home-clir::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--clir-bg) 0%, rgba(244, 243, 239, .86) 38%, rgba(244, 243, 239, .1) 70%); }
.home-clir__grid { display: grid; gap: 2.5rem; align-items: end; }
@media (min-width: 960px) { .home-clir__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; } }
.home-clir__copy { display: flex; flex-direction: column; gap: 1.5rem; padding-bottom: clamp(3.5rem, 8vh, 6rem); }
.home-clir__logo { align-self: flex-start; width: auto; height: 28px; }
.home-clir .home-eyebrow { color: var(--clir-muted); }
.home-clir .home-h { color: var(--clir-text); font-weight: 600; letter-spacing: -0.05em; font-size: clamp(2.75rem, 5.6vw, 5rem); line-height: 0.98; }
.home-clir .home-lead { color: var(--clir-muted); }
.home-clir__apps { display: grid; gap: 0.625rem; margin: 0.5rem 0 0; padding: 0; list-style: none; max-width: 34rem; }
.home-clir__app { display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem 0.875rem; border-radius: 14px; border: 1px solid var(--clir-line); background: rgba(255, 255, 255, .62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color 150ms ease; }
.home-clir__app:hover { background: rgba(255, 255, 255, .9); }
.home-clir__app img { flex: none; width: 44px; height: 44px; border-radius: 11px; }
.home-clir__app span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.home-clir__app strong { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; color: var(--clir-text); }
.home-clir__app small { font-size: 0.8125rem; line-height: 1.4; color: var(--clir-muted); }
.home-clir__app i { margin-left: auto; font-style: normal; color: var(--clir-muted); }
.home-clir .btn--primary { background: var(--clir-text); color: var(--clir-bg); }
.home-clir .btn--primary:hover { background: #000; color: #fff; }
.home-clir .home-link { color: var(--clir-muted); }
.home-clir .home-link:hover { color: var(--clir-text); }
.home-clir :focus-visible { outline-color: var(--clir-accent); }
/* stacked (phones, tablets): the copy runs full width, so the stone fades from the top
   and the lake shows only behind the phone at the bottom */
@media (max-width: 959px) {
  .home-clir__landscape { object-position: 70% bottom; opacity: .55; }
  .home-clir::after { background: linear-gradient(180deg, var(--clir-bg) 0%, var(--clir-bg) 55%, rgba(244, 243, 239, .55) 78%, rgba(244, 243, 239, .1) 100%); }
}

/* the clir Voice phone, standing on the lower edge (same composition as clir.ai) */
.home-clir__phone { justify-self: center; width: min(300px, 70vw); margin-bottom: -2px; }
.home-clir__phone .device-frame { position: relative; aspect-ratio: 900 / 1837; filter: drop-shadow(0 30px 50px rgba(20, 30, 25, .28)); }
.home-clir__phone .device-screen { position: absolute; left: 5.1%; top: 2.2%; width: 89.8%; height: 95.6%; overflow: hidden; border-radius: 12% / 5.52%; background: #000; }
.home-clir__phone .device-screen img { width: 100%; height: 100%; object-fit: cover; }
.home-clir__phone .device-bezel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; clip-path: inset(.35% 1% round 16% / 8%); }
/* the band's lower edge crops the phone, so it stands up out of the bottom */
.home-clir__phone { margin-bottom: max(-38vw, -220px); }
@media (min-width: 960px) { .home-clir__phone { width: 340px; align-self: end; margin-bottom: -240px; } }

/* ---- 3. other projects: deliberately quiet, a row of small text cards ---- */
.home-projects { padding: clamp(4rem, 8vh, 5.5rem) 0; border-top: 1px solid var(--line); }
.home-projects__head { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.75rem; }
.home-projects__title { margin: 0; font-size: clamp(1.375rem, 1.8vw, 1.75rem); font-weight: 500; letter-spacing: -0.025em; color: var(--text); }
.home-tiles { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .home-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.home-tile a { position: relative; display: flex; flex-direction: column; gap: 0.4rem; height: 100%; padding: 1rem 2.25rem 1.125rem 1rem; border-radius: 14px; border: 1px solid var(--line); transition: border-color 150ms ease, background-color 150ms ease; }
.home-tile a:hover { border-color: var(--line-strong); background: var(--surface); }
.home-tile__meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.home-tile h3 { margin: 0; font-size: 1rem; font-weight: 500; letter-spacing: -0.015em; color: var(--text); }
.home-tile p { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--text-3); }
.home-tile__go { position: absolute; top: 0.9rem; right: 1rem; font-size: 0.875rem; color: var(--text-3); transition: color 150ms ease; }
.home-tile a:hover .home-tile__go { color: var(--text); }

/* ---- 4. get in touch ---- */
.home-contact { padding: clamp(5.5rem, 11vh, 8rem) 0 clamp(6rem, 12vh, 9rem); border-top: 1px solid var(--line); }
.home-contact__grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .home-contact__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; } }
.home-contact__intro { display: flex; flex-direction: column; gap: 1.5rem; }
.home-direct { display: flex; flex-direction: column; gap: 0.25rem; margin: 0.5rem 0 0; padding: 0; list-style: none; }
.home-direct li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.875rem 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.home-direct li:last-child { border-bottom: 1px solid var(--line); }
.home-direct span { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); padding-top: 2px; }
.home-direct a { color: var(--text); transition: color 150ms ease; }
.home-direct a:hover { color: var(--accent-mind); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; padding: 1.75rem; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--card-shadow); }
.contact-form__row { display: grid; gap: 1rem; }
@media (min-width: 560px) { .contact-form__row { grid-template-columns: 1fr 1fr; } }
.contact-form label { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.contact-form label > span { font-size: 0.8125rem; font-weight: 500; color: var(--text-2); }
.contact-form input, .contact-form textarea { width: 100%; padding: 0 0.75rem; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 0.9375rem; transition: border-color 150ms ease; }
.contact-form input { height: 44px; }
.contact-form textarea { min-height: 9.5rem; padding-block: 0.75rem; line-height: 1.5; resize: vertical; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-3); }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--accent-mind); outline-offset: 1px; border-color: transparent; }
.contact-form.was-validated :invalid { border-color: rgba(220, 80, 80, .6); }
.contact-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { align-self: flex-start; }
.contact-form .btn:disabled { opacity: .6; cursor: progress; }
.contact-form__status { margin: 0; min-height: 1.4em; font-size: 0.875rem; color: var(--text-3); }
.contact-form__status:empty { display: none; }
.contact-form__status[data-state="err"] { color: #D64545; }
[data-theme="dark"] .contact-form__status[data-state="err"] { color: #FFB4B4; }
.contact-form__note { margin: 0; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: var(--text-3); }
.contact-form__note a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.contact-done { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.75rem; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.contact-done strong { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.03em; color: var(--text); }
.contact-done p { margin: 0; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) { .home-badge::before { animation: none; } }
