/* Carl Navè | Selected Work
   Layout concept: a one-colour printed monograph. Navy ink on white paper,
   full-colour project imagery, a serif voice for ideas and a sans for facts. */

:root {
  /* Colour */
  --paper: #FAFAF8;      /* page */
  --ink: #13263A;        /* navy ink, carried over from the Selected Work PDF */
  --ink-soft: #5A6779;   /* secondary text */
  --rule: #D8DDE3;       /* hairlines */
  --tint: #ECEFF2;       /* image placeholders */
  --night: #050505;      /* black panels for brand marks */

  /* Type */
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* Scale (1.25 ratio, rounded) */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-body: 1.1875rem;
  --t-lg: 1.5rem;
  --t-xl: clamp(1.75rem, 3vw, 2.25rem);
  --t-display: clamp(2.5rem, 6vw, 5rem);
  --t-title: clamp(3rem, 9vw, 7.5rem);

  /* Space */
  --gutter: clamp(20px, 5vw, 72px);
  --section: clamp(4.5rem, 10vw, 9rem);
  --max: 1360px;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1rem; font-family: var(--sans); font-size: var(--t-sm);
}
.skip:focus { left: max(var(--gutter), env(safe-area-inset-left, 0px)); }

/* Page frame */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Header */
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding-block: 1.75rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.7rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.site-nav a {
  font-family: var(--sans);
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--ink-soft);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Shared type */
.sans { font-family: var(--sans); }
.meta-label {
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
h1, h2, h3 { font-weight: 300; text-wrap: balance; margin: 0; }

/* Home: opening statement */
.intro { padding-block: clamp(3rem, 9vw, 8rem) var(--section); }
.intro h1 {
  font-size: var(--t-display);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 21ch;
}
.intro-foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.intro-foot .positioning { grid-column: 1 / span 4; }
.intro-foot p.lede {
  grid-column: 6 / span 7;
  margin: 0;
  max-width: 34em;
}

/* Home: work index */
.work-index { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--section); padding-bottom: var(--section); }
.work-index > h2 { position: absolute; left: -9999px; }

.project a { text-decoration: none; display: block; }
.project-media { display: grid; gap: clamp(8px, 1.2vw, 16px); }
.project-media.pair { grid-template-columns: 1fr 1fr; }
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-media .tall { aspect-ratio: 4 / 5; }

.project-caption {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: baseline;
}
.project-caption h3 {
  grid-column: 1 / span 4;
  font-size: var(--t-xl);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.project-caption .summary {
  grid-column: 6 / span 5;
  margin: 0;
  color: var(--ink);
}
.project-caption .sector {
  grid-column: 11 / span 2;
  text-align: right;
}
.project a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }

/* Placeholders for imagery still to be supplied */
.placeholder {
  background: var(--tint);
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 1.5rem;
  text-align: center;
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--ink-soft);
}
.placeholder.tall { aspect-ratio: 4 / 5; }
.placeholder.square { aspect-ratio: 1 / 1; }

/* Footer and contact */
.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: clamp(3rem, 7vw, 6rem) 2.5rem;
}
.contact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
}
.contact h2 {
  grid-column: 1 / span 5;
  font-size: var(--t-xl);
  line-height: 1.15;
}
.contact ul {
  grid-column: 7 / span 6;
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
}
.contact li { display: grid; gap: 0.15rem; }
.contact a { font-size: var(--t-lg); }
.colophon {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  margin-top: clamp(3rem, 7vw, 6rem);
}

/* Case study */
.draft-note {
  font-family: var(--sans);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  background: var(--tint);
  padding: 0.6rem 0.9rem;
  margin-top: 0.5rem;
}

.cs-head { padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem); }
.cs-back { font-family: var(--sans); font-size: var(--t-sm); color: var(--ink-soft); text-decoration: none; }
.cs-back:hover { color: var(--ink); text-decoration: underline; }
.cs-head h1 {
  font-size: var(--t-title);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-top: clamp(1.5rem, 4vw, 3rem);
}
.cs-head .thesis {
  font-size: var(--t-lg);
  line-height: 1.35;
  max-width: 30ch;
  margin: 1.5rem 0 0;
  color: var(--ink);
}

.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding-block: 1.25rem;
  border-block: 1px solid var(--rule);
}
.cs-meta div { min-width: 0; }
.cs-meta dt { font-family: var(--sans); font-size: var(--t-xs); color: var(--ink-soft); }
.cs-meta dd { margin: 0.35rem 0 0; font-family: var(--sans); font-size: var(--t-sm); line-height: 1.45; }

.cs-figure { margin: clamp(2.5rem, 6vw, 5rem) 0; }
.cs-figure figcaption { margin-top: 0.75rem; }

/* Image shapes. Images placed side by side always share one shape,
   so they render at exactly the same size. */
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.2vw, 16px); }
.fig-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 1vw, 12px); }
.fig-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fig-pair img, .fig-tiles img, .fig-single img { width: 100%; height: auto; object-fit: cover; }
.shape-tall img { aspect-ratio: 4 / 5; }
.shape-wide img { aspect-ratio: 3 / 2; }
.shape-square img { aspect-ratio: 1 / 1; }
.shape-pano img { aspect-ratio: 2 / 1; }
.shape-tile img { aspect-ratio: 2 / 3; }

