:root {
  --ink: #10211b;
  --muted: #63736d;
  --line: #dbe7e1;
  --surface: #ffffff;
  --surface-soft: #f2f8f5;
  --green: #168f4e;
  --green-dark: #0b6640;
  --green-deep: #0b3327;
  --lime: #a7efc5;
  --cream: #f7faf8;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(10, 57, 39, 0.12);
  --radius-lg: 30px;
  --radius-md: 20px;
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 9%, rgba(95, 220, 155, 0.19), transparent 27rem),
    linear-gradient(180deg, #f8fbf9 0, #fff 34rem);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  min-width: 0;
  margin: 0;
  color: inherit;
  font: inherit;
}

button,
select,
input[type="color"] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.48;
  transform: none;
}

button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(22, 143, 78, 0.3);
  outline-offset: 3px;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: 10px;
  color: #fff;
  background: var(--green-deep);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(219, 231, 225, 0.82);
  background: rgba(248, 251, 249, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-deep);
  font-size: 0.89rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.header-actions,
.language-switcher {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 14px;
}

.language-switcher {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.lang-button {
  width: 40px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 800;
}

.lang-button.is-active {
  color: #fff;
  background: var(--green-deep);
}

.back-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.back-link:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.hero {
  display: grid;
  min-height: 610px;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
  align-items: center;
  gap: clamp(25px, 5vw, 72px);
  padding-block: 62px 70px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.step-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6.2vw, 5.65rem);
  font-weight: 900;
  line-height: 0.98;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 880;
  line-height: 1.04;
}

h3 {
  margin-bottom: 5px;
  font-size: 1.3rem;
  font-weight: 850;
  line-height: 1.18;
}

.hero-lead {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.26rem);
  line-height: 1.7;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 30px;
}

.trust-row > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3f544c;
  font-size: 0.91rem;
  font-weight: 750;
}

.trust-row i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(22, 143, 78, 0.11);
}

.hero-visual {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
}

.hero-visual::after {
  position: absolute;
  right: 3%;
  bottom: 9%;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.57) url("../img/whatsapp-link-icon.webp") center / 74% no-repeat;
  box-shadow: 0 20px 50px rgba(8, 75, 48, 0.19);
  content: "";
  transform: rotate(6deg);
  backdrop-filter: blur(10px);
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: min(100%, 590px);
  max-height: 540px;
  object-fit: contain;
  filter: drop-shadow(0 34px 30px rgba(7, 68, 43, 0.16));
}

.hero-glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 225, 151, 0.36), rgba(90, 225, 151, 0) 67%);
  filter: blur(8px);
}

.generator-section {
  padding-block: 88px 92px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.035), transparent 45%),
    var(--green-deep);
  color: #fff;
}

.section-heading {
  max-width: 750px;
  margin-bottom: 38px;
}

.section-heading > p:not(.step-kicker) {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 1.05rem;
}

.generator-section .step-kicker {
  color: #70e3a5;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  align-items: start;
  gap: 22px;
}

.panel {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.input-panel,
.result-panel {
  padding: clamp(24px, 3.4vw, 38px);
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 28px;
}

.panel-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
}

.step-number {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--green-dark);
  background: #e4f8ec;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

legend,
.field > span:first-child,
.color-field > span:first-child {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 820;
}

.number-grid {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
}

