/* ============================= style.css ============================= */

/* ==== Core Palette (Databricks-inspired) ==== */
:root {
  --primary: #ff5d2d; /* vivid orange-red */
  --primary-dark: #d64519;
  --secondary: #0b0d17; /* near-black */
  --bg: #fafbfe; /* soft off-white */
  --gray-600: #5f6b7a;
}

/* ==== Global Resets ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--secondary);
  -webkit-font-smoothing: antialiased;
}

/* ==== Containers ==== */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* ==== Buttons ==== */
.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.25s, transform 0.25s;
}
.btn.primary {
  color: #fff;
  background: var(--primary);
}
.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}
.btn.secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn.secondary:hover {
  background: var(--primary);
  color: #fff;
}

/* ==== Navbar ==== */
.navbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ==== Content Offset for Fixed Navbar ==== */
body > .navbar + *,
.sub-hero,
.features,
.intro-values,
.intro-cta,
.container.main-content,
section.main-content {
  margin-top: 80px;
}

@media (max-width: 600px) {
  body > .navbar + *,
  .sub-hero,
  .features,
  .intro-values,
  .intro-cta,
  .container.main-content,
  section.main-content {
    margin-top: 90px;
  }
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1rem;
  gap: 1rem;
}
.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.nav-wrap nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover {
  color: var(--secondary);
}
.navbar nav a.active {
  font-weight: 700;
  color: var(--primary, #FF5D2D);
}
.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  margin-left: auto;
  border: 1px solid rgba(11, 13, 23, 0.1);
  border-radius: 1rem;
  background: #fff;
  color: var(--secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
  box-shadow: 0 10px 24px rgba(11, 13, 23, 0.08);
}
.nav-toggle-bar {
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-wrap.menu-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-wrap.menu-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-wrap.menu-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@keyframes nav-slide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  body.nav-open {
    overflow: hidden;
  }

  .nav-wrap {
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-wrap nav {
    display: none;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.85rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(217, 224, 234, 0.9);
    border-radius: 1.2rem;
    box-shadow: 0 18px 40px rgba(11, 13, 23, 0.08);
    animation: nav-slide 0.24s ease;
  }

  .nav-wrap.menu-open nav {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  nav a {
    margin-left: 0;
    padding: 0.85rem 1rem;
    border-radius: 0.95rem;
  }

  nav a:hover,
  .navbar nav a.active {
    background: #fff6f2;
    color: var(--primary);
  }

  .nav-wrap nav .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.15rem;
  }
}

/* ==== Hero Section ==== */
.hero {
  position: relative;
  padding: 10rem 0 6rem; /* leave space for fixed nav */
  text-align: center;
  overflow: hidden;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(255, 93, 45, 0.25) 0%,
      rgba(255, 93, 45, 0) 60%
    ),
    radial-gradient(
      circle at 80% 35%,
      rgba(11, 13, 23, 0.12) 0%,
      rgba(11, 13, 23, 0) 60%
    );
}
.hero h1 {
  font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem);
  margin-bottom: 1.25rem;
}
.hero p {
  max-width: 650px;
  margin-inline: auto;
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 2.25rem;
}
.bg-shapes {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 93, 45, 0.14), transparent 20%),
    radial-gradient(circle at 78% 32%, rgba(11, 13, 23, 0.08), transparent 26%),
    linear-gradient(120deg, rgba(255, 255, 255, 0), rgba(11, 13, 23, 0.05), rgba(255, 255, 255, 0));
  opacity: 0.8;
  pointer-events: none;
}

/* ==== Features Grid ==== */
.features {
  padding: 5rem 0 6rem;
}
.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}
.feature-grid {
  --min: 260px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  gap: 2rem;
}
.card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card img {
  margin-top: auto !important;
  align-self: flex-end;
}
.card:hover {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  transform: translateY(-6px);
}
.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}
.card p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

