/* ==========================================================
   Climate& — site styles

   ACCENT COLOUR: edit --accent below.
     Bright pastel pink (current): #ff9ec4
     Softer pink (previous):       #f7b8cc
     Aqua alternative:             #8de3df
     Orange alternative:           #ffb36b

   FONTS (two, alternated on purpose):
     --font-tag  = light italic sans, used for taglines
     --font-head = serif, used for card titles, project titles, mission
   To change one, edit its line below AND the Google Fonts <link>
   at the top of each page.
   ========================================================== */

:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --surface: #141414;
  --line: #2a2a2a;
  --text: #f4f4f4;
  --soft: #d6d6d6;
  --muted: #b3b3b3;
  --accent: #ff9ec4;
  --ink: #0b0b0b;               /* dark text used on top of pink */
  --max: 1200px;
  --gutter: 40px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-tag: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Newsreader", "Charter", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* One container for every page, so margins are always the same */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
header.site { border-bottom: 1px solid var(--line); }
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.65rem;
}
.brand img { width: 44px; height: 44px; display: block; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 26px; }
nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav a:not(.btn):hover,
nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--accent); color: var(--ink); }
.btn-sm { padding: 6px 16px; font-size: .95rem; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 .6em; }
h3 { font-size: 1.45rem; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

/* Small pink labels: About, Vision, Mission... */
.eyebrow {
  font-family: var(--font-body);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 1em;
}

/* Tagline: light italic sans, quiet so the content below leads */
.tagline {
  font-family: var(--font-tag);
  font-style: italic;
  font-weight: 300;
  color: var(--soft);
  font-size: clamp(1.2rem, 2.3vw, 1.6rem);
  line-height: 1.35;
  margin: 0 0 .7em;
  letter-spacing: .005em;
}
/* The overall tagline sits at the top of every page, under the menu */
.tagline-bar { padding-top: 30px; padding-bottom: 26px; }
.tagline-bar .tagline { margin: 0; }

/* Mission statement: the main thing the eye should land on */
.statement {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  line-height: 1.4;
  color: var(--text);
  margin: 0;
}

.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 1em; }
.tags { color: var(--accent); font-size: .85rem; letter-spacing: .03em; margin-bottom: .6em; }
.muted { color: var(--muted); }
.hl { color: var(--accent); font-weight: 700; }

/* ---------- Sections ---------- */
.page-head { padding: 28px 0 40px; }
.page-head .tagline { margin-bottom: .6em; }
section.block { padding: 56px 0; border-top: 1px solid var(--line); }