.field {
  display: block;
  min-width: 0;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cddbd4;
  border-radius: 13px;
  color: var(--ink);
  background: #fbfdfc;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input,
select {
  min-height: 51px;
  padding: 0 14px;
}

textarea {
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.55;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #9bbbad;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 143, 78, 0.1);
}

.label-with-counter {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.label-with-counter > span:last-child {
  color: #83918c;
  font-size: 0.76rem;
  font-weight: 700;
}

.message-field {
  margin-bottom: 18px;
}

.field-help,
.field-status {
  margin: 8px 0 0;
  font-size: 0.79rem;
}

.field-help {
  color: #7c8c85;
}

.field-status {
  min-height: 1.2em;
  color: var(--danger);
  font-weight: 750;
}

.field-status.is-valid {
  color: var(--green-dark);
}

.preset-area {
  margin-bottom: 24px;
}

.preset-area > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

.preset-list,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #d6e4dd;
  border-radius: 999px;
  color: #315a48;
  background: #f3f9f6;
  font-size: 0.79rem;
  font-weight: 780;
}

.preset:hover {
  border-color: var(--green);
  background: #e9f8ef;
}

.primary-button,
.download-button,
.copy-code-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), #087b55);
  box-shadow: 0 13px 30px rgba(17, 132, 75, 0.23);
  font-weight: 850;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.primary-button {
  width: 100%;
  padding: 13px 20px;
}

.primary-button:hover,
.download-button:hover,
.copy-code-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 34px rgba(17, 132, 75, 0.29);
}

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

.result-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: 30px;
  border: 1px dashed #bfd2c8;
  border-radius: 22px;
  background: var(--surface-soft);
  text-align: center;
}

.result-empty img {
  margin-bottom: 18px;
  filter: drop-shadow(0 16px 18px rgba(8, 77, 46, 0.16));
}

.result-empty p {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 850;
}

.result-empty span {
  color: var(--muted);
  font-size: 0.87rem;
}

[hidden] {
  display: none !important;
}

.output-field input {
  color: #315a48;
  background: #f2f8f5;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.action-row {
  margin: 14px 0 20px;
}

.secondary-button {
  display: inline-flex;
  min-height: 42px;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #d4e2db;
  border-radius: 12px;
  color: #274a3b;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 820;
  text-decoration: none;
}

.secondary-button:hover {
  border-color: var(--green);
  color: var(--green-dark);
  background: #f4fbf7;
}

.qr-wrap {
  display: grid;
  width: min(100%, 306px);
  margin: 0 auto 16px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(10, 57, 39, 0.08);
}

#qrCanvas {
  width: 100%;
  height: auto;
  border-radius: 23px;
}

.download-button,
.copy-code-button {
  width: 100%;
  padding: 11px 16px;
}

.scan-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.html-panel {
  margin-top: 22px;
  padding: clamp(24px, 3.4vw, 38px);
}

.html-title-row {
  margin-bottom: 30px;
}

.html-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr) minmax(300px, 1.25fr);
  align-items: stretch;
  gap: 22px;
}

.button-options {
  display: grid;
  align-content: start;
  gap: 17px;
}

.color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.color-control {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #cddbd4;
  border-radius: 13px;
  background: #fbfdfc;
}

.color-control input {
  width: 36px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.color-control output {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 760;
}

.button-preview-card {
  display: grid;
  min-height: 256px;
  place-items: center;
  align-content: center;
  padding: 26px;
  border: 1px solid #d8e4de;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(11, 102, 64, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(11, 102, 64, 0.04) 1px, transparent 1px),
    #f8fbf9;
  background-size: 20px 20px;
  text-align: center;
}

.button-preview-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#buttonPreview {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

#buttonPreviewText {
  overflow-wrap: anywhere;
}

#buttonPreview[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.54;
}

.button-preview-card small {
  display: block;
  max-width: 260px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.74rem;
}

.code-area textarea {
  min-height: 178px;
  color: #d7fbe7;
  background: #10271e;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
}

.benefits {
  padding-block: 90px 100px;
}

.compact-heading {
  max-width: 700px;
}