.intro-card img {
  width: 100%;
  aspect-ratio: 1 / 1; /* modern browsers */
  object-fit: cover; /* crops excess edges */
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ==== Footer ==== */
footer {
  background: #eff2f9;
  padding: 2rem 0;
  text-align: center;
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* ==== Floating Feedback Entry ==== */
#global-feedback-btn {
  display: none !important;
}

.floating-feedback {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0.9rem 0.7rem;
  border-radius: 18px;
  background: rgba(11, 13, 23, 0.9);
  color: #fff;
  text-decoration: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(11, 13, 23, 0.18);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(10px);
}

.floating-feedback:hover {
  background: var(--primary);
  transform: translateY(-50%) translateX(-4px);
  box-shadow: 0 18px 40px rgba(255, 93, 45, 0.28);
}

.floating-feedback span {
  display: inline-block;
}

@media (max-width: 860px) {
  .floating-feedback {
    top: auto;
    bottom: 88px;
    right: 14px;
    min-width: auto;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: 0.02em;
    font-size: 0.82rem;
    transform: none;
  }

  .floating-feedback:hover {
    transform: translateY(-2px);
  }
}

/* ==== Reviews Page Refactor ==== */
.reviews-hero {
  padding: 6rem 1.5rem 4rem;
  text-align: center;
  background: var(--bg);
}

.reviews-hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.reviews-hero p {
  color: var(--gray-600);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

.reviews-layout {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 2rem 0 6rem;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

.reviews-carousel-container {
  width: 100%;
  position: relative;
}

.reviews-carousel-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 1rem 0; /* Add padding for box-shadows to not get clipped */
}

.reviews-carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.reviews-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 1.5rem;
  align-content: start;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.carousel-btn {
  background: #ffffff;
  border: 1px solid var(--border, #e8edf4);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--secondary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.05);
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reviews-sidebar {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .reviews-slide {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .reviews-slide {
    grid-template-columns: 1fr;
  }
}

.review-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border, #e8edf4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8e6b 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
}

.author-info h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--secondary);
}

.author-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.review-stars {
  display: flex;
  gap: 4px;
  color: #fbbf24;
}

.review-content {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #374151;
  position: relative;
}



.submit-review-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(11, 13, 23, 0.06);
  border: 1px solid var(--border, #e8edf4);
}

.submit-review-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.submit-review-card > p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  font-family: inherit;
  font-size: 1rem;
  background: #f9fafb;
  transition: border-color 0.2s, background 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 93, 45, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Interactive Star Rating */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
}

.star-rating input {
  display: none;
}

.star-rating label {
  cursor: pointer;
  width: 32px;
  height: 32px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23d1d5db" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>');
  background-size: cover;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fbbf24" stroke="%23fbbf24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>');
}

.review-form .btn {
  margin-top: 0.5rem;
  width: 100%;
}

.status-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.status-message.success {
  background: #ecfdf5;
  color: #065f46;
  display: block;
}

.status-message.error {
  background: #fef2f2;
  color: #991b1b;
  display: block;
}
.card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.card.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* --- Introduction page --- */
.intro-values {
  padding: 4.5rem 0 3rem;
}
.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.intro-card {
  background: var(--brand-gray);
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgb(0 0 0/0.05);
  transition: 0.4s transform, 0.4s box-shadow;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.intro-card:hover {
  transform: translateY(-8px) perspective(600px) rotateX(4deg);
  box-shadow: 0 12px 24px rgb(0 0 0/0.12);
}
.intro-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.intro-card h3 {
  font-size: 1.25rem;
  margin: 1.2rem 1.5rem 0.5rem;
}
.intro-card p {
  flex: 1;
  padding: 0 1.5rem 1.6rem;
}

.intro-cta {
  background: linear-gradient(135deg, #ffa177 0%, #ff7744 50%, #ee5026 100%);
  color: var(--brand-light);
  text-align: center;
  padding: 4.5rem 1.5rem;
}
.intro-cta h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  margin-bottom: 1.6rem;
  font-weight: 700;
}
.btn-intro {
  display: inline-block;
  padding: 0.75rem 2.2rem;
  background: var(--brand-light);
  color: var(--brand-red);
  border-radius: 6rem;
  font-weight: 600;
  transition: 0.25s transform, 0.25s box-shadow;
}
.btn-intro:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgb(0 0 0/0.15);
}

@media (max-width: 500px) {
  .intro-card img {
    height: 150px;
  }
}

/* --- Solution page --- */
:root {
  --brand-red: #ff3621;
  --brand-dark: #0d0d0d;
  --brand-gray: #f5f5f7;
  --brand-light: #ffffff;
  --radius: 12px;
}

.solution-hero {
  background: linear-gradient(135deg, #ee5026 0%, #ff7744 50%, #ffa177 100%);
  color: var(--brand-light);
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.solution-steps {
  padding-block: 4rem 1rem;
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-block: 3rem 1rem;
  perspective: 1000px;
}
.step-grid.two-by-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2rem 2.5rem;
  margin-top: 2.5rem;
}
.step-grid.four-by-one {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 0;
  margin-top: 2.5rem;
}
@media (max-width: 900px) {
  .step-grid.two-by-two {
    grid-template-columns: 1fr;
  }
}
.step-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  padding: 1.5rem 2rem;
  min-height: 160px;
  gap: 1.5rem;
}
.step-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 0.75rem;
  background: #f5f5f7;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  flex-shrink: 0;
}
.step-img-large {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 1rem;
  background: #f5f5f7;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 1.2rem;
}
.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.step-content .step-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary, #FF5D2D);
  margin-bottom: 0.2rem;
}
.step-num.engraved {
  font-size: 2.8rem;
  font-weight: 800;
  color: #e0e0e0;
  letter-spacing: 0.05em;
  text-shadow:
    1px 1px 0 #fff,
    2px 2px 4px #b0b0b0,
    0 2px 8px #fff;
  margin-bottom: 0.5rem;
  margin-top: -0.5rem;
  line-height: 1;
  font-family: 'Inter', Arial, sans-serif;
}
.step-card h3 {
  font-size: 1.35rem;
  margin: 0.2rem 0 0.7rem 0;
  font-weight: 700;
  color: var(--primary, #FF5D2D);
  text-align: center;
}
.step-card p {
  margin: 0;
  color: var(--gray-700, #444);
  font-size: 1.08rem;
  text-align: center;
}
@media (max-width: 600px) {
  .step-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem 1rem;
    gap: 1rem;
  }
  .step-img {
    width: 90px;
    height: 90px;
    margin-bottom: 0.5rem;
  }
  .step-content {
    align-items: flex-start;
  }
}
@media (max-width: 700px) {
  .step-img-large {
    width: 120px;
    height: 120px;
  }
  .step-card {
    padding: 1.2rem 0.7rem 1.7rem 0.7rem;
    min-height: 220px;
  }
  .step-num.engraved {
    font-size: 2rem;
  }
}
.step-card:hover {
  transform: translateY(-10px) rotateX(4deg);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.step-num-round {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: #fff;
  color: #FF5D2D;
  font-size: 2.1rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 0.7rem;
  margin-top: -0.5rem;
  line-height: 1;
  font-family: 'Inter', Arial, sans-serif;
  border: 2.5px solid #FF5D2D;
  padding: 0;
}
@media (max-width: 700px) {
  .step-num-round {
    width: 2.2rem;
    font-size: 1.3rem;
  }
}

.solution-cta {
  background: linear-gradient(135deg, #ffa177 0%, #ff7744 50%, #ee5026 100%);
  color: var(--brand-light);
  text-align: center;
  padding: 4.5rem 1.5rem;
}
.solution-cta .btn.large {
  padding: 0.85rem 2.6rem;
  font-size: 1.05rem;
}

@media (max-width: 500px) {
  .step-num {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* --- Roadmap page --- */
.sub-hero.roadmap-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0e5fff 100%);
  color: #fff;
  padding: 6rem 0 4rem;
  text-align: center;
}
.timeline {
  margin-block: 4rem 6rem;
  min-height: 600px;
  padding-bottom: 2rem;
}
.timeline-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  counter-reset: step;
}
@media (min-width: 720px) {
  .timeline-list {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 2.5rem;
  }
}
.timeline-list li {
  background: var(--light);
  padding: 2rem 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgb(0 0 0/0.08);
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.timeline-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -1.75rem;
  top: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgb(0 0 0/0.15);
}
.phase {
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.phase small {
  font-weight: 400;
  color: var(--dark);
  opacity: 0.7;
}
/* Fade effect for timeline content */
.timeline-list li p {
  max-height: 3.2em;
  overflow: hidden;
  position: relative;
  transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  margin-bottom: 0.5rem;
}
.timeline-list li p::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2em;
  background: linear-gradient(to bottom, rgba(245,245,247,0), #f5f5f7 90%);
  pointer-events: none;
  transition: opacity 0.3s;
}
.timeline-list li.expanded p {
  max-height: 500px;
  transition: max-height 0.7s cubic-bezier(0.4,0,0.2,1);
}
.timeline-list li.expanded p::after {
  opacity: 0;
}
@media (max-width: 600px) {
  .timeline-list {
    grid-template-columns: 1fr;
  }
}

/* --- Contact page --- */
.small-hero {
  padding: 5rem 1.5rem 4rem;
}
.contact-details {
  padding: 4rem 0 3rem;
}
.contact-card {
  background: var(--brand-gray);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 700px;
  margin: auto;
  box-shadow: 0 4px 16px rgb(0 0 0/0.06);
}
.contact-card h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.contact-list {
  list-style: none;
  margin-top: 1.5rem;
  line-height: 1.8;
}
.contact-list li + li {
  margin-top: 0.5rem;
}
.contact-list a {
  color: var(--brand-red);
  font-weight: 600;
}
/* === Chat page ========================================================== */
.chat-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: calc(100vh - 72px); /* subtract navbar height */
}

/* --- Fix header overlap on chat page --- */
.navbar {
  position: fixed; /* keep it visible while you scroll  */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* sit above everything else        */
}

/* the chat workspace now starts below the 72-px header            */
.chat-app {
  margin-top: 72px; /* same as the navbar’s height        */
  height: calc(100vh - 72px);
}

#sidebar {
  background: #fafafa;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
}

.sidebar-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.sidebar-btn.active,
.sidebar-btn:hover {
  background: #ffe9e7;
}

.new-chat {
  margin: 1rem 0.9rem;
  border: 1px solid var(--brand-red);
  color: var(--brand-red);
}

#chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--brand-gray);
}

