/* Jassly website: the app's palette and type, light and dark. */

@font-face {
  font-family: "Young Serif";
  src: url("/assets/fonts/YoungSerif-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f2eee4;
  --surface: #fbf9f4;
  --tint: #e9e3d4;
  --ink: #1b241f;
  --muted: #4f5c55;
  --primary: #1f5a41;
  --primary-strong: #174631;
  --on-primary: #ffffff;
  --accent: #85540f;
  --line: #d8d0bd;
  --felt: #1f5a41;
  --felt-deep: #133826;
  --board: #1d2a23;
  --chalk: #f4f1e8;
  --chalk-muted: #b9c2bb;
  --gold: #e3c26b;
  --shadow: 0 1px 2px rgb(27 36 31 / 6%), 0 8px 24px rgb(27 36 31 / 8%);
  --radius: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101713;
    --surface: #18221d;
    --tint: #141e19;
    --ink: #ede9dc;
    --muted: #aab5ad;
    --primary: #7cc9a0;
    --primary-strong: #94d6b1;
    --on-primary: #0b1810;
    --accent: #e3c26b;
    --line: #2c3a32;
    --felt: #1d4b37;
    --felt-deep: #0f2a1d;
    --board: #0b110e;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

/* Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 "Atkinson Hyperlegible", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.4em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

h3 {
  font-size: 1.45rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}

.icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--primary-strong);
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.95rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 1.5rem "Young Serif", Georgia, serif;
  text-decoration: none;
}

.brand img {
  border-radius: 9px;
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a,
.menu-panel a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover {
  color: var(--primary);
}

.menu {
  display: none;
  position: relative;
}

.menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
}

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

.menu summary svg {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: 52px;
  display: grid;
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.menu-panel a {
  padding: 10px 14px;
  border-radius: 10px;
}

.menu-panel a:hover {
  background: var(--tint);
}

@media (max-width: 820px) {
  .nav {
    display: none;
  }
  .header-cta {
    margin-left: auto;
  }
  .menu {
    display: block;
  }
  .header-row {
    gap: 8px;
  }
}

/* Hero */

.hero {
  overflow: hidden;
  padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
}

.lead {
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.3rem;
}

.store {
  margin: 30px 0 22px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  display: block;
  line-height: 0;
}

.badge img {
  height: 50px;
  width: auto;
}

.store-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.hero-points li,
.checks li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-points .icon,
.checks .icon {
  color: var(--primary);
  stroke-width: 2.4;
}

.hero-visual {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 28px);
  padding: 24px 0;
}

/* The green felt of a Jass mat behind the phones. */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 4% -12% 0;
  z-index: -1;
  border-radius: 48px;
  background:
    radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--felt) 85%, white) 0%, transparent 60%),
    linear-gradient(160deg, var(--felt), var(--felt-deep));
  transform: rotate(-4deg);
}

.phone {
  display: block;
  width: 100%;
  max-width: 260px;
}

.phone-low {
  margin-top: 64px;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-text {
    text-align: center;
  }
  .lead {
    margin-inline: auto;
  }
  .badges,
  .hero-points {
    justify-content: center;
  }
  .hero-visual {
    max-width: 560px;
    margin-inline: auto;
  }
  .hero-visual .phone {
    width: 46%;
  }
  .phone-low {
    margin-top: 40px;
  }
}

/* Sections */

.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section-tint {
  background: var(--tint);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.15rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--felt);
  color: var(--chalk);
  font: 1.6rem/1 "Young Serif", Georgia, serif;
}

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

@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Feature rows, the phone alternating sides */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.feature + .feature {
  margin-top: clamp(56px, 8vw, 104px);
}

.feature:nth-of-type(even) .feature-text {
  order: 2;
}

.feature-text {
  max-width: 480px;
}

.feature-text h3 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.feature-text > p {
  color: var(--muted);
  font-size: 1.12rem;
}

.feature-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.feature-visual::before {
  content: "";
  position: absolute;
  inset: 10% 8% 0;
  z-index: 0;
  border-radius: 40px;
  background:
    radial-gradient(110% 80% at 30% 15%, color-mix(in srgb, var(--felt) 80%, white) 0%, transparent 60%),
    linear-gradient(160deg, var(--felt), var(--felt-deep));
  transform: rotate(3deg);
}

