@import url("https://fonts.googleapis.com/css2?family=Changa:wght@600;800&family=Chewy&family=Patrick+Hand&display=swap");

:root {
  color-scheme: light;
  --ink: #17140f;
  --paper: #fff8e8;
  --paper-deep: #f2deb1;
  --green: #23b468;
  --green-dark: #0d6f47;
  --red: #ef493b;
  --blue: #2f91d7;
  --yellow: #f2c94c;
  --shadow: 4px 4px 0 var(--ink);
  --radius: 8px;
  --font-display: "Chewy", "Comic Sans MS", system-ui, sans-serif;
  --font-hand: "Patrick Hand", "Comic Sans MS", system-ui, sans-serif;
  --font-arabic: "Changa", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(242, 201, 76, 0.35), transparent 28rem),
    linear-gradient(135deg, #176441 0%, #c72f2f 50%, #e0b33d 100%);
  letter-spacing: 0;
  overflow-x: hidden;
  font-family: var(--font-hand);
}

a,
button {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(255, 248, 232, 0.94);
  border-bottom: 3px solid var(--ink);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-grid;
  line-height: 0.88;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 950;
  font-size: 18px;
  font-family: var(--font-display);
}

.brand span:first-child {
  color: var(--green-dark);
}

.brand span:last-child {
  color: var(--ink);
}

.language-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 126px;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 2px 2px 0 var(--ink);
}

.language-button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  font-family: var(--font-display);
  cursor: pointer;
}

.language-button.is-active {
  background: var(--yellow);
}

.header-download,
.primary-cta,
.share-actions a,
.share-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--green);
  color: var(--ink);
  font-weight: 950;
  font-family: var(--font-display);
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.header-download {
  display: none;
  min-height: 34px;
  padding: 0 10px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
}

main,
.footer {
  width: min(100%, 520px);
  margin: 0 auto;
  background: var(--paper);
}

section {
  padding: 26px 16px;
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  padding-top: 34px;
}

.section-label {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

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

h1 {
  max-width: 340px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(42px, 13vw, 58px);
  line-height: 0.94;
  font-weight: 400;
  overflow-wrap: anywhere;
}

h2 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1;
  font-weight: 400;
  text-align: center;
}

.stats {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  margin: 0 auto;
}

.stats > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 5px 7px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  font-family: var(--font-display);
}

.stats > span > span {
  display: inline;
}

.primary-cta {
  width: min(100%, calc(100vw - 40px));
  min-height: 56px;
  padding: 12px 18px;
  background: var(--green);
  font-size: 19px;
}

.card-preview {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 6px auto 0;
  width: calc(100vw - 52px);
  max-width: 326px;
  padding: 12px;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-deep);
  box-shadow: 7px 7px 0 var(--ink);
}

.prompt-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 126px;
  padding: 15px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  transform: rotate(-1deg);
}

.prompt-card span {
  width: fit-content;
  margin: 0 auto;
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  font-family: var(--font-display);
}

.prompt-card p {
  align-self: center;
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1.1;
  font-weight: 400;
  text-align: center;
  overflow-wrap: anywhere;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.answer-grid[hidden] {
  display: none;
}

.answer-card {
  appearance: none;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 8px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #151515;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: 3px 3px 0 var(--ink);
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.answer-card:hover,
.answer-card:focus-visible {
  transform: translateY(-2px) rotate(0deg);
}

.answer-card:nth-child(3n + 1) {
  transform: rotate(-1.5deg);
}

.answer-card:nth-child(3n + 2) {
  transform: rotate(1deg);
}

.answer-card.is-selected {
  background: var(--green-dark);
  box-shadow: 0 0 0 3px var(--yellow), 3px 3px 0 var(--ink);
}

.demo-over {
  position: absolute;
  inset: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.demo-over p {
  max-width: 260px;
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
}

.demo-over[hidden] {
  display: none;
}

.card-preview.is-complete .prompt-card {
  transform: rotate(-1deg);
}

.fake-label {
  position: relative;
  top: -0.6em;
  display: inline-block;
  margin-right: 4px;
  font-family: var(--font-body);
  font-size: 9px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: lowercase;
}

[data-lang="arabic"] .fake-label {
  margin-right: 0;
  margin-left: 4px;
}

.rating {
  display: grid;
  gap: 5px;
  justify-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 9px 13px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 950;
  font-family: var(--font-display);
}

.stars {
  color: var(--yellow);
  font-size: 22px;
  letter-spacing: 0;
  text-shadow:
    1px 0 var(--ink),
    -1px 0 var(--ink),
    0 1px var(--ink),
    0 -1px var(--ink);
}

.art-section {
  background: var(--paper-deep);
}

.art-frame {
  position: relative;
  min-height: 450px;
  margin: 18px 0 0;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    var(--art-image),
    linear-gradient(135deg, #e9a43e, #176441 55%, #692828);
  background-position: center;
  background-size: cover;
  box-shadow: 7px 7px 0 var(--ink);
}

.art-placeholder {
  position: absolute;
  inset: 14px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 18px;
  border: 3px dashed rgba(23, 20, 15, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 248, 232, 0.88);
  text-align: center;
}

.art-placeholder strong {
  font-size: 28px;
  line-height: 1;
}

.art-placeholder span {
  font-size: 13px;
  font-weight: 900;
}

.art-frame.has-image .art-placeholder {
  display: none;
}

figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 9px 10px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 248, 232, 0.92);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
}

.quotes {
  background: #fffdf3;
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

.quote-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 172px;
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}

.quote-card:nth-child(2) {
  background: #ffe1dd;
}

.quote-card:nth-child(3) {
  background: #e6f6e9;
}

.quote-card:nth-child(4) {
  background: #e4f1ff;
}

.quote-card h3 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 950;
}

.quote-card p {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
}

.disclaimer {
  margin-top: 12px;
  color: rgba(23, 20, 15, 0.64);
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
}

.instructions {
  background: var(--green);
}

.steps {
  display: grid;
  gap: 0;
  padding: 0;
  max-width: 720px;
  margin: 18px auto 0;
  list-style: none;
  border-top: 3px solid var(--ink);
}

.steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 0;
  padding: 8px 0;
  border-bottom: 3px solid var(--ink);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 950;
}