/* A printed piece shown on a field of its own colour */
.panel {
  aspect-ratio: 3 / 2;
  display: grid; place-items: center;
  padding: 6%;
}
.panel img { height: 100%; width: auto; max-width: 100%; object-fit: contain; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28); }
.panel-rte { background: #8DA3A3; }

.cs-chapter {
  margin-top: clamp(3rem, 7vw, 6rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
}
.cs-chapter .meta-label { grid-column: 1 / span 3; padding-top: 0.6rem; }
.cs-chapter h2 {
  grid-column: 5 / span 8;
  font-size: var(--t-xl);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.cs-section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  padding-block: clamp(2rem, 4vw, 3rem);
}
.cs-section > h2 {
  grid-column: 1 / span 3;
  font-family: var(--sans);
  font-size: var(--t-sm);
  font-weight: 500;
  padding-top: 0.35rem;
}
.cs-section .body { grid-column: 5 / span 7; min-width: 0; }
.cs-section .body p { margin: 0 0 1em; max-width: 34em; }
.cs-section .body p:last-child { margin-bottom: 0; }

.role-list {
  list-style: none; margin: 1.5rem 0 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.role-list li {
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: var(--t-sm);
}
.credit { margin-top: 1.25rem; }

.markets {
  list-style: none; margin: 0 0 2rem; padding: 0;
  font-size: var(--t-xl);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.cs-next {
  border-top: 1px solid var(--rule);
  margin-top: var(--section);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.cs-next a { text-decoration: none; display: inline-block; }
.cs-next .next-name {
  display: block;
  font-size: var(--t-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}
.cs-next a:hover .next-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }

/* About */
.about { padding-block: clamp(3rem, 8vw, 7rem) var(--section); }
.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; }
.about-grid .portrait { grid-column: 1 / span 4; }
.about-grid .bio { grid-column: 6 / span 6; min-width: 0; }
.about-grid h1 { font-size: var(--t-xl); line-height: 1.15; margin-bottom: 1.5rem; }
.about-grid .bio p { margin: 0 0 1em; max-width: 34em; }

/* Tablet */
@media (max-width: 960px) {
  .intro-foot .positioning { grid-column: 1 / -1; }
  .intro-foot p.lede { grid-column: 1 / -1; }
  .project-caption h3 { grid-column: 1 / span 5; }
  .project-caption .summary { grid-column: 6 / -1; }
  .project-caption .sector { grid-column: 1 / -1; text-align: left; grid-row: 2; }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-section > h2 { grid-column: 1 / -1; }
  .cs-section .body { grid-column: 1 / -1; }
  .contact h2, .contact ul { grid-column: 1 / -1; }
  .about-grid .portrait { grid-column: 1 / span 5; }
  .about-grid .bio { grid-column: 1 / -1; }
}

/* Phone */
@media (max-width: 600px) {
  .site-head { flex-wrap: wrap; }
  .project-caption { grid-template-columns: 1fr; gap: 0.5rem; }
  .project-caption h3, .project-caption .summary, .project-caption .sector { grid-column: 1; grid-row: auto; }
  .fig-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fig-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-chapter .meta-label, .cs-chapter h2 { grid-column: 1 / -1; }
  .cs-meta { grid-template-columns: 1fr; }
  .about-grid .portrait { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.shape-wide .placeholder { aspect-ratio: 3 / 2; }
.shape-tall .placeholder { aspect-ratio: 4 / 5; }
.project-media:not(.pair):not(.fig-tiles) { grid-template-columns: minmax(0, 1fr); }
.panel { width: 100%; min-width: 0; overflow: hidden; }
.panel img { min-height: 0; }

/* Tall signage pairs sit narrower so they do not dominate the page */
.cs-figure.fig-pair.shape-tile { width: min(100%, 860px); }

/* Revision: case study structure */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cs-disciplines {
  font-family: var(--sans);
  font-size: var(--t-sm);
  color: var(--ink-soft);
  margin: 1.25rem 0 0;
  max-width: 60ch;
}
.cs-head .thesis { margin-top: 1rem; }
.cs-sub {
  font-family: var(--sans);
  font-size: var(--t-sm);
  font-weight: 500;
  margin: 2rem 0 0.6rem;
}
.cs-section .body .cs-sub:first-child { margin-top: 0; }
.role-list.services { columns: 2; column-gap: 2rem; margin-top: 0; border-top: 0; }
.role-list.services li { break-inside: avoid; border-top: 1px solid var(--rule); border-bottom: 0; }
.cs-section .body .visit { margin-top: 1.5rem; }
.fig-tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cs-chapter + .cs-section { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
@media (max-width: 600px) {
  .role-list.services { columns: 1; }
  .fig-tiles.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Sequence of campaign boards: a slow crossfade, still for reduced motion */
.fade-seq { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.fade-seq img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: fadeSeq 12s infinite; }
.fade-seq img:nth-child(1) { position: relative; opacity: 1; animation-name: fadeSeqFirst; }
.fade-seq img:nth-child(2) { animation-delay: 4s; }
.fade-seq img:nth-child(3) { animation-delay: 8s; }
@keyframes fadeSeq { 0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 39% { opacity: 0; } 100% { opacity: 0; } }
@keyframes fadeSeqFirst { 0% { opacity: 1; } 33% { opacity: 1; } 39% { opacity: 0; } 94% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .fade-seq img { animation: none !important; }
  .fade-seq img:nth-child(n+2) { display: none; }
  .fade-seq img:nth-child(1) { opacity: 1; }
}

/* Narrower portrait pairs where the source photography is web resolution */
.cs-figure.fig-pair.narrow { width: min(100%, 860px); }

.fig-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shape-screen img { aspect-ratio: 16 / 9; }
.shape-guide img { aspect-ratio: 2244 / 1406; }

/* Femme Rewards loyalty ladder */
.rewards {
  --fc-sand: #E5D2C4; --fc-pink: #FD9AB9; --fc-coral: #E3755E; --fc-green: #1C443B; --fc-black: #0A0A0A;
  margin-block: clamp(3rem, 7vw, 6rem);
}
.rewards-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.rewards-head h2 { grid-column: 1 / span 5; font-size: var(--t-xl); line-height: 1.15; letter-spacing: -0.01em; }
.rewards-head p { grid-column: 7 / span 6; margin: 0; max-width: 34em; }
.tiers {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 1vw, 12px);
  align-items: end;
}
.tier { padding: 1.1rem 1rem 1.25rem; font-family: var(--sans); min-width: 0; display: flex; flex-direction: column; }
.tier h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.05; margin: 0.35rem 0 0.25rem; }
.tier p { margin: 0; }
.tier-step, .tier-flow { font-size: var(--t-xs); opacity: 0.8; }
.tier-points { font-size: var(--t-sm); font-weight: 500; }
.tier-tone { font-size: var(--t-xs); margin-top: 0.6rem !important; font-style: italic; font-family: var(--serif); font-size: 0.95rem; }
.tier-flow { margin-top: auto !important; padding-top: 1rem; }
.tier-emails { list-style: none; margin: 0.5rem 0 0; padding: 0.6rem 0 0; border-top: 1px solid currentColor; font-size: var(--t-xs); line-height: 1.35; display: grid; gap: 0.35rem; }
.tier-1 { background: var(--fc-sand); color: var(--fc-black); min-height: 11rem; }
.tier-2 { background: var(--fc-pink); color: var(--fc-green); min-height: 13rem; }
.tier-3 { background: var(--fc-coral); color: var(--fc-black); min-height: 15rem; }
.tier-4 { background: var(--fc-green); color: #FFFFFF; min-height: 17rem; }
.tier-5 { background: var(--fc-black); color: #FFFFFF; min-height: 19rem; }
.tier-5 h3 { color: var(--fc-pink); }
.earn {
  list-style: none; margin: 1.25rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
  font-family: var(--sans); font-size: var(--t-sm); color: var(--ink-soft);
}
.earn strong { display: block; font-family: var(--serif); font-weight: 400; font-size: var(--t-lg); color: var(--ink); }
.rewards figcaption { margin-top: 1rem; }
@media (max-width: 960px) {
  .rewards-head h2, .rewards-head p { grid-column: 1 / -1; }
  .tiers { grid-template-columns: 1fr; align-items: stretch; }
  .tier { min-height: 0 !important; }
  .tier-emails { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .earn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A single portrait shown at a modest size, centred */
.cs-figure.portrait-narrow { width: min(100%, 440px); margin-inline: auto; }

/* Founder's story: label above the title and the results figures */
.cs-label { margin: 0 0 0.75rem; }
.figures {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1.5rem; margin: 0 0 2rem; padding: 1.5rem 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.figures div { display: flex; flex-direction: column-reverse; gap: 0.35rem; }
.figures dd { margin: 0; font-family: var(--serif, "Newsreader", Georgia, serif); font-size: var(--t-xl); line-height: 1.05; letter-spacing: -0.01em; }
.figures dt { font-size: 0.8rem; color: var(--ink-soft); }
.cs-figure.screen-narrow { width: min(100%, 860px); margin-inline: auto; }
.cs-figure.screen-narrow img, .cs-figure.fig-single:not([class*="shape-"]) img { box-shadow: 0 0 0 1px var(--rule); }
.project-caption .cs-label { grid-column: 1 / -1; margin: 0 0 -0.5rem; }

/* Compact tier bars on phones */
@media (max-width: 760px) {
  .tiers { gap: 6px; }
  .tier { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 0.75rem; padding: 0.8rem 1rem; }
  .tier h3 { font-size: 1.25rem; margin: 0; }
  .tier-tone { grid-column: 1 / -1; margin-top: 0.2rem !important; }
  .tier-flow { margin: 0 !important; padding: 0; }
}