.feature:nth-of-type(even) .feature-visual::before {
  transform: rotate(-3deg);
}

.feature-visual .phone {
  position: relative;
  max-width: 280px;
}

.checks {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 820px) {
  .feature {
    grid-template-columns: 1fr;
  }
  .feature:nth-of-type(even) .feature-text {
    order: 0;
  }
  .feature-visual .phone {
    width: 64%;
  }
}

/* Perks */

.perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.perks li {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.perks .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
}

.perks h3 {
  font-size: 1.25rem;
}

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

@media (max-width: 900px) {
  .perks {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .perks {
    grid-template-columns: 1fr;
  }
}

/* Testimonials, see src/partials/testimonials.html */

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

.quote {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.quote blockquote {
  margin: 0 0 18px;
  font: 1.2rem/1.45 "Young Serif", Georgia, serif;
}

.quote figcaption {
  color: var(--muted);
}

@media (max-width: 900px) {
  .quotes {
    grid-template-columns: 1fr;
  }
}

/* Pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  gap: 20px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.plan h3 {
  font-size: 1.35rem;
}

.plan-price {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 12px;
}

.amount {
  font: 2.4rem/1 "Young Serif", Georgia, serif;
}

.per,
.plan-lead {
  color: var(--muted);
}

.plan-lead {
  margin-bottom: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.plan .checks {
  font-size: 0.98rem;
}

.plan .checks li {
  align-items: flex-start;
}

.plan .checks .icon {
  margin-top: 0.2em;
}

/* The yearly plan is the chalkboard of the set. */
.plan-featured {
  border-color: transparent;
  background: var(--board);
  color: var(--chalk);
  box-shadow: var(--shadow);
}

.plan-featured .per,
.plan-featured .plan-lead {
  color: var(--chalk-muted);
}

.plan-featured .plan-lead {
  border-color: rgb(255 255 255 / 14%);
}

.plan-featured .checks .icon,
.plan-featured .amount {
  color: var(--gold);
}

.plan-tag {
  position: absolute;
  top: -14px;
  left: 26px;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold);
  color: #2b230f;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plans-note {
  max-width: 720px;
  margin: 36px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

@media (max-width: 1040px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 32px;
  }
}

@media (max-width: 560px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

/* FAQ */

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 1.12rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  color: var(--primary);
  font: 1.6rem/1 "Young Serif", Georgia, serif;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: -6px 0 22px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Closing call to action on the wooden Jass table */

.cta {
  padding: clamp(80px, 11vw, 140px) 0;
  background:
    linear-gradient(rgb(10 18 14 / 76%), rgb(10 18 14 / 84%)),
    url("/assets/img/table.jpg") center / cover;
  color: var(--chalk);
  text-align: center;
}

.cta p {
  color: var(--chalk-muted);
  font-size: 1.2rem;
}

.cta .badges {
  justify-content: center;
}

.cta .store {
  margin-bottom: 0;
}

.cta .store-note {
  color: var(--chalk-muted);
}

/* Footer */

.site-footer {
  padding: 64px 0 40px;
  background: var(--board);
  color: var(--chalk-muted);
  font-size: 0.98rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

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

.footer-brand p {
  max-width: 30ch;
  margin-top: 14px;
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.site-footer h2 {
  margin: 6px 0 6px;
  color: var(--chalk);
  font: 700 0.85rem "Atkinson Hyperlegible", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer a:not(.brand) {
  color: var(--chalk-muted);
  text-decoration: none;
}

.site-footer a:not(.brand):hover {
  color: var(--chalk);
}

.footer-legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: 0.85rem;
}

.footer-legal p {
  margin: 0 0 6px;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Text pages: help, privacy, terms, imprint */

.page {
  padding: clamp(40px, 7vw, 80px) 0 clamp(64px, 9vw, 112px);
}

.prose {
  max-width: 720px;
}

.prose h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
}

.prose h2 {
  margin-top: 1.6em;
  font-size: 1.7rem;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.3rem;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.updated {
  color: var(--muted);
}

:target {
  scroll-margin-top: 90px;
}