.bubble {
  padding: 0.65rem 1rem;
  border-radius: 1.25rem;
  max-width: 80%;
  line-height: 1.45;
}

.bubble.user {
  background: var(--brand-red);
  color: #fff;
  margin-left: auto;
}

.bubble.bot {
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0/0.08);
}

.bubble.error {
  background: #fff6f6;
  color: #900;
  border: 1px solid #f5c2c2;
}

.input-bar {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid #eee;
}

#user-input {
  flex: 1;
  resize: none;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font: inherit;
}

.send-btn {
  padding: 0 1.25rem;
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
}

.send-btn:hover {
  opacity: 0.9;
}

/* typing indicator */
.bubble.typing {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}
.typing span {
  width: 0.4rem;
  height: 0.4rem;
  background: #ccc;
  border-radius: 50%;
  animation: blink 1s infinite alternate;
}
.typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 0.9;
  }
}

/* --- Chat page (“Ask our AI anything”) ------------------------------ */
.chat-tool-shell {
  background:
    radial-gradient(circle at top right, rgba(255, 93, 45, 0.12), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
}

.chat-hero {
  margin-top: 72px; /* offset fixed navbar */
  padding: 5rem 1rem 2.5rem;
  text-align: center;
  background: radial-gradient(
      circle at 25% 20%,
      rgba(255, 93, 45, 0.2) 0%,
      transparent 55%
    ),
    radial-gradient(
      circle at 70% 85%,
      rgba(11, 13, 23, 0.08) 0%,
      transparent 60%
    );
}

.chat-heading {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.4rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.chat-tagline {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 1.125rem;
  color: var(--gray-600);
}

.chat-workspace {
  padding: 0 0 5rem;
}

.chat-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.6rem;
  align-items: start;
}

.chat-sidecard,
.chat-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 224, 234, 0.86);
  border-radius: 1.5rem;
  box-shadow: 0 18px 42px rgba(11, 13, 23, 0.08);
}

