/* Landing page: calm and compact. A prompt bar for GigAI, and a way to the projects. */
.landing { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.landing-in { width: min(680px, 100%); }

/* Hero block: collapses away when the chat takes focus */
.hero-block { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .55s cubic-bezier(.7, 0, .2, 1), opacity .35s ease; }
.hero-block > .hb-in { overflow: hidden; min-height: 0; padding: 18px; margin: -18px; }
.landing.chatting .hero-block { grid-template-rows: 0fr; opacity: 0; pointer-events: none; }

.landing .hello { margin-bottom: 2px; gap: 10px; flex-wrap: wrap; align-items: center; }
.landing .head { width: 104px; }
.landing .bubble { font-size: 22px; padding: 10px 18px; min-height: 40px; border-radius: 17px; max-width: 250px; }
.landing h1 { font-size: clamp(64px, 11vw, 120px); font-weight: 1000; line-height: 1; letter-spacing: -0.07em; margin: 0 0 14px; }
.landing .lede { font-size: 17px; line-height: 1.55; max-width: 100%; margin: 0 0 12px; color: #333; }
.landing .lede:last-child { margin-bottom: 22px; }
.landing .lede a { color: #111; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.landing .lede a:hover { opacity: .6; }

/* GigAI */
.agent { margin: 0; }
.agent-head { display: none; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.landing.chatting .agent-head { display: flex; animation: fade-in .4s ease .25s both; }
.agent-head .who { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.agent-head .who img { width: 34px; height: 34px; object-fit: cover; object-position: 50% 20%; border-radius: 50%; background: #f1f1ef; }
.agent-head .links { display: flex; align-items: center; gap: 16px; }
.agent-head .close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f1f1ef; cursor: pointer; display: grid; place-items: center; }
.agent-head .close:hover { background: #e2e2de; }
.agent-head .close svg { width: 16px; height: 16px; stroke: #111; stroke-width: 2.4; stroke-linecap: round; fill: none; }
@keyframes fade-in { from { opacity: 0; } }

.answer { margin: 0; }
.landing.chatting .answer { margin: 0 0 18px; min-height: 120px; }
.answer .q { font-size: 14px; color: #8a8a8a; margin-bottom: 8px; }
.answer .a { font-size: 18px; line-height: 1.6; color: #111; max-width: 32em; }
.answer .a .w { opacity: 0; transition: opacity .3s ease; }
.answer.go .a .w { opacity: 1; }
.answer .typing { display: inline-flex; gap: 5px; padding: 8px 0; }
.answer .typing i { width: 7px; height: 7px; border-radius: 50%; background: #111; opacity: .3; animation: dot 1.1s infinite ease-in-out; }
.answer .typing i:nth-child(2) { animation-delay: .18s; }
.answer .typing i:nth-child(3) { animation-delay: .36s; }
@keyframes dot { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }
.answer .acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.answer .acts a { font-size: 15px; font-weight: 700; color: #111; text-decoration: underline; text-underline-offset: 4px; }
.answer .acts a:hover { opacity: .6; }

/* The prompt bar */
.ask { display: flex; gap: 8px; align-items: center; border: 2px solid #111; border-radius: 16px; padding: 5px 5px 5px 16px; background: #fff; transition: box-shadow .2s ease; }
.ask:focus-within { box-shadow: 0 6px 24px rgba(0, 0, 0, .12); }
.ask > svg { width: 19px; height: 19px; fill: none; stroke: #111; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 16px "DM Sans", sans-serif; color: #111; padding: 8px 0; }
.ask input::placeholder { color: #8a8a8a; }
.ask button { width: 36px; height: 36px; border-radius: 11px; border: 0; background: #111; cursor: pointer; display: grid; place-items: center; flex: none; }
.ask button:hover { opacity: .8; }
.ask button svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.chips { display: none; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.landing.chatting .chips { display: flex; }
.chips button { font: 600 13.5px "DM Sans", sans-serif; padding: 8px 14px; border-radius: 11px; background: #f1f1ef; border: 0; color: #111; cursor: pointer; transition: background .15s ease; }
.chips button:hover { background: #e2e2de; }

/* Below the prompt bar: the way to the projects */
.below { margin-top: 18px; }
.landing .social { margin-top: 20px; gap: 22px; }
.landing .social svg { width: 22px; height: 22px; }

@media (prefers-reduced-motion: reduce) { .hero-block { transition: none; } .ask > svg, .answer .typing i { animation: none; } .answer .a .w { transition: none; } .landing.chatting .agent-head { animation: none; } }

.btn.solid { background: #111; color: #fff; }
.btn.solid:hover { opacity: .85; background: #111; color: #fff; }

.landing .social { align-items: center; }

/* One radius for every control on this page */
.landing .btn.solid.inline { font-size: 12px; padding: 12px 20px; border-width: 2px; border-radius: 16px; margin: 0 0 0 6px; letter-spacing: .1em; white-space: nowrap; }
.agent-head .close { border-radius: 12px; }

/* Project thumbnails inside answers */
.thumbs { display: flex; gap: 12px; overflow-x: auto; margin: 14px -2px 0; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; width: 150px; text-decoration: none; color: #111; scroll-snap-align: start; }
.thumb img { width: 150px; height: 130px; object-fit: cover; border-radius: 16px; display: block; background: #f1f1ef; transition: transform .25s ease; }
.thumb:hover img { transform: translateY(-3px); }
.thumb span { display: block; margin-top: 7px; font-size: 12.5px; line-height: 1.35; font-weight: 600; color: #333; }

/* Prompt bar + View projects side by side */
.askrow { display: flex; gap: 10px; align-items: stretch; }
.askrow .ask { flex: 1; min-width: 0; }
.landing .askrow .btn.solid.inline { margin: 0; align-self: stretch; display: flex; align-items: center; padding: 0 18px; flex: none; }
@media (max-width: 480px) { .askrow { flex-wrap: wrap; } .landing .askrow .btn.solid.inline { flex: 1 1 100%; justify-content: center; padding: 14px 18px; } }

.purpose { margin: 10px 4px 0; font-size: 12px; line-height: 1.45; color: #8a8a8a; max-width: 34em; }
.landing.chatting .purpose { display: none; }

/* The button folds away smoothly and the field grows into the space it leaves */
.askrow { gap: 0; }
.landing .askrow .btn.solid.inline { overflow: hidden; max-width: 220px; margin-left: 10px; white-space: nowrap; transition: max-width .55s cubic-bezier(.7, 0, .2, 1), margin .55s cubic-bezier(.7, 0, .2, 1), padding .55s cubic-bezier(.7, 0, .2, 1), opacity .3s ease, border-width .55s; }
.landing.chatting .askrow .btn.solid.inline { max-width: 0; margin-left: 0; padding-left: 0; padding-right: 0; border-width: 0; opacity: 0; pointer-events: none; }
@media (max-width: 480px) {
  .askrow { flex-direction: column; }
  .landing .askrow .btn.solid.inline { flex: none !important; max-width: none; max-height: 60px; margin: 10px 0 0; transition: max-height .55s cubic-bezier(.7, 0, .2, 1), margin .55s cubic-bezier(.7, 0, .2, 1), padding .55s cubic-bezier(.7, 0, .2, 1), opacity .3s ease, border-width .55s; }
  .landing.chatting .askrow .btn.solid.inline { max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; }
}

/* Push: landing shifts left, projects panel slides in from the right, both visible */
.landing { transition: transform .7s cubic-bezier(.7, 0, .2, 1), opacity .5s ease; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: 58vw; background: #fff; z-index: 20; transform: translateX(105%); transition: transform .7s cubic-bezier(.7, 0, .2, 1); visibility: hidden; }
.panel-open .panel { transform: none; visibility: visible; }
.panel iframe { width: 100%; height: 100%; border: 0; display: block; }
.panel-open .landing { transform: translateX(-31vw); cursor: pointer; }
.landing-in { transition: width .7s cubic-bezier(.7, 0, .2, 1); }
.panel-open .landing-in { width: max(300px, min(520px, 34vw)); }
/* Bigger text while the landing sits in the left strip */
.landing .lede, .landing h1, .answer .a, .ask input, .landing .bubble { transition: font-size .5s ease; }
.panel-open .landing .lede { font-size: 16.5px; }
.panel-open .landing .answer .a { font-size: 17px; }
.panel-open .landing .ask input { font-size: 15px; }
.panel-open .landing .bubble { font-size: 20px; }
.panel-open .landing .chips button { font-size: 13px; }
.panel-open .landing .thumb, .panel-open .landing .thumb img { width: 138px; }
.panel-open .landing .thumb img { height: 118px; }
.panel-open .landing .thumb span { font-size: 12px; }
.panel-back { display: none; position: absolute; top: 16px; left: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.9); box-shadow: 0 1px 6px rgba(0,0,0,.12); cursor: pointer; place-items: center; }
.panel-back svg { width: 20px; height: 20px; fill: none; stroke: #111; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .panel-back { display: grid; } }
@media (max-width: 900px) { .panel { width: 100vw; } .panel-open .landing { transform: translateX(-100%); } .panel-open .landing-in { width: min(680px, 100%); } }
@media (prefers-reduced-motion: reduce) { .landing, .panel { transition: none; } }

/* Narrower prompt row (the rest of the column stays wide) */
.askrow, .purpose { max-width: 560px; }


.panel-open .landing h1 { font-size: clamp(44px, 6.5vw, 76px); }
@media (max-width: 900px) { .panel-open .landing h1 { font-size: clamp(64px, 11vw, 120px); } }

/* The send button only appears once the field is tapped */
.ask button { transition: width .3s cubic-bezier(.7, 0, .2, 1), opacity .25s ease, margin .3s cubic-bezier(.7, 0, .2, 1); overflow: hidden; }
.ask:not(:focus-within) button, .landing:not(.chatting) .ask:not(:focus-within) button { width: 0; opacity: 0; margin-left: -8px; pointer-events: none; }
.ask:focus-within button, .landing.chatting .ask button { width: 36px; opacity: 1; margin-left: 0; pointer-events: auto; }

/* Narrower prompt row when the landing sits on the left beside the projects */
.askrow, .purpose { transition: max-width .7s cubic-bezier(.7, 0, .2, 1); }
.panel-open .askrow, .panel-open .purpose { max-width: 420px; }
@media (max-width: 900px) { .panel-open .askrow, .panel-open .purpose { max-width: 560px; } }

/* In chat mode the field spans the same width as the header, so its right edge lines up with the X */
.landing.chatting .askrow { max-width: none; }

/* ---------- Mobile / narrow screens: one page. Intro and chat at the top, the projects right below ---------- */
.panel-back { width: 44px; height: 44px; border-radius: 14px; background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.18); box-shadow: none; }
.panel-back svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2.6; }
@media (max-width: 900px) {
  .landing { min-height: 0; align-items: flex-start; padding: 14px 20px 6px; transform: none !important; cursor: default; }
  .landing-in, .panel-open .landing-in { width: min(680px, 100%); }
  .landing .head { width: 72px; }
  .landing .bubble { font-size: 18px; padding: 8px 14px; min-height: 34px; max-width: 220px; }
  .landing h1, .panel-open .landing h1 { font-size: clamp(44px, 14vw, 60px); margin: 0 0 8px; }
  .landing .lede { font-size: 15.5px; line-height: 1.45; margin: 0 0 10px; }
  .landing .lede:last-child { margin-bottom: 12px; }
  .landing .askrow, .panel-open .askrow { max-width: none; }
  .landing .askrow .btn.solid.inline { display: none; }
  .landing .purpose { display: none; }
  .landing .social { margin-top: 12px; gap: 20px; }
  .landing .social svg { width: 20px; height: 20px; }
  .panel-open .landing .lede { font-size: 15.5px; } .panel-open .landing .answer .a { font-size: 17px; } .panel-open .landing .ask input { font-size: 16px; }
  .panel-open .landing .bubble { font-size: 18px; } .panel-open .landing .chips button { font-size: 13.5px; }
  .panel-open .landing .thumb, .panel-open .landing .thumb img { width: 150px; } .panel-open .landing .thumb img { height: 130px; } .panel-open .landing .thumb span { font-size: 12.5px; }
  .panel { position: static; display: block !important; width: 100%; transform: none; visibility: visible; z-index: auto; background: #fff; }
  .panel-back { display: none !important; }
  .panel iframe { width: 100%; height: 100vh; display: block; border: 0; }
}

/* Mobile: left aligned, a touch smaller at the top */
@media (max-width: 900px) {
  .landing { padding-top: 10px; }
  .landing .head { width: 62px; }
  .landing .bubble { font-size: 16px; padding: 7px 12px; min-height: 30px; max-width: 200px; }
  .landing h1, .panel-open .landing h1 { font-size: clamp(38px, 12vw, 50px); margin: 0 0 6px; }
  .landing .lede { font-size: 14.5px; margin: 0 0 10px; }
  .landing .social { margin-top: 10px; }
}

/* Mobile: slightly smaller "I'm Gigi." header (head and bubble stay as they are) */
@media (max-width: 900px) {
  .landing h1, .panel-open .landing h1 { font-size: clamp(32px, 10vw, 42px); margin: 0 0 4px; }
}
@media (max-width: 900px) { .landing { padding-bottom: 0; } .landing .social { margin-bottom: 0; } }
@media (max-width: 900px) { .landing { padding-bottom: 14px; } }

/* Mini header (phones only) */
.minibar { display: none; }
@media (max-width: 900px) {
  .minibar { display: flex; align-items: center; gap: 10px; position: fixed; top: 0; left: 0; right: 0; height: 56px; padding: 0 14px; z-index: 40; background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,.08); transform: translateY(-105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
  .minibar.show { transform: none; }
  .minibar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; background: #f1f1ef; }
  .mb-name { font-size: 15px; font-weight: 700; }
  .mb-ask { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 2px solid #111; border-radius: 14px; background: #fff; font: 600 14px "DM Sans", sans-serif; color: #111; cursor: pointer; }
  .mb-ask svg { width: 17px; height: 17px; fill: none; stroke: #111; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
}
@media (prefers-reduced-motion: reduce) { .minibar { transition: none; } }

/* Phones: the project list is part of this page; the framed panel is not used */
.mproj { display: none; }
@media (max-width: 900px) {
  .mproj { display: block; }
  .mproj .home { padding: 8px 20px 0; display: block; }
  .mproj .cards { padding-bottom: 60px; }
  .panel { display: none !important; }
}

/* Phones: tighter space between company panels */
@media (max-width: 900px) { .mproj .cards { gap: 0; } html .mproj .co { margin-bottom: 16px; } html .mproj .co:last-child { margin-bottom: 0; } }

/* Phones: the wide tiles are taller so their art is bigger and not squeezed */
@media (max-width: 900px) {
  html .co .slot.wide .card .media { aspect-ratio: 4 / 3; }
  html .co .slot.wide .card .media > img:not(.vp) { object-fit: cover; padding: 0; }
  html .media.stack:not(.cm) .vp.a { left: 16%; top: 7%; width: 48%; }
  html .media.stack:not(.cm) .vp.b { left: 42%; top: 36%; width: 54%; }
  html .media.stack:not(.cm) .vp.c { left: 4%; top: 66%; width: 46%; }
}

/* Phones: smaller chat text */
@media (max-width: 900px) {
  .answer .a, .panel-open .landing .answer .a { font-size: 15.5px; line-height: 1.55; }
  .answer .q { font-size: 12.5px; }
  .answer .acts a { font-size: 13.5px; }
  .chips button, .panel-open .landing .chips button { font-size: 12.5px; padding: 7px 12px; }
  .ask input, .panel-open .landing .ask input { font-size: 16px; } /* 16px keeps iOS from zooming into the field */
  .thumb span, .panel-open .landing .thumb span { font-size: 11.5px; }
}

/* Closing the chat: fade the conversation out before the intro folds back */
.landing .answer, .landing .chips, .landing .agent-head { transition: opacity .2s ease; }
.landing.closing .answer, .landing.closing .chips, .landing.closing .agent-head { opacity: 0; }
@media (max-width: 900px) { .landing .hero-block { transition-duration: .45s; } }

/* Restoring the open panel after a refresh: no slide */
.no-anim .landing, .no-anim .panel, .no-anim .landing-in, .no-anim .askrow, .no-anim .purpose, .no-anim .landing h1, .no-anim .landing .lede { transition: none !important; }

/* "Built with love" line: lower left corner of the landing page (on phones, at the very bottom after the projects) */
.landfoot { position: fixed; left: 32px; bottom: 24px; z-index: 5; font-size: 13px; color: #8a8a8a; transition: opacity .3s ease; }
.landing.chatting ~ .landfoot { opacity: 0; pointer-events: none; }
@media (max-width: 900px) { .landfoot { position: static; padding: 28px 20px 36px; } .landing.chatting ~ .landfoot { opacity: 1; } }
