/* Algatra testimonials — public list, submission form, and homepage preview */
.testimonial-hero {
  position: relative;
  padding: clamp(72px, 9vw, 128px) 0 clamp(54px, 7vw, 92px);
  overflow: hidden;
}
.testimonial-hero::before {
  content: "";
  position: absolute;
  width: min(620px, 68vw);
  aspect-ratio: 1;
  right: -24%;
  top: -40%;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 0 0 70px color-mix(in srgb, var(--lime) 6%, transparent), 0 0 0 140px color-mix(in srgb, var(--ink) 3%, transparent);
  pointer-events: none;
}
.testimonial-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  align-items: center;
  gap: clamp(34px, 7vw, 90px);
}
.testimonial-hero-copy h1,
.testimonial-form-intro h1 {
  max-width: 830px;
  margin: 0;
  font-size: clamp(3.2rem, 7.6vw, 7.4rem);
  line-height: .88;
  letter-spacing: -.075em;
}
.testimonial-hero-copy h1 em { color: var(--ink-soft); font-style: normal; }
.testimonial-hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 25px 0 28px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.13rem);
  line-height: 1.75;
}
.testimonial-hero-board {
  position: relative;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 4vw, 46px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  color: #f2f8f3;
  background: linear-gradient(145deg, var(--deep-2), var(--deep));
  box-shadow: 0 28px 75px rgba(10, 47, 37, .2);
}
.testimonial-hero-board::after {
  content: "“";
  position: absolute;
  right: 22px;
  top: -32px;
  color: rgba(217, 242, 103, .14);
  font: 900 240px/.9 var(--display);
}
.testimonial-hero-board > p { margin: 0 0 18px; color: var(--lime); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.testimonial-hero-board > strong { position: relative; z-index: 2; font: 900 clamp(5rem, 10vw, 8.5rem)/.8 var(--display); letter-spacing: -.08em; }
.testimonial-hero-board > strong small { font-size: .2em; letter-spacing: 0; }
.testimonial-hero-board > small { position: relative; z-index: 2; max-width: 260px; color: rgba(240, 248, 243, .65); font-size: 12px; line-height: 1.6; }
.testimonial-orbit { position: absolute; inset: 24px 24px auto auto; width: 150px; aspect-ratio: 1; border: 1px solid rgba(217,242,103,.3); border-radius: 50%; }
.testimonial-orbit::before,
.testimonial-orbit::after { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.testimonial-orbit::after { inset: 48px; background: var(--lime); border: 0; }
.testimonial-orbit span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.testimonial-orbit span:nth-child(1) { left: 11px; top: 72px; }
.testimonial-orbit span:nth-child(2) { right: 20px; top: 24px; }
.testimonial-orbit span:nth-child(3) { right: 31px; bottom: 13px; }
.testimonial-stars { position: relative; z-index: 2; display: flex; gap: 1px; margin: 18px 0 12px; color: var(--lime); font-size: 18px; letter-spacing: .08em; }
.testimonial-stars span { color: rgba(255,255,255,.18); }

.testimonial-summary-strip { border-block: 1px solid var(--line); background: color-mix(in srgb, var(--surface-muted) 62%, transparent); }
.testimonial-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.testimonial-summary-grid article { min-height: 150px; padding: 28px 34px; border-left: 1px solid var(--line); }
.testimonial-summary-grid article:last-child { border-right: 1px solid var(--line); }
.testimonial-summary-grid span,
.testimonial-summary-grid small { display: block; color: var(--ink-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.testimonial-summary-grid strong { display: block; margin: 8px 0 11px; font: 900 clamp(2.3rem, 5vw, 4rem)/1 var(--display); letter-spacing: -.06em; }
.testimonial-summary-grid small { letter-spacing: 0; text-transform: none; font-weight: 600; }

.testimonial-list-section { padding-top: clamp(72px, 9vw, 120px); }
.testimonial-heading { align-items: end; }
.testimonial-filter {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 30px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.testimonial-filter label { min-width: min(230px, 100%); display: grid; gap: 7px; }
.testimonial-filter label > span { color: var(--ink-muted); font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.testimonial-filter select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: 650 13px var(--body);
}
.testimonial-reset { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; color: var(--ink-soft); font-size: 13px; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.testimonial-card {
  min-width: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.testimonial-card:nth-child(6n + 2),
.testimonial-card:nth-child(6n + 6) { background: color-mix(in srgb, var(--surface-muted) 82%, var(--surface)); }
.testimonial-card-top { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.testimonial-avatar { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 15px; background: var(--deep); color: var(--lime); font-size: 13px; font-weight: 900; }
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-card-top strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.testimonial-card-top p { margin: 4px 0 0; color: var(--ink-muted); font-size: 11px; line-height: 1.45; }
.testimonial-featured { align-self: start; padding: 6px 8px; border-radius: 999px; background: var(--lime-soft); color: var(--deep); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.testimonial-rating { display: flex; align-items: center; gap: 2px; margin: 25px 0 15px; color: var(--ink-muted); font-size: 14px; }
.testimonial-rating span { color: #d5a700; }
.testimonial-rating i { color: color-mix(in srgb, var(--ink-muted) 22%, transparent); font-style: normal; }
.testimonial-rating b { margin-left: auto; color: var(--ink); font-size: 11px; }
.testimonial-card blockquote { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.testimonial-card footer { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.testimonial-card footer span { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.testimonial-card footer time { color: var(--ink-muted); font-size: 10px; white-space: nowrap; }
.testimonial-empty { padding: 70px 24px; border: 1px dashed var(--line-strong); border-radius: 24px; text-align: center; }
.testimonial-empty > span { width: 58px; height: 58px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 18px; background: var(--surface-muted); font: 900 28px var(--display); }
.testimonial-empty h3 { margin: 0 0 8px; font-size: 25px; }
.testimonial-empty p { max-width: 520px; margin: 0 auto 20px; color: var(--ink-soft); }
.testimonial-cta-section { padding-top: 10px; }
.testimonial-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--radius-xl);
  background: var(--deep);
  color: #f5faf6;
  overflow: hidden;
}
.testimonial-cta h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: .95; }
.testimonial-cta p:not(.eyebrow) { max-width: 650px; margin: 14px 0 0; color: rgba(245,250,246,.66); }
.testimonial-cta .eyebrow { color: var(--lime); }

/* Submission form */
.testimonial-form-hero { padding: clamp(70px, 8vw, 110px) 0 clamp(80px, 10vw, 140px); }
.testimonial-form-shell { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: clamp(34px, 7vw, 90px); align-items: start; }
.testimonial-form-intro { position: sticky; top: 112px; }
.testimonial-form-intro h1 { font-size: clamp(3.1rem, 6.2vw, 6rem); }
.testimonial-form-intro > p:not(.eyebrow) { margin: 24px 0 30px; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.75; }
.testimonial-review-note { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 13px; padding: 17px 0; border-top: 1px solid var(--line); }
.testimonial-review-note:nth-of-type(3) { border-bottom: 1px solid var(--line); }
.testimonial-review-note > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--deep); color: var(--lime); font-size: 10px; font-weight: 900; }
.testimonial-review-note strong { display: block; font-size: 13px; }
.testimonial-review-note p { margin: 4px 0 0; color: var(--ink-muted); font-size: 11px; line-height: 1.55; }
.testimonial-form-intro .text-link { margin-top: 27px; }
.testimonial-form-card { border: 1px solid var(--line); border-radius: 30px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.testimonial-form-heading { padding: clamp(26px, 4vw, 42px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-muted) 48%, var(--surface)); }
.testimonial-form-heading > span { color: var(--ink-muted); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.testimonial-form-heading h2 { margin: 9px 0 8px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; }
.testimonial-form-heading p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.testimonial-form-card form { padding: clamp(24px, 4vw, 42px); }
.testimonial-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.testimonial-field { min-width: 0; display: grid; gap: 8px; }
.testimonial-field > span,
.testimonial-rating-field legend { color: var(--ink); font-size: 12px; font-weight: 800; }
.testimonial-field b,
.testimonial-rating-field b,
.testimonial-consent b { color: var(--clay); }
.testimonial-field em { color: var(--ink-muted); font-style: normal; font-weight: 550; }
.testimonial-field input,
.testimonial-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  font: 600 13px var(--body);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.testimonial-field input { min-height: 47px; padding: 0 13px; }
.testimonial-field input[type="file"] { min-height: 54px; padding: 9px 11px; }
.testimonial-field textarea { min-height: 160px; padding: 13px; resize: vertical; line-height: 1.65; }
.testimonial-field input:focus,
.testimonial-field textarea:focus { border-color: var(--ink-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); background: var(--surface); }
.testimonial-field > small,
.testimonial-rating-field > small { color: var(--ink-muted); font-size: 10px; line-height: 1.5; }
.testimonial-field-full { grid-column: 1 / -1; }
.testimonial-rating-field { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.testimonial-rating-input { width: fit-content; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 10px 0 6px; }
.testimonial-rating-input input { position: absolute; opacity: 0; pointer-events: none; }
.testimonial-rating-input label { color: color-mix(in srgb, var(--ink-muted) 25%, transparent); font-size: 35px; line-height: 1; cursor: pointer; transition: color .15s ease, transform .15s ease; }
.testimonial-rating-input label:hover,
.testimonial-rating-input label:hover ~ label,
.testimonial-rating-input input:checked ~ label { color: #d5a700; }
.testimonial-rating-input input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.testimonial-rating-input label:hover { transform: translateY(-2px); }
.testimonial-consent { display: flex; align-items: flex-start; gap: 11px; padding: 15px; border-radius: 14px; background: var(--surface-muted); color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.testimonial-consent input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--deep); }
.testimonial-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.testimonial-form-footer p { max-width: 430px; margin: 0; color: var(--ink-muted); font-size: 10px; line-height: 1.55; }
.testimonial-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.testimonial-form-alert { margin: 24px 24px 0; padding: 13px 15px; border-radius: 12px; color: #8b2d24; background: #fff0ed; border: 1px solid #f4cfc7; font-size: 12px; font-weight: 700; }
.testimonial-form-alert.is-success { color: #17653f; background: #e7f6ed; border-color: #bae3c9; }
.testimonial-file-preview { display: flex; align-items: center; gap: 12px; margin-top: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.testimonial-file-preview img { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; }
.testimonial-file-preview button { border: 0; background: transparent; color: var(--red); font: 800 11px var(--body); cursor: pointer; }
.testimonial-success-modal { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; background: rgba(5, 25, 19, .7); backdrop-filter: blur(12px); }
.testimonial-success-card { width: min(520px, 100%); padding: clamp(28px, 5vw, 48px); border-radius: 28px; background: var(--surface); color: var(--ink); text-align: center; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.testimonial-success-mark { width: 66px; height: 66px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 22px; background: var(--lime); color: var(--deep); font-size: 28px; font-weight: 900; }
.testimonial-success-card > p { margin: 0; color: var(--ink-muted); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.testimonial-success-card h2 { margin: 10px 0 13px; font-size: clamp(2.2rem, 6vw, 3.4rem); }
.testimonial-success-card > div:not(.button-row) { color: var(--ink-soft); line-height: 1.7; }
.testimonial-success-card .button-row { justify-content: center; margin-top: 26px; }
body.testimonial-modal-open { overflow: hidden; }

/* Homepage preview */
.home-testimonials { position: relative; overflow: hidden; }
.home-testimonials::before { content: ""; position: absolute; left: -180px; top: 70px; width: 360px; height: 360px; border: 1px solid var(--line); border-radius: 50%; }
.home-testimonial-head { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 26px; margin-bottom: 28px; }
.home-testimonial-head h2 { max-width: 720px; margin: 0; font-size: clamp(2.7rem, 5.4vw, 5rem); line-height: .93; }
.home-testimonial-head p { max-width: 470px; margin: 0; color: var(--ink-soft); }
.home-testimonial-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-testimonial-card { min-height: 300px; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-small); }
.home-testimonial-card:nth-child(2) { background: var(--deep); color: #f5faf6; }
.home-testimonial-card:nth-child(2) p,
.home-testimonial-card:nth-child(2) small { color: rgba(245,250,246,.65); }
.home-testimonial-card .home-testimonial-stars { color: #d5a700; letter-spacing: .08em; }
.home-testimonial-card blockquote { margin: 22px 0; font-size: 15px; line-height: 1.75; }
.home-testimonial-person { margin-top: auto; display: flex; align-items: center; gap: 11px; }
.home-testimonial-avatar { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: var(--lime); color: var(--deep); font-size: 11px; font-weight: 900; }
.home-testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.home-testimonial-person strong { display: block; font-size: 12px; }
.home-testimonial-person small { display: block; margin-top: 3px; color: var(--ink-muted); font-size: 10px; }
.home-testimonial-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.home-testimonial-empty { padding: 34px; border: 1px dashed var(--line-strong); border-radius: 20px; color: var(--ink-soft); text-align: center; }

[hidden] { display: none !important; }

@media (max-width: 1020px) {
  .testimonial-hero-grid,
  .testimonial-form-shell { grid-template-columns: 1fr; }
  .testimonial-hero-board { min-height: 360px; }
  .testimonial-grid,
  .home-testimonial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .testimonial-form-intro { position: static; }
  .testimonial-form-intro h1 { max-width: 800px; }
}

@media (max-width: 760px) {
  .testimonial-hero { padding-top: 54px; }
  .testimonial-hero-copy h1,
  .testimonial-form-intro h1 { font-size: clamp(2.8rem, 15vw, 4.8rem); }
  .testimonial-summary-grid { grid-template-columns: 1fr; }
  .testimonial-summary-grid article { min-height: 0; padding: 22px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .testimonial-summary-grid article:last-child { border-bottom: 0; }
  .testimonial-grid,
  .home-testimonial-grid,
  .testimonial-form-grid { grid-template-columns: 1fr; }
  .testimonial-card { min-height: 0; }
  .testimonial-heading,
  .home-testimonial-head,
  .testimonial-cta,
  .testimonial-form-footer { align-items: flex-start; flex-direction: column; }
  .testimonial-filter { align-items: stretch; }
  .testimonial-filter label,
  .testimonial-filter .button { width: 100%; }
  .testimonial-cta .button,
  .testimonial-form-footer .button { width: 100%; }
  .testimonial-form-card { border-radius: 22px; }
  .testimonial-form-card form,
  .testimonial-form-heading { padding: 22px 18px; }
  .testimonial-form-alert { margin: 18px 18px 0; }
  .testimonial-field-full,
  .testimonial-rating-field { grid-column: auto; }
  .testimonial-success-card .button-row { display: grid; grid-template-columns: 1fr; width: 100%; }
  .testimonial-success-card .button { width: 100%; }
}

@media (max-width: 440px) {
  .testimonial-hero-board { min-height: 320px; padding: 24px; border-radius: 24px; }
  .testimonial-orbit { width: 120px; }
  .testimonial-card-top { grid-template-columns: 44px minmax(0, 1fr); }
  .testimonial-featured { grid-column: 2; justify-self: start; }
  .testimonial-card footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .testimonial-rating-input label { font-size: 31px; }
}
