/* jack.ridder.nz - one small stylesheet for the whole site.
   Editorial, light, green accent tying back to KiwiBudget without being a
   corporate page. System-adjacent fonts loaded from Google to match the
   KiwiBudget brand (Manrope headings, Inter body). */

:root {
  --ink: #131720;
  --muted: #66708a;
  --faint: #9aa3b5;
  --green: #167A34;
  --green-bright: #22A845;
  --bg: #f9fafb;
  --card: #ffffff;
  --border: #e5e9ef;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(22, 122, 52, 0.07), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(140, 198, 62, 0.08), transparent 28%),
    var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: 'Manrope', 'Inter', sans-serif; letter-spacing: -0.03em; line-height: 1.15; }

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

header { padding: 28px 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* multiply blends the logo's white background into the page, so the
   signature sits directly on the tinted backdrop without a white box. */
.brand img { height: 32px; width: auto; mix-blend-mode: multiply; }
nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  margin-left: 22px;
}
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
nav a[aria-current="page"] { font-weight: 700; }

/* ---- Homepage hero banner: photo background + dark overlay + grain ---- */

.hero-banner {
  position: relative;
  overflow: hidden;
  /* Full viewport: the photo IS the first screen; content starts on scroll. */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: #10201a; /* fallback tone before the image loads */
}
/* The photo lives on its own layer so it can drift (Ken Burns) without
   moving the content. Slightly oversized so the drift never shows edges. */
.hero-bg {
  position: absolute; inset: -4%;
  background-image: url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center 30%;
  animation: kenburns 32s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.1) translate(-1.2%, -1.2%); }
}
/* Dark overlay + vignette so white text reads anywhere over sky and sand. */
.hero-banner::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.78) 100%);
}
/* Film grain: an SVG noise tile, faint, jittered by animation so it feels
   alive without drawing attention to itself. */
