/* CRAFTiT — one-page site
   Palette taken from the logo: mint fill #b1ffbb, black outlines, paper-white grid. */

:root {
  --bg: #fafafa;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #4a4a4a;
  --line: #d0d0d0;
  --mint: #b1ffbb;
  --mint-deep: #1d6b2a;
  --mint-hover: #9af3a6;
  --grid: rgba(0, 0, 0, 0.055);
  --radius: 14px;
  --max: 1080px;
  --header-h: 7.5rem;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  font-synthesis: none;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 1cm 1cm;
  font-family: "Segoe UI", "Avenir Next", "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a {
  color: var(--mint-deep);
  text-underline-offset: 0.15em;
}

a:hover {
  color: #0f4d18;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: var(--paper);
}

/* Header
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.35rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  flex: 0 0 auto;
  line-height: 0;
}

.logo {
  height: 6.5rem;
  width: auto;
  mix-blend-mode: multiply;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0.15rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--mint);
  color: var(--ink);
}

.header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem 0.85rem;
  flex-wrap: wrap;
  min-width: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.lang-switch a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 2px solid transparent;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  background: var(--mint);
  color: var(--ink);
}

.lang-switch a[aria-current="page"] {
  background: var(--mint);
  border-color: var(--ink);
  cursor: default;
}

.lang-sep {
  color: var(--ink);
  opacity: 0.4;
  font-weight: 600;
  padding: 0 0.1rem;
}

/* Layout
   ------------------------------------------------------------ */
main {
  display: block;
}

.hero,
.section,
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}

.hero,
.section {
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 3.35rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.75rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 800;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.lead,
.section > p,
.section-split p {
  color: var(--muted);
  max-width: 46rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 1.75rem;
}

/* Hero photo
   ------------------------------------------------------------ */
.hero {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.hero-figure {
  margin: 0;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 1150 / 829;
  object-fit: cover;
}

/* Idea cards
   ------------------------------------------------------------ */
.idea-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.idea-list.stacked {
  grid-template-columns: 1fr;
}

.idea-list li {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem 1.15rem 1.15rem;
  position: relative;
}

.idea-list li::before {
  content: "";
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--mint);
  margin-bottom: 0.65rem;
}

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

/* Core design split
   ------------------------------------------------------------ */
.section-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.section-photo {
  margin: 0;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.section-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Building blocks
   ------------------------------------------------------------ */
.block-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.block-list li {
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.95rem 0.4rem 0.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.block-list li::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  flex: 0 0 auto;
}

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.photo-pair figure {
  margin: 0;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.photo-pair img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Gallery
   ------------------------------------------------------------ */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}

.gallery-item {
  display: block;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(2),
.gallery-item:nth-child(3) {
  grid-column: span 2;
}

.gallery-item:nth-child(4),
.gallery-item:nth-child(5) {
  grid-column: span 3;
}

/* Download buttons
   ------------------------------------------------------------ */
.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1.25rem;
  background: var(--mint);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn:hover,
.btn:focus-visible {
  background: var(--mint-hover);
  color: var(--ink);
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* License + footer
   ------------------------------------------------------------ */
.author {
  margin-top: 1.25rem;
  font-size: 1.05rem;
}

.site-footer {
  padding-top: 0;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}

/* Lightbox
   ------------------------------------------------------------ */
#lightbox {
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 0;
  max-width: min(96vw, 1100px);
  max-height: 94vh;
  background: var(--paper);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

#lightbox::backdrop {
  background: rgba(10, 10, 10, 0.72);
}

#lightbox img {
  max-width: 96vw;
  max-height: calc(94vh - 3.5rem);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--mint);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--mint-hover);
}

/* Responsive
   ------------------------------------------------------------ */
@media (max-width: 800px) {
  :root {
    --header-h: 8.25rem;
  }

  .header-inner {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    padding: 0.35rem 0.9rem 0.45rem;
    gap: 0.2rem;
  }

  .logo {
    height: clamp(3.75rem, 14vw, 5.2rem);
    margin: 0 auto;
  }

  .logo-link {
    padding-left: 4.75rem;
    padding-right: 4.75rem;
  }

  .header-end {
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
  }

  .lang-switch {
    position: absolute;
    top: 0.45rem;
    right: 0.65rem;
  }

  .site-nav {
    justify-content: center;
  }

  .site-nav a {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
  }

  .idea-list,
  .section-split,
  .photo-pair {
    grid-template-columns: 1fr;
  }

  .gallery,
  .photo-pair,
  .section-split,
  .idea-list {
    min-width: 0;
  }

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

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(5) {
    grid-column: span 1;
  }

  .gallery-item:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
    width: 100%;
  }

  .hero,
  .section,
  .site-footer {
    padding: 2.4rem 1rem;
  }

  h1 {
    margin-bottom: 1.2rem;
  }
}

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

  .gallery-item:nth-child(5) {
    max-width: none;
    grid-column: auto;
  }

  .site-nav {
    justify-content: center;
    row-gap: 0;
  }

  .site-nav a {
    font-size: 0.8rem;
    padding: 0.25rem 0.45rem;
  }
}

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

  .gallery-item,
  .btn {
    transition: none;
  }

  .gallery-item:hover,
  .btn:hover,
  .btn:focus-visible {
    transform: none;
  }
}

/* Join us CTA
   ------------------------------------------------------------ */
#join {
  background: #e9fbe9;
  background: color-mix(in srgb, var(--mint) 38%, var(--paper));
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 2rem 1.5rem;
  min-width: 0;
}

.join-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.75rem 2rem;
  align-items: center;
}

.join-photo {
  margin: 0;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.join-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 680 / 871;
  object-fit: cover;
}

.join-copy .lead {
  margin-bottom: 1.15rem;
}

.join-steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.35rem;
  margin: 0 0 1.35rem;
  padding: 0;
}

.join-steps li {
  background: var(--mint);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.5rem 1.05rem;
  font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  letter-spacing: -0.01em;
  position: relative;
}

.join-steps li:not(:last-child) {
  margin-right: 1.2rem;
}

.join-steps li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}

@media (max-width: 800px) {
  .join-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  #join {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1.25rem 0.9rem 1.35rem;
  }

  .join-steps {
    flex-direction: column;
    align-items: stretch;
    gap: 1.15rem;
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
  }

  .join-steps li {
    margin-right: 0;
    text-align: center;
    font-size: 1rem;
    padding: 0.5rem 0.9rem;
  }

  .join-steps li:not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1.05rem;
    transform: translateX(-50%);
    font-size: 1.05rem;
  }
}

.join-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
  min-width: 0;
}

.join-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.85rem 0.7rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  min-width: 0;
  overflow: hidden;
}

.join-qr {
  width: 100%;
  max-width: 9.25rem;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  image-rendering: pixelated;
}

.join-qr.is-missing {
  display: none;
}

.join-card .btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.88rem;
  min-height: 2.6rem;
  padding: 0.45rem 0.65rem;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: break-word;
  hyphens: manual;
}

.join-card-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 800px) {
  .join-actions {
    grid-template-columns: 1fr;
    max-width: 20rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}