.chat-sidecard {
  padding: 1.5rem;
  display: grid;
  gap: 1.4rem;
}

.chat-sidecard-section h2,
.chat-panel-header h2 {
  font-size: 1.5rem;
  margin: 0.35rem 0 0.75rem;
}

.chat-sidecard-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
}

.chat-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fff6f2;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-sidecard p,
.chat-config-item span,
.chat-form-hint {
  color: var(--gray-600);
}

.chat-config-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.chat-config-item {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: #f8fafc;
  border: 1px solid #e8edf4;
}

.chat-config-item strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.chat-prompt-list {
  display: grid;
  gap: 0.75rem;
}

.chat-task-list {
  display: grid;
  gap: 0.75rem;
}

.chat-settings-grid {
  display: grid;
  gap: 0.85rem;
}

.chat-setting-field {
  display: grid;
  gap: 0.35rem;
}

.chat-setting-field span {
  font-size: 0.88rem;
  font-weight: 600;
}

.chat-setting-field select {
  width: 100%;
  border: 1px solid rgba(217, 224, 234, 0.95);
  border-radius: 1rem;
  padding: 0.85rem 0.95rem;
  background: #fff;
  color: var(--secondary);
  font: inherit;
}

.chat-task-chip {
  display: grid;
  gap: 0.3rem;
  text-align: left;
  border: 1px solid rgba(11, 13, 23, 0.08);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
  color: var(--secondary);
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-task-chip strong {
  font-size: 0.95rem;
}

.chat-task-chip span {
  color: var(--gray-600);
  font-size: 0.88rem;
  line-height: 1.5;
}

.chat-task-chip.active,
.chat-task-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 93, 45, 0.28);
  box-shadow: 0 12px 24px rgba(11, 13, 23, 0.08);
}