.hero-banner::after {
  content: "";
  position: absolute; inset: -80px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-24px, 12px); }
  30% { transform: translate(18px, -20px); }
  50% { transform: translate(-12px, 24px); }
  70% { transform: translate(26px, 8px); }
  90% { transform: translate(-20px, -14px); }
}
/* A few soft motes drifting upward, like dust in the light. */
.mote {
  position: absolute;
  bottom: -12px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  filter: blur(1.5px);
  animation: floatUp linear infinite;
  pointer-events: none;
  z-index: 1;
}
.mote:nth-child(2) { left: 12%; animation-duration: 16s; }
.mote:nth-child(3) { left: 24%; width: 3px; height: 3px; animation-duration: 23s; animation-delay: -8s; }
.mote:nth-child(4) { left: 38%; width: 6px; height: 6px; animation-duration: 27s; animation-delay: -18s; }
.mote:nth-child(5) { left: 52%; animation-duration: 19s; animation-delay: -4s; }
.mote:nth-child(6) { left: 64%; width: 3px; height: 3px; animation-duration: 21s; animation-delay: -12s; }
.mote:nth-child(7) { left: 76%; width: 4px; height: 4px; animation-duration: 25s; animation-delay: -14s; }
.mote:nth-child(8) { left: 87%; width: 3px; height: 3px; animation-duration: 18s; animation-delay: -10s; }
.mote:nth-child(9) { left: 95%; width: 4px; height: 4px; animation-duration: 24s; animation-delay: -6s; }
@keyframes floatUp {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 0.7; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

/* Content entrance: name, kicker, buttons rise in one after another. */
.hero-inner h1, .hero-inner .kicker, .hero-inner .buttons {
  opacity: 0;
  animation: riseIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-inner .kicker { animation-delay: 0.25s; }
.hero-inner .buttons { animation-delay: 0.5s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bouncing scroll cue at the bottom of the banner. */
.scroll-cue {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  animation: cueBounce 2.2s ease-in-out infinite;
}
.scroll-cue:hover { color: #fff; }
@keyframes cueBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 9px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-banner::after, .mote, .hero-bg, .scroll-cue { animation: none; }
  .hero-inner h1, .hero-inner .kicker, .hero-inner .buttons { opacity: 1; animation: none; }
}

/* Header + hero content sitting over the photo go white. */
.hero-banner header, .hero-banner .hero-inner { position: relative; z-index: 2; }
/* Over the photo: invert turns the black ink white (and the white tile
   black), then screen-blending discards the black, leaving just the white
   signature floating on the image. */
.hero-banner .brand img { filter: invert(1); mix-blend-mode: screen; }
.hero-banner nav a { color: rgba(255,255,255,0.75); }
.hero-banner nav a:hover, .hero-banner nav a[aria-current="page"] { color: #fff; }
/* Fills the rest of the viewport below the header; content sits centred,
   nudged slightly up so it does not fight the scroll cue. */
.hero-inner {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 40px 0 80px;
}
.hero-inner .wrap { width: 100%; }
.hero-inner h1 { color: #fff; font-size: 58px; font-weight: 800; text-shadow: 0 2px 22px rgba(0,0,0,0.45); }
.hero-inner .kicker { color: rgba(255,255,255,0.85); }
.hero-inner .kicker::before { background: var(--green-bright); }
.hero-inner .buttons { margin-top: 30px; }
.hero-inner .btn.ghost {
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.35); backdrop-filter: blur(4px);
}
@media (max-width: 560px) {
  .hero-inner h1 { font-size: 40px; }
}

main { flex: 1; padding: 40px 0 72px; }

.hero { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.hero img {
  width: 168px; height: 216px; object-fit: cover; border-radius: 20px;
  box-shadow: 0 18px 45px rgba(19, 23, 32, 0.12);
}
.hero h1 { font-size: 44px; font-weight: 800; }
.kicker {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 15px; margin-top: 10px;
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--green-bright); }

.prose { margin-top: 34px; font-size: 17px; color: #3d4658; }
.prose p + p { margin-top: 18px; }
.prose a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

.buttons { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: 999px;
}
.btn.primary {
  color: #fff; background: linear-gradient(135deg, var(--green), var(--green-bright));
  box-shadow: 0 14px 32px rgba(22, 122, 52, 0.25);
}
.btn.ghost { color: var(--ink); background: var(--card); border: 1px solid var(--border); }
.btn:hover { filter: brightness(0.97); }

.page-title { font-size: 36px; font-weight: 800; }
.page-sub { color: var(--muted); margin-top: 10px; font-size: 16px; }

.news-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px 28px; margin-top: 22px;
}
.news-item time { color: var(--faint); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.news-item h2 { font-size: 21px; margin-top: 6px; }
.news-item p { color: #3d4658; margin-top: 10px; font-size: 15.5px; }
.news-item a { color: var(--green); }

.contact-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px 28px; margin-top: 22px;
}
.contact-card h2 { font-size: 17px; }
.contact-card p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.contact-card a { color: var(--green); font-weight: 600; text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

/* ---- Homepage sections ---- */

/* Sections carry their own rhythm; the shared main padding is for the
   simpler news/contact pages. */
main#about { padding: 0; }
.section { padding: 72px 0; }
.section-alt { background: #f0f4f1; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-eyebrow {
  display: flex; align-items: center; gap: 10px;
  color: var(--green); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 22px;
}
.section-eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--green-bright); }
.section h2 { font-size: 32px; font-weight: 800; }
.section-sub { color: var(--muted); margin-top: 8px; }
.section .prose { margin-top: 18px; font-size: 16.5px; }
.section .buttons { margin-top: 26px; }
.section-more { margin-top: 26px; }
.section-more a { color: var(--green); font-weight: 700; text-decoration: none; }
.section-more a:hover { text-decoration: underline; }

.about-grid { display: flex; gap: 36px; align-items: flex-start; flex-wrap: wrap; }
.about-photo {
  width: 200px; height: 256px; object-fit: cover; border-radius: 20px;
  box-shadow: 0 18px 45px rgba(19, 23, 32, 0.14); flex-shrink: 0;
}
.about-grid > div { flex: 1; min-width: 280px; }
.facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.facts span {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted);
}

.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 40px 42px; box-shadow: 0 14px 40px rgba(19, 23, 32, 0.06);
}
.project-logo { height: 44px; width: auto; margin-bottom: 20px; }
@media (max-width: 560px) { .project-card { padding: 28px 24px; } }

.writing-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
@media (max-width: 720px) { .writing-list { grid-template-columns: 1fr; } }
.writing-item {
  display: block; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; transition: border-color 0.2s, transform 0.2s;
}
.writing-item:hover { border-color: var(--green-bright); transform: translateY(-2px); }
.writing-item h3 { font-size: 17px; color: var(--ink); }
.writing-item p { color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.55; }

.cta-band {
  background: linear-gradient(140deg, #0B1F12 0%, #123A20 55%, #167A34 140%);
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; font-size: 32px; font-weight: 800; }
.cta-band p { color: rgba(255, 255, 255, 0.75); margin-top: 12px; }
.cta-band p a { color: #8CC63E; }
.cta-band .buttons { margin-top: 28px; justify-content: center; }
.btn.light { background: #fff; color: #14532D; }
.btn.outline-light { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn.outline-light:hover { background: rgba(255, 255, 255, 0.1); }

.section-title { font-size: 24px; font-weight: 800; margin-top: 56px; }
.gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px;
}
.gallery figure {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden;
}
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.gallery figcaption { padding: 10px 14px; font-size: 13px; color: var(--muted); }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

footer { border-top: 1px solid var(--border); padding: 26px 0 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer p, footer a { color: var(--faint); font-size: 13px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--muted); }

@media (max-width: 560px) {
  .hero h1 { font-size: 34px; }
  .hero img { width: 128px; height: 164px; }
}