.compact-heading > p:not(.step-kicker) {
  color: var(--muted);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.benefit-grid article {
  min-width: 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(10, 57, 39, 0.06);
}

.benefit-grid p {
  margin: 0;
  color: var(--muted);
}

.benefit-icon {
  display: grid;
  width: 47px;
  height: 47px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 14px;
  color: var(--green-dark);
  background: #e5f8ed;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 900;
}

.faq-section {
  padding-block: 80px;
  background: var(--surface-soft);
}

.faq-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 70px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.faq-list summary {
  position: relative;
  padding: 20px 54px 20px 21px;
  cursor: pointer;
  list-style: none;
  font-weight: 820;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 21px;
  color: var(--green);
  content: "+";
  font-size: 1.4rem;
  transform: translateY(-50%);
}

.faq-list details[open] summary::after {
  content: "×";
}

.faq-list details p {
  margin: -4px 0 0;
  padding: 0 21px 21px;
  color: var(--muted);
}

.site-footer {
  padding-block: 32px;
  color: rgba(255, 255, 255, 0.73);
  background: #071f18;
}

.footer-inner,
.footer-brand {
  display: flex;
  align-items: center;
}

.footer-inner {
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  gap: 12px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  color: #fff;
  font-size: 0.91rem;
}

.footer-brand span,
.footer-inner p {
  font-size: 0.79rem;
}

.footer-inner p {
  margin: 0;
  text-align: right;
}

.footer-inner a {
  color: #7ce8aa;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 100;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 17px;
  transform: translateY(140%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  color: #fff;
  background: #092d22;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  font-size: 0.86rem;
  font-weight: 760;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.noscript-message {
  position: fixed;
  z-index: 999;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 14px;
  border-radius: 12px;
  color: #fff;
  background: #8b271f;
  text-align: center;
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .result-panel {
    min-height: 0;
  }

  .html-grid {
    grid-template-columns: 1fr 1fr;
  }

  .code-area {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .header-inner {
    min-height: 72px;
    gap: 10px;
  }

  .brand span {
    display: none;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .header-actions {
    gap: 8px;
  }

  .back-link {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 0.73rem;
  }

  .language-switcher {
    padding: 3px;
  }

  .lang-button {
    width: 34px;
    height: 30px;
    font-size: 0.7rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 46px 55px;
    text-align: center;
  }

  h1 {
    margin-inline: auto;
    font-size: clamp(2.7rem, 13.5vw, 4.5rem);
  }

  .hero-lead {
    margin-inline: auto;
  }

  .trust-row {
    justify-content: center;
  }

  .hero-visual {
    max-width: 440px;
    margin-inline: auto;
  }

  .hero-visual img {
    max-height: 390px;
  }

  .hero-visual::after {
    width: 72px;
    height: 72px;
    border-radius: 21px;
  }

  .generator-section,
  .benefits,
  .faq-section {
    padding-block: 65px;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .input-panel,
  .result-panel,
  .html-panel {
    border-radius: 23px;
  }

  .html-grid,
  .benefit-grid,
  .faq-wrap {
    grid-template-columns: 1fr;
  }

  .html-grid,
  .faq-wrap {
    gap: 24px;
  }

  .code-area {
    grid-column: auto;
  }

  .benefit-grid {
    gap: 14px;
  }

  .benefit-grid article {
    padding: 24px;
  }

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

  .footer-inner p {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .container {
    width: min(100% - 20px, var(--container));
  }

  .back-link {
    max-width: 118px;
    line-height: 1.15;
    text-align: center;
  }

  .header-actions {
    min-width: 0;
  }

  .number-grid,
  .color-grid {
    grid-template-columns: 1fr;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .secondary-button {
    width: 100%;
  }

  .panel-title-row {
    gap: 11px;
  }

  .step-number {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

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

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

@media print {
  .site-header,
  .hero,
  .input-panel,
  .html-panel,
  .benefits,
  .faq-section,
  .site-footer,
  .action-row,
  .download-button,
  .scan-hint {
    display: none !important;
  }

  body,
  .generator-section {
    color: #000;
    background: #fff;
  }

  .generator-section {
    padding: 0;
  }

  .workspace-grid {
    display: block;
  }

  .result-panel {
    box-shadow: none;
  }
}
