:root {
  --ink: #252321;
  --muted: #6c6862;
  --paper: #faf7f0;
  --white: #fffdf8;
  --burgundy: #8d283d;
  --burgundy-dark: #681829;
  --rose: #ead1d4;
  --rose-light: #f7e9e9;
  --teal: #477f79;
  --line: #ddd5c9;
  --shadow: 0 24px 70px rgba(55, 42, 32, 0.13);
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 84px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--white);
  background: var(--burgundy);
  border-radius: 50% 50% 50% 12px;
  font-family: var(--serif);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-links > a:not(.nav-cta) {
  transition: color 160ms ease;
}

.nav-links > a:not(.nav-cta):hover {
  color: var(--burgundy);
}

.nav-cta {
  padding: 11px 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: 999px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  align-items: center;
  min-height: 660px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 82px;
}

.hero::before {
  position: absolute;
  top: 16%;
  left: -19%;
  width: 310px;
  height: 310px;
  content: "";
  border: 1px solid rgba(141, 40, 61, 0.14);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 625px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--burgundy);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 660px;
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: clamp(3.55rem, 6.5vw, 6.2rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

h1 em {
  position: relative;
  color: var(--burgundy);
  font-weight: 600;
}

h1 em::after {
  position: absolute;
  right: 2%;
  bottom: -5px;
  left: 1%;
  height: 7px;
  content: "";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='9' viewBox='0 0 300 9'%3E%3Cpath d='M2 6C78 1 194 2 298 5' fill='none' stroke='%23b86a77' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
}

.hero-intro {
  max-width: 570px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 25px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: var(--burgundy);
  box-shadow: 0 12px 24px rgba(141, 40, 61, 0.2);
}

.button-primary:hover {
  background: var(--burgundy-dark);
  box-shadow: 0 15px 30px rgba(104, 24, 41, 0.25);
}

.text-link {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
  font-weight: 700;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.76rem;
}

.hero-proof span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-proof span::before {
  content: "✓";
  color: var(--teal);
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 530px;
}

.mascot-frame {
  position: absolute;
  top: 23px;
  right: 0;
  width: min(100%, 510px);
  overflow: hidden;
  background: #eee2d3;
  border-radius: 48% 48% 11% 11%;
  box-shadow: var(--shadow);
}

.mascot-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: inherit;
}

.mascot-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transform: scale(1.015);
}

.mascot-halo {
  position: absolute;
  top: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  border: 35px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
}

.speech-card {
  position: absolute;
  z-index: 3;
  padding: 16px 19px;
  background: var(--white);
  box-shadow: 0 15px 35px rgba(55, 42, 32, 0.17);
  font-size: 0.82rem;
}

.speech-card-one {
  top: 64px;
  left: -30px;
  display: flex;
  flex-direction: column;
  border-radius: 12px 12px 12px 2px;
  transform: rotate(-2deg);
}

