:root {
  --fg: #0e0e0e;
  --bg: #f4f4f4;
  --muted: #555;
  --border: #ddd;
  --card: #eaeaea;
  --card-hover: #e0e0e0;
  --white: #fff;
  --pad: 1.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-top: 4.75rem;
}

a { color: var(--fg); text-underline-offset: 0.18em; }
a:hover { color: var(--muted); }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.draft {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem var(--pad);
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--fg);
}
.brand:hover { opacity: 0.8; color: var(--fg); }

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--fg); }

.menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.5rem; height: 2.5rem;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu span {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .menu { display: none; }
}

.nav-links.open {
  display: flex;
  position: absolute;
  top: 100%; left: 0; right: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem var(--pad) 1rem;
}
.nav-links.open a {
  display: block;
  width: 100%;
  padding: 0.75rem 0;
  font-size: 1rem;
}

.hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: 6rem var(--pad) 2rem;
}
@media (min-width: 768px) {
  .hero { padding-top: 8rem; padding-bottom: 2rem; }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.95;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .hero h1 { font-size: 4.5rem; }
}
@media (min-width: 1024px) {
  .hero h1 { font-size: 6rem; }
}

.lede {
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .lede { font-size: 1.25rem; }
}

.actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { color: inherit; }
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.98); }

.btn-solid {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-solid:hover { background: #333; border-color: #333; color: var(--bg); }

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--muted); background: var(--card); color: var(--fg); }

.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem var(--pad);
}
@media (min-width: 768px) {
  .section { padding-top: 6rem; padding-bottom: 6rem; }
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 1.75rem 1.5rem;
}
.card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.card p { color: var(--muted); font-size: 0.95rem; max-width: 22rem; }

.logo-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .logo-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}
@media (min-width: 1024px) {
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
}

.logo-grid a,
.logo-grid li > div {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.logo-grid a:hover { color: inherit; }
.logo-grid a:hover .logo-cell { background: var(--card-hover); }
.logo-grid a:hover .logo-name { color: var(--fg); }

.logo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  height: 7.25rem;
  padding: 1.1rem 1.15rem;
  transition: background-color 0.2s ease;
}
.logo-cell img {
  display: block;
  max-width: 100%;
  max-height: 2.85rem;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
}
.logo-name {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

.about p { max-width: 32rem; }
.about .more { margin-top: 1rem; }

.contact h2 { margin-bottom: 1.5rem; }

.ask {
  max-width: 36rem;
}

.ask-log {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.ask-log:empty { display: none; }

.ask-b {
  max-width: 92%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.ask-b.user {
  align-self: flex-end;
  background: var(--fg);
  color: var(--bg);
}
.ask-b.assistant {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--fg);
}
.ask-b.confirm {
  align-self: flex-start;
  background: var(--card);
  border: 1px dashed var(--muted);
  color: var(--fg);
  font-weight: 500;
}

.ask-loading { display: inline-flex; gap: 4px; align-items: center; height: 1em; }
.ask-loading i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1s ease-in-out infinite;
}
.ask-loading i:nth-child(2) { animation-delay: 0.15s; }
.ask-loading i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.2); }
}

.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.ask-chips button {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.ask-chips button:hover {
  border-color: var(--muted);
  background: var(--card);
  transform: scale(1.03);
}
.ask-chips button:active { transform: scale(0.98); }

.ask-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.4rem 0.4rem 0.4rem 0.85rem;
}
.ask-form textarea {
  flex: 1;
  border: 0;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px; /* prevent iOS zoom */
  line-height: 1.4;
  color: var(--fg);
  max-height: 8rem;
  padding: 0.45rem 0;
  outline: none;
}
.ask-send {
  flex: none;
  border: 0;
  background: var(--fg);
  color: var(--bg);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.4rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.ask-send:hover { background: #333; }
.ask-send:disabled { opacity: 0.5; cursor: default; }

.ask-note {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
}
.ask-note[hidden] { display: none; }
.ask-note-lead {
  font-size: 0.875rem;
  color: var(--muted);
}
.ask-note input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.7rem 0.85rem;
  outline: none;
}
.ask-note input:focus { border-color: var(--muted); }
.ask-note-btn { justify-self: start; margin-top: 0.25rem; }

.ask-err {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}

footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--pad) 2.5rem;
}
footer p {
  font-size: 0.75rem;
  color: var(--muted);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

.fade-in-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up,
  .fade-in-section,
  .btn, .ask-chips button, .menu span, .logo-cell {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
