/* ==========================================================================
   SA Projects — Site chrome
   Floating glass dock nav (mirrors the Savi reference wireframe), overlay
   menu, portfolio panel, and footer.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Dock
   Fixed pill anchored to the top of the viewport at every breakpoint. It is
   intentionally static: no hide-on-scroll, no resize. Always visible, always
   reachable.
   -------------------------------------------------------------------------- */

.dock {
  position: fixed;
  z-index: 150;
  left: 50%;
  top: 15px;
  transform: translateX(-50%);
  width: min(100% - 2rem, 1180px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 0.7rem 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--glass-dark);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--shadow-dock);
  color: var(--bg);
}

.dock__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.dock__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--warm), var(--sand-deep));
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--bg);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.dock__name {
  display: grid;
  line-height: 1.15;
}
.dock__name b {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.dock__name span {
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 237, 227, 0.55);
}

/* Inline links — desktop only; mobile uses the overlay. */
.dock__nav {
  display: none;
  align-items: center;
  gap: 0.35rem;
}
@media (min-width: 1000px) { .dock__nav { display: flex; } }

.dock__link {
  position: relative;
  padding: 0.55em 0.95em;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 237, 227, 0.72);
  transition: color 0.35s var(--ease-out), background 0.35s var(--ease-out);
  white-space: nowrap;
}
.dock__link:hover { color: var(--bg); background: rgba(255, 255, 255, 0.08); }
.dock__link[aria-current='page'] { color: var(--warm-bright); }

.dock__actions { display: flex; align-items: center; gap: 0.5rem; }

.dock__cta {
  display: none;
  padding: 0.85em 1.5em;
  border-radius: var(--radius-pill);
  background: var(--warm);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.dock__cta:hover { background: var(--warm-soft); transform: translateY(-2px); }
@media (min-width: 620px) { .dock__cta { display: inline-flex; } }

/* Hamburger */
.dock__toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.35s var(--ease-out);
    flex-shrink: 0;
    padding: 15px;
}
.dock__toggle:hover { background: rgba(255, 255, 255, 0.16); }
.dock__toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--bg);
  border-radius: 2px;
  transition: transform 0.45s var(--ease-out), opacity 0.3s var(--ease-out);
}
.dock__toggle span:nth-child(1) { transform: translateY(-3.25px); }
.dock__toggle span:nth-child(2) { transform: translateY(3.25px); }

.dock__toggle[aria-expanded='true'] span:nth-child(1) {
    transform: rotate(45deg);
    margin-top: 5px;
}
.dock__toggle[aria-expanded='true'] span:nth-child(2) {
    transform: rotate(-45deg);
    margin-top: -7px;
}

/* --------------------------------------------------------------------------
   Overlay menu
   -------------------------------------------------------------------------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: var(--slate);
  color: var(--bg);
  display: grid;
  align-content: center;
  /* `safe` stops centred content from overflowing past the top edge on short
     viewports — without it the menu slides under the dock and the overflowed
     part can't be scrolled back into view. Falls back to start alignment. */
  align-content: safe center;
  /* The dock renders above the menu (z-index 150) so its close button stays
     reachable. Top padding clears the dock's full height plus its offset. */
  padding: 7.5rem var(--gutter) clamp(3rem, 7vh, 4.5rem);
  overflow-y: auto;
  /* Opens from the hamburger, which sits top-right. */
  clip-path: circle(0% at calc(100% - 3rem) 0%);
  transition: clip-path 0.85s var(--ease-in-out);
  visibility: hidden;
}
.menu.is-open {
  clip-path: circle(150% at 50% 50%);
  visibility: visible;
}

.menu__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  max-width: 1180px;
  margin-inline: auto;
  width: 100%;
}
@media (max-width: 860px) {
  .menu__grid { grid-template-columns: minmax(0, 1fr); }
}

.menu__list { display: grid; gap: 0.15rem; }

.menu__item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.2em 0;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: rgba(244, 237, 227, 0.82);
  transition: color 0.4s var(--ease-out), transform 0.5s var(--ease-out);
  opacity: 0;
  transform: translateY(28px);
}
.menu.is-open .menu__item {
  opacity: 1;
  transform: none;
  transition:
    opacity   0.6s var(--ease-out) var(--d, 0ms),
    transform 0.6s var(--ease-out) var(--d, 0ms),
    color     0.4s var(--ease-out);
}
.menu__item:hover { color: var(--warm-bright); transform: translateX(12px); }
.menu__item span {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--warm);
  opacity: 0.7;
}

/* Portfolio column inside the overlay */
.menu__panel {
  align-self: center;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  opacity: 0;
  transform: translateY(28px);
}
.menu.is-open .menu__panel {
  opacity: 1;
  transform: none;
  transition:
    opacity   0.7s var(--ease-out) 0.35s,
    transform 0.7s var(--ease-out) 0.35s;
}

.menu__panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.menu__panel-head b {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
}
.menu__panel-head em {
  font-style: normal;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-bright);
}

