/* Black Mile Studios: colors pulled from the logo (ink navy, teal, aged paper) */
:root {
  --paper: #eee2c4;
  --paper-deep: #e3d3ab;
  --paper-light: #f6eedb;
  --ink: #1d3a4d;
  --ink-soft: #3c5566;
  --teal: #3b8890;
  --teal-dark: #2b6c74;
  --rule: rgba(29, 58, 77, 0.22);
  --max: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  font-family: "Lora", Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The logo's own paper (logo removed with Content-Aware Fill), pinned behind the page.
   A fixed pseudo-element instead of background-attachment: fixed, which iOS Safari ignores. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--paper) url("images/paper.webp") center / cover no-repeat;
}

/* Fine paper grain drawn by the browser, crisp at any size, over the softer paper photo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .26 0 0 0 0 .16 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

h1, h2, h3, .brand, .eyebrow, .button {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
h3 { font-size: 1.3rem; font-weight: 700; }

a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.95rem; }
.brand img { height: 36px; width: auto; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { font-family: "Montserrat", sans-serif; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--teal-dark); }

/* Hero: the transparent logo sits right on the paper */
.hero { text-align: center; padding: 20px 0 36px; }
.hero-logo {
  width: min(380px, 80%);
  height: auto;
  display: block;
  margin: 0 auto 20px;
}
.tagline { font-size: clamp(1.3rem, 3vw, 1.65rem); font-style: italic; color: var(--ink-soft); max-width: 34ch; margin: 0 auto; }

/* Sections */
section { padding: 56px 0; }
.eyebrow { display: block; color: var(--teal); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 8px; }
.ink-rule { border: 0; height: 3px; margin: 0 auto; max-width: var(--max); background: linear-gradient(90deg, transparent, var(--rule) 15%, var(--rule) 85%, transparent); }

/* App cards */
.apps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); margin-top: 28px; }
.app-card {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 24px;
  background: rgba(246, 238, 219, 0.65);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 8px 24px -16px rgba(29, 58, 77, 0.45);
}
.app-card img { width: 88px; height: 88px; border-radius: 20px; flex-shrink: 0; box-shadow: 0 4px 12px -6px rgba(29, 58, 77, 0.5); }
.app-card h3 { margin-bottom: 4px; }
.app-card p { margin: 0 0 14px; font-size: 1rem; color: var(--ink-soft); }
.app-meta { font-family: "Montserrat", sans-serif; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px !important; }
.more-apps { margin: 24px 0 0; font-style: italic; color: var(--ink-soft); }
.links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.95rem; }

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-light);
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
}
.button:hover { background: var(--teal-dark); color: var(--paper-light); }

.prose { max-width: 680px; }
.prose p { margin: 0 0 1em; }

/* Footer */
.site-footer { padding: 40px 0 48px; font-size: 0.9rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }

/* Legal pages */
.legal { padding-top: 24px; }
.legal h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
.legal h2 { font-size: 1.2rem; text-transform: none; letter-spacing: 0; margin-top: 1.6em; }
.updated { color: var(--ink-soft); font-style: italic; }

@media (max-width: 560px) {
  .hero-logo { width: 86%; }
  body { font-size: 17px; }
  .site-header .wrap { justify-content: center; }
  .app-card { flex-direction: column; }
  .site-footer .wrap { flex-direction: column; align-items: center; text-align: center; }
}