/* ---------- Cards ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  padding: 26px;
  transition: background .2s, border-color .2s;
}
.card p { color: var(--soft); }
.card .examples {
  color: var(--muted);
  font-size: .97rem;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 14px 0 0;
  text-transform: lowercase;
}
.callout {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin-top: 32px;
  color: var(--muted);
}
.callout strong { color: var(--text); }

/* Home page service tiles: sentence first, products on hover (pink tile) */
.flip { cursor: default; }
.flip:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.flip .faces { display: grid; }
.flip .face { grid-area: 1 / 1; transition: opacity .2s; }
.flip .face p { margin: 0 0 .8em; }
.flip .back { opacity: 0; }
.flip .back p { text-transform: lowercase; font-size: 1.05rem; color: var(--ink); }
.flip .hint {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.flip:focus-within { background: var(--accent); border-color: var(--accent); }
.flip:focus-within h3, .flip:focus-within .front p { color: var(--ink); }
.flip:focus-within .front { opacity: 0; }
.flip:focus-within .back { opacity: 1; }
@media (hover: hover) {
  .flip:hover { background: var(--accent); border-color: var(--accent); }
  .flip:hover h3, .flip:hover .front p { color: var(--ink); }
  .flip:hover .front { opacity: 0; }
  .flip:hover .back { opacity: 1; }
}
/* Touch screens can't hover, so show both lines at once */
@media (hover: none) {
  .flip .faces { display: block; }
  .flip .back { opacity: 1; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .flip .back p { color: var(--muted); }
  .flip .hint { display: none; }
  .flip:focus-within { background: var(--surface); border-color: var(--line); border-top-color: var(--accent); }
  .flip:focus-within h3 { color: var(--text); }
  .flip:focus-within .front p { color: var(--soft); }
  .flip:focus-within .front { opacity: 1; }
}

/* ---------- Images ---------- */
.media {
  position: relative;
  background: #161616;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  margin: 0;
}
/* Label shown only while an image file is missing */
.media::after {
  content: attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #666;
  font-size: .85rem;
}
.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ---------- Home project tiles: pink titles, whole tile turns pink on hover ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 0;
  margin: 24px -12px 28px;   /* negative side margin keeps the images lined up with the page edge */
}
@media (max-width: 1000px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .project-grid { grid-template-columns: 1fr; } }
.project-card {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 12px 12px 14px;
  border-radius: 14px;
  transition: background .2s;
}
.project-card h3 { margin-top: 14px; font-size: 1.3rem; color: var(--accent); transition: color .2s; }
.project-card p { color: var(--muted); font-size: .95rem; transition: color .2s; }
.project-card .tags { margin: 12px 0 .4em; font-size: .78rem; }
.project-card .read-on { color: var(--accent); font-weight: 600; margin-top: -.2em; }
.project-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* On hover the photo fades from black & white to colour (if a -colour.jpg exists) */
.project-card .media img.colour { opacity: 0; transition: opacity .35s; z-index: 2; }
@media (hover: hover) {
  .project-card:hover .media img.colour,
  .project-card:focus-visible .media img.colour { opacity: 1; }
  .project-card:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
}

/* ---------- Projects page ---------- */
/* Strip of thumbnails at the top that jumps to each project below */
.jump {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0 -8px;
  padding-bottom: 40px;
  scroll-margin-top: 16px;
}
.jump a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
  padding: 8px 8px 12px;
  border-radius: 12px;
  transition: background .2s, color .2s;
}
.jump a span { display: block; margin-top: 8px; }
.jump a:focus-visible { background: var(--accent); color: var(--ink); outline: none; }
@media (hover: hover) {
  .jump a:hover { background: var(--accent); color: var(--ink); }
}

/* Each project: image on the left, full text on the right, one after another */
.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 8px;
}
.project .media { aspect-ratio: 4 / 3; position: sticky; top: 24px; }
.project h2 { margin: 0 0 .5em; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.project p a { text-underline-offset: 3px; }
.project p a:hover { color: var(--text); }
.back { display: inline-block; margin-top: .4em; font-size: .9rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
@media (max-width: 820px) {
  .jump { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; }
  .jump a { flex: 0 0 200px; scroll-snap-align: start; }
  .project { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; }
  .project .media { position: relative; top: auto; }
}

/* ---------- About page ---------- */
.about-kate {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.about-kate .media { aspect-ratio: 3 / 4; }
@media (max-width: 760px) {
  .about-kate { grid-template-columns: 1fr; gap: 24px; }
  .about-kate .media { max-width: 220px; }
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
}
.page-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 0 0 .5em; }
.form { display: grid; gap: 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
}
.field textarea { min-height: 200px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
/* Stop the browser's autofill turning the boxes white (two rules: browsers differ) */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px var(--surface) inset;
  transition: background-color 9999s ease-out 0s;
}
.field input:autofill {
  color: var(--text);
  box-shadow: 0 0 0 1000px var(--surface) inset;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.form-status { margin: 0; color: var(--muted); }
.form-status.ok { color: var(--accent); }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .form .row { grid-template-columns: 1fr; }
}

/* ---------- CTA ---------- */
.cta p { color: var(--muted); }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .95rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .tagline-bar { padding-top: 22px; padding-bottom: 18px; }
  .page-head { padding: 20px 0 24px; }
  section.block { padding: 44px 0; }
}
