/* ==========================================================================
   ZAVIO — Digital & Creative Studio
   Stylesheet
   Structure:
   1. Tokens & Reset
   2. Base / Typography
   3. Layout helpers
   4. Header / Nav
   5. Hero
   6. Capabilities marquee
   7. Services
   8. Work
   9. Process
   10. About
   11. CTA
   12. Footer
   13. Reveal / scroll animation
   14. Responsive
   15. Start a project modal
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* 1. Tokens & Reset                                                       */
/* ---------------------------------------------------------------------- */

:root {
  /* Core palette */
  --black: #0a0a0b;
  --near-black: #101012;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f3f3f4;
  --gray-200: #e4e4e6;
  --gray-400: #a1a1a8;
  --gray-500: #7a7a82;
  --gray-700: #46464c;

  /* Accent — sophisticated indigo/violet */
  --accent: #5b4cff;
  --accent-2: #8f7cff;
  --accent-soft: #edeaff;

  /* Semantic */
  --bg: var(--white);
  --bg-inverse: var(--black);
  --text: var(--black);
  --text-muted: var(--gray-500);
  --text-inverse: var(--white);
  --border: rgba(10, 10, 11, 0.1);
  --border-inverse: rgba(255, 255, 255, 0.14);

  /* Type */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --container-w: 1280px;
  --container-pad: 32px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.25s;
  --dur-med: 0.6s;
  --dur-slow: 0.9s;

  --header-h: 84px;
}

* , *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
picture { display: inline-flex; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
svg { display: block; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: 12px 20px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

::selection {
  background: var(--accent);
  color: var(--white);
}

/* ---------------------------------------------------------------------- */
/* 2. Base / Typography                                                    */
/* ---------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.muted { color: var(--text-muted); font-weight: 500; }

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}

.section-note {
  margin-top: 18px;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.6;
}

section {
  position: relative;
  padding: 120px 0;
}

/* Buttons */
.btn {
  --btn-fg: var(--white);
  --btn-bg: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--btn-fg);
  background: var(--btn-bg);
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
  will-change: transform;
}
.btn svg { transition: transform var(--dur-fast) var(--ease-soft); flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--black);
  --btn-fg: var(--white);
}
.btn--primary:hover {
  --btn-bg: var(--accent);
  box-shadow: 0 12px 28px -8px rgba(91, 76, 255, 0.55);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  box-shadow: inset 0 0 0 1.4px var(--border);
}
.btn--ghost:hover {
  box-shadow: inset 0 0 0 1.4px var(--text);
}

.btn--sm { padding: 11px 20px; font-size: 13.5px; }
.btn--lg { padding: 18px 30px; font-size: 16px; }
.btn--block { width: 100%; justify-content: center; }

/* ---------------------------------------------------------------------- */
/* 4. Header / Nav                                                         */
/* ---------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft), height var(--dur-fast) var(--ease-soft);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand { display: inline-flex; align-items: center; }
.brand-mark { height: 56px; width: auto; flex-shrink: 0; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 40px;
}
.main-nav a {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.4px;
  background: var(--accent);
  transition: width var(--dur-fast) var(--ease-soft);
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }

.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.menu-toggle-bar {
  width: 20px;
  height: 1.6px;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease-soft), opacity var(--dur-fast) var(--ease-soft);
}
.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
  transform: translateY(3.8px) rotate(45deg);
}
.menu-toggle.is-open .menu-toggle-bar:nth-child(2) {
  transform: translateY(-3.8px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px var(--container-pad) 40px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease);
  z-index: 90;
}
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-inverse);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mobile-nav a em {
  font-style: normal;
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}
.mobile-nav-footer { display: flex; flex-direction: column; gap: 22px; }
.mobile-nav-footer .btn--primary { --btn-bg: var(--white); --btn-fg: var(--black); }
.mobile-nav-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray-400);
}

/* ---------------------------------------------------------------------- */
/* 5. Hero                                                                  */
/* ---------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 80px;
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-lines {
  width: 100%;
  height: 100%;
}
.hl { opacity: 0; stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw-line 2.4s var(--ease) forwards; }
.hl-1 { animation-delay: 0.3s; }
.hl-2 { animation-delay: 0.55s; }
.hl-3 { animation-delay: 0.75s; }
@keyframes draw-line {
  0% { opacity: 0; stroke-dashoffset: 1600; }
  8% { opacity: 1; }
  100% { opacity: 1; stroke-dashoffset: 0; }
}
.hero-lines-group { animation: float-lines 14s ease-in-out infinite; transform-origin: center; }
@keyframes float-lines {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-14px) translateX(6px); }
}
.hero-dots rect { animation: pulse-dot 3.6s ease-in-out infinite; transform-origin: center; }
.hd-2 { animation-delay: 0.4s; }
.hd-3 { animation-delay: 0.8s; }
@keyframes pulse-dot {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
.hero-glow {
  position: absolute;
  top: 8%;
  right: -10%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, var(--accent-soft) 0%, rgba(237, 234, 255, 0) 70%);
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(42px, 7.6vw, 104px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 32px;
  max-width: 16ch;
}
.reveal-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.22em;
  margin-bottom: -0.22em;
}
.reveal-line span {
  display: block;
  transform: translateY(110%);
  animation: line-up var(--dur-slow) var(--ease) forwards;
}
.reveal-line:nth-child(1) span { animation-delay: 0.15s; }
.reveal-line:nth-child(2) span { animation-delay: 0.28s; }
@keyframes line-up {
  to { transform: translateY(0); }
}

.hero-sub {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 44px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  left: var(--container-pad);
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}
.hero-scroll span {
  width: 1px;
  height: 40px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.hero-scroll span::after {
  content: "";
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--text);
  animation: scroll-line 2.2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
.hero-scroll p {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------- */
/* 6. Capabilities marquee                                                 */
/* ---------------------------------------------------------------------- */

