/* Photo2Plan blog.
   The colours, fonts and logo below are taken from the live site's own computed styles
   (oklch tokens on :root, Inter/Space Grotesk, /assets/photo2plan-logo.png) so the blog
   reads as the same site rather than as the old Webflow export it used to inherit. */

:root {
  --bg:        oklch(13% 0.005 285);
  --surface:   oklch(18% 0.005 285);
  --surface-2: oklch(22% 0.005 285);
  --fg:        oklch(95% 0.005 90);
  --muted:     oklch(65% 0.01 285);
  --brand:     oklch(75% 0.18 55);
  --brand-dim: oklch(65% 0.20 55);
  --border:    oklch(100% 0 0 / 0.10);
  --border-2:  oklch(100% 0 0 / 0.16);
  --radius:    0.75rem;
  --display:   "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body:      Inter, ui-sans-serif, system-ui, sans-serif;
  --wrap:      1180px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

:where(a, button):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.p2p-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---------- header ---------- */

.p2p-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(13% 0.005 285 / 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.p2p-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.p2p-brand img { height: 42px; width: auto; }

.p2p-nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.p2p-nav-links a {
  padding: 0.5rem 0.7rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: oklch(95% 0.005 90 / 0.7);
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
  white-space: nowrap;
}

.p2p-nav-links a:hover { color: var(--brand); background: oklch(100% 0 0 / 0.05); }
.p2p-nav-links a[aria-current="page"] { color: var(--brand); }

.p2p-cta {
  flex: none;
  padding: 0.6rem 1.15rem;
  border-radius: 0.6rem;
  background: var(--brand);
  color: oklch(18% 0.04 55);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s;
}

.p2p-cta:hover { background: var(--brand-dim); }

@media (max-width: 1080px) {
  .p2p-nav-inner { flex-wrap: wrap; min-height: 0; padding-block: 0.6rem; row-gap: 0.4rem; }
  .p2p-nav-links {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .p2p-nav-links::-webkit-scrollbar { display: none; }
  .p2p-nav-links a { padding-inline: 0.55rem; }
}

/* ---------- magazine ---------- */

.p2p-main { min-height: 60vh; }

.mag {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 3.5rem 16px 5rem;
}

.mag-masthead {
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 1.6rem;
  margin-bottom: 3rem;
}

.mag-masthead h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0.35rem 0 0;
}

.mag-masthead > p:last-child { color: var(--muted); margin: 0.7rem 0 0; max-width: 54ch; }

.mag-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.mag-meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.mag-cover {
  position: relative;
  /* The covers are published at 1536x1024 - exactly 3:2 - and carry a headline
     inside the picture, so the frame takes that shape and cuts nothing off. */
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

/* Fitted, not cropped: a cover of any other shape is shown whole against the
   surface rather than having its edges removed. */
.mag-cover img { width: 100%; height: 100%; margin: 0; object-fit: contain; }

.mag-lead {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}

.mag-lead a { text-decoration: none; display: block; }

.mag-lead h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0.6rem 0 0.8rem;
}

.mag-lead p:not(.mag-meta) { color: var(--muted); margin: 0 0 1.1rem; font-size: 1.02rem; }
.mag-lead .mag-meta:last-child { color: var(--brand); }
.mag-lead .mag-cover { transition: transform 0.3s ease; }
.mag-lead a:hover .mag-cover { transform: translateY(-4px); }
.mag-lead a:hover h2 { color: var(--brand); }

@media (max-width: 820px) {
  .mag-lead { grid-template-columns: 1fr; gap: 1.4rem; }
}

.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem 1.8rem;
}

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

.mag-card a { text-decoration: none; display: block; }

.mag-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0.3rem 0 0.5rem;
}

.mag-card p:not(.mag-meta) { color: var(--muted); margin: 0; font-size: 0.95rem; }
.mag-card .mag-cover { transition: transform 0.3s ease; }
.mag-card a:hover .mag-cover { transform: translateY(-4px); }
.mag-card a:hover h3 { color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  .mag-lead .mag-cover, .mag-card .mag-cover { transition: none; }
  .mag-lead a:hover .mag-cover, .mag-card a:hover .mag-cover { transform: none; }
}

/* Generated cover art, used when a post has no image of its own. */
.cv0 { background: linear-gradient(135deg, oklch(22% 0.03 285), oklch(38% 0.12 55)); }
.cv1 { background: linear-gradient(160deg, oklch(18% 0.01 285), oklch(45% 0.15 45)); }
.cv2 { background: linear-gradient(120deg, oklch(26% 0.05 265), oklch(40% 0.13 60)); }
.cv3 { background: linear-gradient(200deg, oklch(20% 0.02 285), oklch(42% 0.14 35)); }
.cv4 { background: linear-gradient(145deg, oklch(24% 0.04 300), oklch(36% 0.11 55)); }
.cv5 { background: linear-gradient(175deg, oklch(17% 0.01 285), oklch(48% 0.16 50)); }

/* ---------- article ---------- */

.mag-article { max-width: 760px; margin-inline: auto; }
/* Was 21/9, which removed about a third of every picture's height. */
.mag-article .mag-cover { margin-bottom: 2.2rem; aspect-ratio: 3 / 2; }
.mag-article .mag-kicker { margin-bottom: 0.6rem; }

.mag-article h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.07;
  letter-spacing: -0.03em;
  margin: 0 0 0.7rem;
}

.mag-standfirst { color: var(--muted); font-size: 1.14rem; line-height: 1.6; margin: 0 0 1.6rem; }

.mag-byline {
  margin: 0 0 2.4rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.mag-body { font-size: 1.07rem; line-height: 1.78; }
.mag-body > *:first-child { margin-top: 0; }

.mag-body h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 2.8rem 0 0.9rem;
}

.mag-body h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 2.2rem 0 0.7rem;
}

.mag-body p { margin: 0 0 1.35rem; }
.mag-body ul, .mag-body ol { margin: 0 0 1.35rem; padding-left: 1.3rem; }
.mag-body li { margin-bottom: 0.55rem; }
.mag-body li::marker { color: var(--brand); }
.mag-body strong { color: var(--fg); font-weight: 650; }
.mag-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.mag-body img { border-radius: var(--radius); border: 1px solid var(--border); margin: 2rem 0; }
.mag-body hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

.mag-body blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 3px solid var(--brand);
  color: var(--muted);
  font-size: 1.1rem;
}

.mag-body code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.12em 0.38em;
  font-size: 0.9em;
}

.mag-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  margin: 0 0 1.6rem;
}

.mag-body pre code { background: none; border: 0; padding: 0; }

.mag-body em { color: var(--muted); }

.mag-back {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
}

.mag-back:hover { text-decoration: underline; }

/* ---------- footer ---------- */

.p2p-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, transparent, oklch(10% 0.005 285));
  padding: 4rem 0 2.5rem;
  margin-top: 4rem;
}

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

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

.p2p-footer-brand img { height: 52px; width: auto; margin-bottom: 1rem; }

.p2p-footer-brand p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: oklch(95% 0.005 90 / 0.45);
  max-width: 30ch;
  margin: 0;
}

.p2p-footer h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 1rem;
}

.p2p-footer ul { list-style: none; margin: 0; padding: 0; }
.p2p-footer li { margin-bottom: 0.75rem; }

.p2p-footer li a {
  font-size: 0.875rem;
  color: oklch(95% 0.005 90 / 0.45);
  text-decoration: none;
  transition: color 0.15s;
}

.p2p-footer li a:hover { color: var(--brand); }

.p2p-footer-bottom {
  margin: 3.5rem 0 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: oklch(95% 0.005 90 / 0.4);
}