.speech-card-one strong {
  margin-top: 3px;
  color: var(--burgundy);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.speech-card-two {
  right: -26px;
  bottom: 41px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  color: var(--muted);
}

.status-dot {
  width: 9px;
  height: 9px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(71, 127, 121, 0.14);
}

.generator-section {
  padding: 100px max(24px, calc((100vw - 1180px) / 2)) 112px;
  color: var(--ink);
  background: #e8ddd1;
}

.section-heading {
  max-width: 660px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading h2,
.about-section h2 {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4vw, 3.65rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.section-heading > p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.generator-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  max-width: 1030px;
  min-height: 660px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.complaint-form {
  padding: 43px;
}

.form-field {
  margin-bottom: 23px;
}

.form-field label,
.tone-field legend {
  display: block;
  margin-bottom: 9px;
  font-size: 0.86rem;
  font-weight: 700;
}

.label-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.label-row span {
  color: #99918a;
  font-size: 0.72rem;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--ink);
  background: #fdfbf7;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  transition:
    border 160ms ease,
    box-shadow 160ms ease;
}

input[type="text"] {
  height: 50px;
}

textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.55;
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(141, 40, 61, 0.09);
}

::placeholder {
  color: #aaa29a;
}

.field-error {
  min-height: 18px;
  margin: 6px 0 0;
  color: var(--burgundy);
  font-size: 0.76rem;
}

.tone-field {
  padding: 0;
  margin: 0 0 26px;
  border: 0;
}

.tone-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tone-option {
  position: relative;
  cursor: pointer;
}

.tone-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tone-copy {
  display: flex;
  min-height: 78px;
  padding: 12px 11px;
  flex-direction: column;
  justify-content: center;
  background: #fdfbf7;
  border: 1px solid var(--line);
  border-radius: 5px;
  transition: all 160ms ease;
}

.tone-copy strong {
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.tone-copy small {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.3;
}

.tone-option input:checked + .tone-copy {
  color: var(--burgundy);
  background: var(--rose-light);
  border-color: var(--burgundy);
  box-shadow: inset 0 0 0 1px var(--burgundy);
}

.tone-option input:focus-visible + .tone-copy {
  outline: 3px solid rgba(141, 40, 61, 0.2);
}

.generate-button {
  width: 100%;
}

.donation-option {
  padding: 15px;
  margin: 0 0 18px;
  background: #f7f3ec;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.donation-option label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  cursor: pointer;
}

.donation-option input {
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  accent-color: var(--burgundy);
}

.donation-option span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.donation-option strong {
  font-size: 0.78rem;
}

.donation-option small,
.donation-option > p {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.donation-option > p {
  margin: 10px 0 0 28px;
}

.donation-option a {
  color: var(--burgundy);
  font-weight: 700;
  text-decoration: underline;
}

.generate-button.is-loading {
  pointer-events: none;
  opacity: 0.78;
}

.form-note {
  margin: 12px 0 0;
  color: #989089;
  font-size: 0.7rem;
  text-align: center;
}

.result-panel {
  display: flex;
  min-width: 0;
  padding: 43px;
  background: var(--burgundy);
}

.result-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin-bottom: 24px;
  place-items: center;
  color: var(--burgundy);
  background: var(--white);
  border-radius: 50% 50% 50% 14px;
  font-family: var(--serif);
  font-size: 2rem;
  box-shadow: 0 12px 24px rgba(54, 10, 20, 0.2);
}

.result-empty h3 {
  margin-bottom: 9px;
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.55rem;
}

.result-empty p {
  max-width: 310px;
  font-size: 0.86rem;
  line-height: 1.6;
}

.empty-lines {
  width: min(100%, 290px);
  margin-top: 28px;
}

.empty-lines span {
  display: block;
  height: 7px;
  margin-bottom: 13px;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 10px;
}

.empty-lines span:nth-child(2) {
  width: 87%;
}

.empty-lines span:nth-child(3) {
  width: 94%;
}

.empty-lines span:nth-child(4) {
  width: 64%;
}

.result-content {
  width: 100%;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.result-kicker {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-header h3 {
  margin-bottom: 0;
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.55rem;
}

.tone-badge {
  padding: 7px 10px;
  color: var(--burgundy);
  background: var(--rose-light);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
}

.result-text {
  min-height: 440px;
  padding: 22px;
  color: #39312d;
  background: var(--white);
  border: 0;
  box-shadow: 0 12px 28px rgba(55, 8, 19, 0.18);
  font-family: Georgia, serif;
  font-size: 0.88rem;
  line-height: 1.68;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}

.button-dark {
  color: var(--white);
  background: var(--ink);
}

.button-ghost {
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.result-disclaimer {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
}

.contribution-reference {
  padding: 10px 12px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-size: 0.68rem;
  line-height: 1.45;
}

.privacy-page {
  min-height: 100vh;
  padding: 80px 24px;
  background: var(--paper);
}

.privacy-document {
  max-width: 760px;
  padding: 48px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.privacy-document h1 {
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
}

.privacy-document h2 {
  margin: 34px 0 10px;
  font-family: var(--serif);
  font-size: 1.45rem;
}

.privacy-document p,
.privacy-document li {
  color: var(--muted);
  line-height: 1.7;
}

.privacy-document a {
  color: var(--burgundy);
  font-weight: 700;
  text-decoration: underline;
}

.steps-section {
  padding: 112px max(24px, calc((100vw - 1180px) / 2));
}

.section-heading.compact {
  margin-bottom: 55px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1050px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.step-card {
  position: relative;
  min-height: 250px;
  padding: 36px 34px 20px;
  border-right: 1px solid var(--line);
}

.step-card:last-child {
  border-right: 0;
}

.step-card.featured::before {
  position: absolute;
  top: -2px;
  right: 25px;
  left: 25px;
  height: 3px;
  content: "";
  background: var(--burgundy);
}

.step-number {
  display: block;
  margin-bottom: 42px;
  color: var(--burgundy);
  font-family: var(--serif);
  font-size: 0.85rem;
}

.step-card h3 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.step-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  padding: 100px max(24px, calc((100vw - 1030px) / 2));
  color: var(--white);
  background: var(--ink);
}

.about-section .eyebrow {
  color: #d9939f;
}

.about-copy {
  padding-top: 28px;
  color: #c6c0b9;
  line-height: 1.75;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 110px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: #171615;
  color: #aaa49e;
  font-size: 0.78rem;
}

.footer-brand {
  color: var(--white);
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 23px;
}

.coffee-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  color: var(--ink);
  background: #ffdd69;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.coffee-link-header {
  padding: 9px 14px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.coffee-link:hover {
  transform: translateY(-2px);
}

.coffee-link span {
  padding: 3px 6px;
  color: #776429;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coffee-link.is-pending {
  cursor: default;
  opacity: 0.58;
}

.coffee-link.is-pending:hover {
  transform: none;
}

@media (max-width: 980px) {
  .nav-links {
    gap: 15px;
  }

  .hero {
    grid-template-columns: 1fr 0.85fr;
  }

  .hero-visual {
    min-height: 440px;
  }

  .speech-card-one {
    left: -5px;
  }

  .speech-card-two {
    right: -5px;
  }

  .complaint-form,
  .result-panel {
    padding: 34px;
  }
}

@media (max-width: 780px) {
  .site-header {
    width: min(100% - 32px, 1180px);
  }

  .nav-links > a:not(.nav-cta) {
    display: none;
  }

  .nav-links > .coffee-link-header {
    display: inline-flex;
  }

  .coffee-link-header {
    padding: 9px 11px;
    font-size: 0.68rem;
  }

  .nav-cta {
    padding: 10px 14px;
    font-size: 0.76rem;
  }

  .hero {
    grid-template-columns: 1fr;
    width: min(100% - 38px, 640px);
    padding-top: 48px;
    text-align: center;
  }

  .hero-copy {
    margin: 0 auto;
  }

  .hero-intro {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions,
  .hero-proof {
    justify-content: center;
  }

  .hero-visual {
    min-height: 550px;
    margin-top: 25px;
  }

  .mascot-frame {
    right: 50%;
    width: min(100%, 500px);
    transform: translateX(50%);
  }

  .generator-shell {
    grid-template-columns: 1fr;
  }

  .result-panel {
    min-height: 580px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .step-card {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .step-card:last-child {
    border-bottom: 0;
  }

  .step-number {
    margin-bottom: 22px;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .about-copy {
    padding-top: 0;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 35px;
    padding-bottom: 35px;
    text-align: center;
  }

  .footer-brand,
  .footer-links {
    justify-content: center;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 1rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav-cta {
    display: none;
  }

  .coffee-link-header {
    padding: 8px 10px;
    font-size: 0.64rem;
  }

  h1 {
    font-size: 3.25rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .text-link {
    align-self: center;
  }

  .hero-proof {
    gap: 9px 14px;
  }

  .hero-visual {
    min-height: 415px;
  }

  .speech-card-one {
    top: 25px;
    left: -9px;
  }

  .speech-card-two {
    right: -8px;
    bottom: 12px;
  }

  .generator-section,
  .steps-section {
    padding-top: 75px;
    padding-bottom: 75px;
  }

  .complaint-form,
  .result-panel {
    padding: 27px 21px;
  }

  .tone-options {
    grid-template-columns: 1fr;
  }

  .tone-copy {
    min-height: 65px;
  }

  .result-panel {
    min-height: 520px;
  }

  .result-header {
    flex-direction: column;
  }

  .result-text {
    min-height: 400px;
  }

  .result-actions {
    flex-direction: column;
  }

  .about-section {
    padding-top: 75px;
    padding-bottom: 75px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