.capabilities {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.capabilities-track { width: 100%; }
.capabilities-row {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  animation: marquee 130s linear infinite;
}
.capabilities-row .dot {
  font-size: 8px;
  color: var(--accent);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------------------- */
/* 7. Services                                                             */
/* ---------------------------------------------------------------------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.service-card {
  background: var(--bg);
  padding: 44px 36px;
  transition: background var(--dur-fast) var(--ease-soft);
}
.service-card:hover { background: var(--gray-50); }

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.service-index {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.service-icon {
  color: var(--text);
  transition: transform var(--dur-med) var(--ease), color var(--dur-fast) var(--ease-soft);
}
.service-card:hover .service-icon {
  color: var(--accent);
  transform: translateY(-3px) rotate(-4deg);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.service-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}
.service-card p.service-quote {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-style: italic;
  color: var(--text);
}


/* ---------------------------------------------------------------------- */
/* 9. Process                                                              */
/* ---------------------------------------------------------------------- */

.process-list {
  border-top: 1px solid var(--border);
}
.process-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: baseline;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  transition: padding var(--dur-fast) var(--ease-soft);
}
.process-item:hover {
  color: var(--accent);
  padding-left: 2px;

}
.process-num {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}
.process-body h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.process-body p {
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 52ch;
}

/* ---------------------------------------------------------------------- */
/* 10. About                                                               */
/* ---------------------------------------------------------------------- */

.about { background: var(--gray-50); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-content { display: flex; flex-direction: column; gap: 24px; }
.about-lead {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.about-content p:not(.about-lead) {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 52ch;
}

/* ---------------------------------------------------------------------- */
/* 11. CTA                                                                  */
/* ---------------------------------------------------------------------- */

.cta-section {
  background: var(--black);
  color: var(--white);
  text-align: center;
  overflow: hidden;
  padding: 160px 0;
}
.cta-visual {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(91, 76, 255, 0.35), transparent 70%),
    radial-gradient(40% 50% at 85% 100%, rgba(143, 124, 255, 0.18), transparent 70%);
  pointer-events: none;
}
.cta-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.cta-section .eyebrow { color: var(--gray-400); }
.cta-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}
.cta-title .muted { color: var(--gray-400); }
.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta-actions .btn--primary { --btn-bg: var(--white); --btn-fg: var(--black); }
.cta-actions .btn--primary:hover { --btn-bg: var(--accent-2); --btn-fg: var(--black); }
.cta-email {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--gray-400);
  position: relative;
}
.cta-email::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--gray-400);
  transform: scaleX(0.3);
  opacity: 0.5;
  transition: transform var(--dur-fast) var(--ease-soft);
}
.cta-email:hover::after { transform: scaleX(1); }

/* ---------------------------------------------------------------------- */
/* 12. Footer                                                              */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 80px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border-inverse);
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer-logo { height: 56px; width: auto; flex-shrink: 0; }
.footer-brand p { color: var(--gray-400); font-size: 14.5px; }

.footer-cols { display: flex; gap: 72px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 14px; }
.footer-col a, .footer-col span {
  font-size: 15px;
  color: var(--gray-200);
  transition: color var(--dur-fast) var(--ease-soft);
}
.footer-col a:hover { color: var(--white); }
.footer-col span { color: var(--gray-500); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
}
.footer-bottom p { font-size: 13.5px; color: var(--gray-500); }
.to-top {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}
.to-top:hover { background: var(--white); color: var(--black); transform: translateY(-3px); }

/* ---------------------------------------------------------------------- */
/* 13. Reveal / scroll animation                                           */
/* ---------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.services-grid .service-card:nth-child(1) { transition-delay: 0s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.06s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.12s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.18s; }

/* ---------------------------------------------------------------------- */
/* 14. Responsive                                                          */
/* ---------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { gap: 40px; }
}

@media (max-width: 900px) {
  :root { --container-pad: 24px; --header-h: 72px; }

  section { padding: 88px 0; }

  .main-nav { display: none; }
  .header-actions .btn--sm { display: none; }
  .menu-toggle { display: flex; }

  .brand-mark { height: 44px; }

  .about-inner { grid-template-columns: 1fr; }

  .footer-top { flex-direction: column; gap: 40px; }
  .footer-cols { justify-content: space-between; }
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }

  .process-item { grid-template-columns: 1fr; gap: 10px; }
  .process-item:hover { padding-left: 0; }

  .hero-title { max-width: 100%; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }

  .cta-section { padding: 110px 0; }

  .footer-cols { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 18px; align-items: flex-start; }

  .mobile-nav a { font-size: 26px; }
}

@media (max-width: 420px) {
  .brand-mark { height: 36px; }
}

/* Dark-section logo swap (footer already uses white mark directly) */