.step-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 14px;
}

.download-panel {
  text-align: center;
  background: var(--blue);
  color: #fff;
}

.download-panel h2 {
  margin-top: 0;
  font-size: 46px;
}

.download-panel p {
  margin: 10px 0 18px;
  font-weight: 900;
}

.cta-red {
  background: var(--red);
  color: #fff;
}

.share-section {
  text-align: center;
}

.share-section h2 {
  margin-top: 0;
}

.share-section p {
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 900;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.share-actions a,
.share-actions button {
  width: 100%;
  min-height: 48px;
  background: #fff;
}

.share-actions a:nth-child(2) {
  background: var(--green);
}

.share-actions button:last-child {
  background: var(--yellow);
}

.share-feedback {
  min-height: 18px;
  color: var(--green-dark);
  font-size: 13px;
}

.footer {
  display: grid;
  gap: 4px;
  padding: 18px 16px 26px;
  border-bottom: 0;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

[data-lang="arabic"] body {
  font-family: var(--font-arabic);
}

[data-lang="arabic"] h1,
[data-lang="arabic"] h2,
[data-lang="arabic"] .brand,
[data-lang="arabic"] .language-button,
[data-lang="arabic"] .primary-cta,
[data-lang="arabic"] .prompt-card p,
[data-lang="arabic"] .answer-card,
[data-lang="arabic"] .quote-card p,
[data-lang="arabic"] .steps li {
  font-family: var(--font-arabic);
  line-height: 1.2;
}

@media (min-width: 760px) {
  .site-header {
    padding: 14px 28px;
  }

  .header-download {
    display: inline-flex;
  }

  main,
  .footer {
    width: min(100%, 1120px);
  }

  section {
    padding: 48px 32px;
  }

  .hero {
    min-height: calc(100svh - 68px);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
    align-items: center;
    column-gap: 34px;
    text-align: left;
  }

  [data-lang="arabic"] .hero {
    text-align: right;
  }

  .hero > h1,
  .hero > .stats,
  .hero > .primary-cta,
  .hero > .rating {
    grid-column: 1;
  }

  .card-preview {
    grid-column: 2;
    grid-row: 1 / span 5;
    width: min(100%, 520px);
    margin-right: auto;
    margin-left: auto;
  }

  .eyebrow,
  .section-label {
    margin-right: 0;
    margin-left: 0;
  }

  h1 {
    max-width: 520px;
    margin: 0;
    font-size: clamp(68px, 8vw, 110px);
  }

  h2 {
    font-size: 58px;
  }

  .stats {
    justify-content: flex-start;
    width: 100%;
    max-width: 520px;
    margin-right: 0;
    margin-left: 0;
  }

  [data-lang="arabic"] .stats {
    justify-content: flex-start;
  }

  .primary-cta {
    width: fit-content;
    min-width: 240px;
  }

  .rating {
    margin-right: auto;
    margin-left: 0;
  }

  [data-lang="arabic"] .rating {
    margin-right: 0;
    margin-left: auto;
  }

  .art-frame {
    min-height: 760px;
  }

  .quote-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .steps li {
    grid-template-columns: 34px 1fr;
    min-height: 0;
    padding: 9px 0;
  }

  .download-panel {
    display: grid;
    justify-items: center;
  }

  .share-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 640px;
    margin-right: auto;
    margin-left: auto;
  }
}