.chat-task-chip.active {
  background: #fff6f2;
}

.chat-prompt-chip {
  border: 1px solid rgba(255, 93, 45, 0.14);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  background: #fff;
  color: var(--secondary);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.chat-prompt-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(11, 13, 23, 0.08);
  border-color: rgba(255, 93, 45, 0.28);
}

.chat-panel {
  padding: 1.4rem;
}

.chat-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.chat-status {
  min-height: 1.4rem;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.chat-status.success {
  color: #1b7f37;
}

.chat-status.warning {
  color: #ad6800;
}

.chat-status.error {
  color: #c62828;
}

.chat-messages {
  min-height: 540px;
  max-height: 62vh;
  overflow-y: auto;
  display: grid;
  gap: 1rem;
  padding: 0.25rem;
  margin-bottom: 1rem;
}

.chat-message {
  display: grid;
  gap: 0.4rem;
}

.chat-message.user {
  justify-items: end;
}

.chat-message-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-message-tools {
  display: flex;
  justify-content: flex-start;
}

.chat-message.user .chat-message-tools {
  justify-content: flex-end;
}

.chat-copy-reply-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: #eef2f7;
  color: var(--secondary);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

.chat-message-body {
  max-width: min(100%, 760px);
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
  background: #fff;
  border: 1px solid rgba(217, 224, 234, 0.9);
  box-shadow: 0 12px 24px rgba(11, 13, 23, 0.06);
}

.chat-message.user .chat-message-body {
  background: linear-gradient(135deg, rgba(255, 93, 45, 0.96), rgba(214, 69, 25, 0.92));
  color: #fff;
  border-color: transparent;
}

.chat-message-body p + p {
  margin-top: 0.9rem;
}

.chat-code-block {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(11, 13, 23, 0.08);
  background: #0f172a;
  color: #e5edf7;
  margin-top: 0.8rem;
}

.chat-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.chat-copy-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

.chat-code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}

.chat-code-block code {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.9rem;
}

.chat-typing {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.chat-typing span {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #c2cbd7;
  animation: blink 1s infinite alternate;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-form {
  display: grid;
  gap: 0.85rem;
}

.chat-form-label {
  font-weight: 600;
}

.chat-active-task {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  width: fit-content;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: #fff6f2;
  color: var(--secondary);
  font-size: 0.88rem;
}

.chat-form textarea {
  width: 100%;
  min-height: 132px;
  padding: 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(217, 224, 234, 0.95);
  font: inherit;
  resize: vertical;
}

.chat-form textarea:focus {
  outline: 2px solid rgba(255, 93, 45, 0.18);
  border-color: var(--primary);
}

.chat-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 980px) {
  .chat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .chat-panel-header,
  .chat-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-messages {
    min-height: 420px;
  }
}

/* --- Problem page ---------------------------------------------------- */
.problem-hero {
  background: linear-gradient(135deg, rgba(255, 93, 45, 0.95), rgba(11, 13, 23, 0.92));
  color: #fff;
  padding: 6rem 0 4.5rem;
}

.problem-hero .lead {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.problem-section {
  padding: 4rem 0 5rem;
}

.problem-shell {
  display: grid;
  gap: 2rem;
}

.problem-intro {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 18px 42px rgba(11, 13, 23, 0.08);
}

.problem-intro p {
  max-width: 780px;
  color: var(--gray-600);
  font-size: 1.05rem;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.problem-card {
  background: #fff;
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 1.3rem;
  padding: 1.6rem;
  box-shadow: 0 16px 36px rgba(11, 13, 23, 0.06);
}

.problem-card h3 {
  margin-bottom: 0.85rem;
  color: var(--primary);
  font-size: 1.15rem;
}

.problem-card p {
  color: var(--gray-600);
}

@media (max-width: 860px) {
  .problem-grid {
    grid-template-columns: 1fr;
  }
}
