/* Shared styles for the marketing site (landing.html, contact.html).
   Not used by the crossword player bundle or the admin.

   The first five tokens are the brand palette — keep them in sync with the
   `p4n` Customer's branding colors so the live demo matches the page.
   The tile colors are the playful accents used for cards/sections. */
:root {
  --c-black: #041f1e;
  --c-brown: #c57b57;
  --c-taupe: #1e2d2f;
  --c-cream: #f1ab86;
  --c-white: #ffffed;

  --ink: var(--c-black);
  --paper: var(--c-white);
  --muted: #3d5153;

  --tile-yellow: #ffca57;
  --tile-mint: #cbdc58;
  --tile-sky: #8dd1ec;
  --tile-lilac: #cdb8ff;
  --tile-peach: var(--c-cream);

  /* Main accent: primary buttons. Text on it is ink, not white (white on
     peach is unreadable), and it's never used as a text color. */
  --primary: var(--tile-peach);
  --primary-hover: #ea9a70;

  /* Faint crossword grid with the odd black square: the page background.
     Tiles that want it (the closing CTA) let it show through with a
     multiply tint rather than repeating it, so the grid stays aligned. */
  --grid-pattern:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23041f1e' fill-opacity='0.045'%3E%3Crect x='40' y='80' width='40' height='40'/%3E%3Crect x='160' y='200' width='40' height='40'/%3E%3Crect x='200' y='40' width='40' height='40'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(rgba(4, 31, 30, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4, 31, 30, 0.06) 1px, transparent 1px);
  --grid-size: 240px 240px, 40px 40px, 40px 40px;

  --line: 2.5px solid var(--ink);
  --radius: 14px;

  --font-display: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-body: var(--font-display);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--grid-pattern);
  background-size: var(--grid-size);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 700px) {
  .wrap {
    padding: 0 28px;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: var(--line);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--ink);
}

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

.btn-sm {
  font-size: 0.9rem;
  padding: 0.6rem 0.95rem;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin-top: 12px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.5rem 0.45rem 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
}

/* 5x5 mini crossword whose black squares spell an N */
.logo-mark {
  display: grid;
  grid-template-columns: repeat(5, 6px);
  gap: 1px;
  /* light grid lines so the ink squares read as an N, not part of the frame */
  background: #a9b3b2;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  overflow: hidden;
  transform: rotate(-6deg);
}

.logo-mark i {
  width: 6px;
  height: 6px;
  background: var(--paper);
}

.logo-mark i.b {
  background: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:not(.btn) {
  text-decoration: none;
}

.nav-links a:not(.btn):hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.short-only {
  display: none;
}

@media (max-width: 760px) {
  .short-only {
    display: inline;
  }

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

  .logo-text-long {
    display: none;
  }
}

/* ---------- Tiles (Inkwell-ish cards) ---------- */

.tile {
  border: var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */

.footer {
  padding: 2.5rem 0 3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 2px dashed rgba(4, 31, 30, 0.25);
  padding-top: 1.5rem;
}

.footer a {
  font-weight: 600;
}

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

  .btn,
  .btn:active {
    transition: none;
    transform: none;
  }
}