/* ---------------------------------------------------------------------- */
/* 15. Start a project modal                                               */
/* ---------------------------------------------------------------------- */

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.project-modal[hidden] { display: none; }

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-soft);
}

.project-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 40px 40px;
  box-shadow: 0 40px 80px -24px rgba(10, 10, 11, 0.35);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}

.project-modal.is-open .project-modal__backdrop { opacity: 1; }
.project-modal.is-open .project-modal__dialog { opacity: 1; transform: translateY(0) scale(1); }

.project-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.project-modal__close:hover { background: var(--gray-100); color: var(--text); }

.modal-view { display: none; }
.modal-view.is-active { display: block; }

.modal-view__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 10px;
}
.modal-view__lead {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 28px;
}

.modal-view__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color var(--dur-fast) var(--ease-soft);
}
.modal-view__back:hover { color: var(--text); }

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1.4px var(--border);
  transition: box-shadow var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}
.modal-option:hover {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.4px var(--accent);
  transform: translateY(-1px);
}
.modal-option:hover .modal-option__icon { color: var(--accent); background: var(--white); }
.modal-option:hover .modal-option__arrow { transform: translate(2px, -2px); }

.modal-option__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--text);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}

.modal-option__body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.modal-option__title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
}
.modal-option__desc { font-size: 13.5px; color: var(--text-muted); }

.modal-option__arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--dur-fast) var(--ease-soft);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.modal-form__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-form__row[hidden] { display: none; }
.modal-form__row label {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
}
.modal-form__row label span[aria-hidden] { color: var(--accent); }
.modal-form__optional {
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}
.modal-form input,
.modal-form textarea,
.modal-form select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--gray-50);
  border: 1.4px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft);
}
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
}
.modal-form input:invalid:not(:placeholder-shown) { border-color: var(--border); }
.modal-form textarea { resize: vertical; min-height: 80px; }
.modal-form select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237a7a82' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.modal-form button[type="submit"] { margin-top: 6px; }

/* Callback topic chips ("What's it about?") */
.cb-topic-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cb-topic-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.4px var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
}
.cb-topic-chip:hover { box-shadow: inset 0 0 0 1.4px var(--accent); }
.cb-topic-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.cb-topic-chip input:checked ~ span {
  color: inherit;
}
.cb-topic-chip:has(input:checked),
.cb-topic-chip.is-checked {
  background: var(--accent);
  color: var(--white);
  box-shadow: inset 0 0 0 1.4px var(--accent);
}
.cb-topic-chip input:focus-visible ~ span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Callback date/time calendar picker */
.cb-calendar {
  background: var(--gray-50);
  border: 1.4px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px 16px;
}
.cb-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cb-calendar__month {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
}
.cb-calendar__nav {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.cb-calendar__nav:hover:not(:disabled) { background: var(--gray-200); color: var(--text); }
.cb-calendar__nav:disabled { opacity: 0.3; cursor: default; }

.cb-calendar__weekdays,
.cb-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cb-calendar__weekdays {
  margin-bottom: 4px;
}
.cb-calendar__weekdays span {
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 4px;
}
.cb-calendar__grid { gap: 3px; }

.cb-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.cb-day:hover:not(.is-disabled):not(.is-selected) { background: var(--gray-200); }
.cb-day.is-today { box-shadow: inset 0 0 0 1.4px var(--border); }
.cb-day.is-selected { background: var(--accent); color: var(--white); }
.cb-day.is-disabled { color: var(--gray-400); cursor: default; opacity: 0.55; }
.cb-day.is-empty { visibility: hidden; }

.cb-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.cb-time-chip {
  padding: 9px 14px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.4px var(--border);
  color: var(--text);
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
}
.cb-time-chip:hover { box-shadow: inset 0 0 0 1.4px var(--accent); }
.cb-time-chip.is-selected {
  background: var(--accent);
  color: var(--white);
  box-shadow: inset 0 0 0 1.4px var(--accent);
}
.cb-times__empty {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.cb-times__empty[hidden] { display: none; }

.modal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 24px 4px 8px;
}
.modal-success[hidden] { display: none; }
.modal-success svg { color: var(--accent); }
.modal-success p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }
.modal-success p strong { color: var(--text); }

@media (max-width: 640px) {
  .project-modal { padding: 0; align-items: flex-end; }
  .project-modal__dialog {
    max-width: 100%;
    max-height: 88vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 36px 24px 32px;
  }
  .project-modal.is-open .project-modal__dialog { transform: translateY(0); }
  .project-modal__dialog { transform: translateY(24px); }
}