.menu__proj {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: rgba(244, 237, 227, 0.78);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.menu__proj:hover { background: rgba(255, 255, 255, 0.07); color: var(--bg); }
.menu__proj b { font-weight: 600; }
.menu__proj em {
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: rgba(244, 237, 227, 0.45);
  text-align: right;
  flex-shrink: 0;
}

.menu__foot {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  font-size: 0.78rem;
  color: rgba(244, 237, 227, 0.6);
}
.menu__foot a:hover { color: var(--warm-bright); }

body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--slate);
  color: var(--bg);
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 5vw, 4rem);
}

.footer__top {
  display: grid;
  /* Portfolio column is wider — it carries a two-up list of twelve projects. */
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr) minmax(0, 1.5fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: 3.5rem;
}
@media (max-width: 980px) {
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer__top { grid-template-columns: minmax(0, 1fr); }
}

/* Two-up list — used for the portfolio so twelve entries read as a block
   rather than one long run. */
.footer__list--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(1rem, 2vw, 2rem);
}
@media (max-width: 420px) {
  .footer__list--split { grid-template-columns: minmax(0, 1fr); }
}

.footer__brand b {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  display: block;
}
.footer__brand span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 237, 227, 0.5);
}
.footer__tagline {
  margin: 1.25rem 0 2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(244, 237, 227, 0.72);
  max-width: 36ch;
}

.footer__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}
.footer__stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--warm-bright);
  line-height: 1.2;
}
.footer__stat span {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 237, 227, 0.5);
}

.footer__col h4 {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 237, 227, 0.45);
  margin: 0 0 1.25rem;
}
.footer__col li { margin-bottom: 0.65rem; }
.footer__col a,
.footer__col p {
  font-size: 0.88rem;
  color: rgba(244, 237, 227, 0.75);
  transition: color 0.3s var(--ease-out);
  margin: 0;
}
.footer__col a:hover { color: var(--warm-bright); }

/* Legal fine print — sits between the footer menu and the credit line.
   Deliberately quiet: present and readable, but not competing for attention. */
.footer__fineprint {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer__fineprint h4 {
  font-family: var(--sans);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 237, 227, 0.38);
  margin: 0 0 0.85rem;
}
/* One continuous block spanning the full shell width — no column split, so it
   reads as a single run of legal text rather than two stacked panels. */
.footer__fineprint p {
  font-size: 10px;
  line-height: 1.45;
  color: rgba(244, 237, 227, 0.42);
  max-width: none;
  margin: 0;
}
.footer__fineprint em { font-style: italic; }

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: rgba(244, 237, 227, 0.5);
}
.footer__bottom a:hover { color: var(--warm-bright); }

.footer__credit {
  color: rgba(244, 237, 227, 0.75);
  border-bottom: 1px solid rgba(244, 237, 227, 0.28);
  padding-bottom: 1px;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.footer__credit:hover { color: var(--warm-bright); border-color: var(--warm-bright); }

/* --------------------------------------------------------------------------
   "Ask Sourabh" floating widget
   -------------------------------------------------------------------------- */

.askwrap {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  z-index: 130;
  display: grid;
  justify-items: end;
  gap: 0.75rem;
}

.ask {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1.25rem 0.5rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.ask:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ask img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
}
.ask span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
@media (max-width: 520px) { .ask span { display: none; } .ask { padding: 0.5rem; } }

/* --------------------------------------------------------------------------
   Ask Sourabh panel
   Pre-written questions that route to the relevant page.
   -------------------------------------------------------------------------- */

.askpanel {
  width: min(calc(100vw - 2.5rem), 23rem);
  max-height: min(70vh, 34rem);
  overflow-y: auto;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  transform-origin: bottom right;
  animation: askIn 0.45s var(--ease-out);
}
.askpanel[hidden] { display: none; }

@keyframes askIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .askpanel { animation: none; }
}

.askpanel__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(31, 26, 22, 0.12);
}
.askpanel__head img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.askpanel__who { display: grid; gap: 0.1rem; line-height: 1.3; }
.askpanel__who b {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
}
.askpanel__who span { font-size: 0.68rem; color: var(--ink-muted); }
.askpanel__status {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--olive);
}
.askpanel__status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--olive);
}

.askpanel__close {
  align-self: start;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink-muted);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.askpanel__close:hover { background: rgba(31, 26, 22, 0.08); color: var(--ink); }

.askpanel__quote {
  margin: 1rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: none;
}

.askpanel__list { display: grid; gap: 0.5rem; }

.askitem {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(31, 26, 22, 0.08);
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.askitem:hover {
  background: #fff;
  border-color: rgba(176, 74, 37, 0.3);
  transform: translateX(-3px);
}
.askitem b { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.askitem span { font-size: 0.76rem; line-height: 1.5; color: var(--ink-soft); }
.askitem em {
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm);
}
.askitem .arrow { transition: transform 0.3s var(--ease-out); display: inline-block; }
.askitem:hover .arrow { transform: translateX(3px); }

.askpanel__cta {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
}
