/* Fonts are self-hosted: no third-party requests, works with a strict CSP. */
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/bodoni-moda-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/bodoni-moda-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/bodoni-moda-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Signature";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/mrs-saint-delafield-latin-400-normal.woff2") format("woff2");
}

:root {
  --black: #000;
  --navy: #0E1A2B;
  --navy-2: #16263D;
  --gold: #B8945A;
  --gold-soft: #D9BF8C;
  --red: #B3121B;
  --paper: #F4F4F1;
  --white: #FFF;
  --grey: #5B6068;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --measure: 34rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font: 400 1.0625rem/1.65 var(--sans);
}

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

a {
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
p,
dl,
dd,
figure {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: .75rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* The red full stop is the brand mark, used after every headline. */
.dot {
  color: var(--red);
}

.dot--white {
  color: var(--white);
}

.display {
  font: 400 clamp(3rem, 8vw, 6.5rem)/0.95 var(--serif);
  letter-spacing: -0.02em;
}

.lede {
  font: 400 clamp(1.25rem, 2vw, 1.5rem)/1.45 var(--serif);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .8rem 1.4rem;
  border: 1px solid currentColor;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  transition: background-color .2s, color .2s;
}

.btn:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn--solid {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn--solid:hover {
  background: var(--red);
  border-color: var(--red);
}

.btn--light {
  color: var(--white);
}

.btn--light:hover {
  background: var(--white);
  color: var(--red);
  border-color: var(--white);
}

.btn--gold {
  color: var(--gold-soft);
}

.btn--gold:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr auto auto;
  column-gap: 1rem;
  padding: 0 var(--pad) clamp(2rem, 5vw, 4rem);
}

.topnav {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  position: relative;
  z-index: 3;
}

.topnav__mark {
  font: 500 1.5rem/1 var(--serif);
  text-decoration: none;
}

.topnav ul {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.topnav ul a {
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}

.topnav ul a:hover {
  color: var(--red);
}

.hero__side {
  position: absolute;
  left: calc(var(--pad) / 2 - .6rem);
  top: 50%;
  writing-mode: vertical-rl;
  transform: rotate(180deg) translateY(50%);
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--grey);
  padding-top: 3rem;
  border-top: 1px solid var(--grey);
}

.hero__portrait {
  grid-column: 6 / -1;
  grid-row: 1 / 4;
  align-self: end;
  margin-right: calc(var(--pad) * -1);
  position: relative;
  z-index: 1;
}

.hero__portrait img {
  width: 100%;
  max-height: 92svh;
  object-fit: cover;
  object-position: top;
  filter: grayscale(1) contrast(1.05);
}

.hero__name {
  grid-column: 1 / 11;
  grid-row: 2;
  align-self: end;
  position: relative;
  z-index: 2;
  font: 400 clamp(4rem, 13.5vw, 13rem)/0.86 var(--serif);
  letter-spacing: -0.035em;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hero__name>span {
  display: block;
}

.hero__last {
  padding-left: 0.6em;
}

.hero__intro {
  grid-column: 1 / 6;
  grid-row: 3;
  position: relative;
  z-index: 2;
}

.hero__titles {
  max-width: 26rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gold);
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

/* One orchestrated load moment: the name rises, the portrait follows. */
@media (prefers-reduced-motion: no-preference) {

  .hero__first,
  .hero__last {
    animation: rise .9s cubic-bezier(.2, .7, .2, 1) both;
  }

  .hero__last {
    animation-delay: .12s;
  }

  .hero__portrait {
    animation: fade 1.4s .25s ease-out both;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(.25em);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes fade {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 1rem;
  row-gap: 2.5rem;
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
  background: var(--white);
}

.about .display {
  grid-column: 1 / 6;
}

.about__body {
  grid-column: 6 / 12;
  max-width: var(--measure);
}

.about__body p+p {
  margin-top: 1.1rem;
}

.about__body .lede {
  margin-bottom: 1.75rem;
}

.signature {
  font: 400 3.75rem/1 "Signature", cursive;
  margin-top: 2rem !important;
  color: var(--navy);
}

.creds {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.6fr 1.6fr 1fr;
  gap: 2rem;
  border-top: 1px solid var(--black);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

.creds dt {
  font-size: .85rem;
  color: var(--grey);
  margin-bottom: .3rem;
}

.creds dd {
  font: 400 1.15rem/1.4 var(--serif);
}

/* ---------- Companies ---------- */
.companies {
  background: var(--navy);
  color: var(--white);
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
}

.companies__intro {
  color: #B9C2CF;
  margin: 1.25rem 0 3.5rem;
  max-width: var(--measure);
}

.logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(184, 148, 90, .45);
  border-left: 1px solid rgba(184, 148, 90, .45);
}

.logos li {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid rgba(184, 148, 90, .45);
  border-bottom: 1px solid rgba(184, 148, 90, .45);
}

.logos img {
  height: 64px;
  width: auto;
  max-width: 100%;
  margin-bottom: 1.75rem;
  object-fit: contain;
  object-position: left;
}

.logos__name {
  font: 400 1.3rem/1.25 var(--serif);
}

.logos__role {
  color: var(--gold-soft);
  font-size: .9rem;
  margin-top: .25rem;
}

/* ---------- Fitness ---------- */
.fitness {
  display: grid;
  grid-template-columns: 5fr 7fr;
  background: var(--red);
  color: var(--white);
}

.fitness__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.fitness__text {
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
  align-self: center;
}

.fitness__text .lede {
  margin: 1.75rem 0 1rem;
  max-width: var(--measure);
}

.fitness__text p {
  max-width: var(--measure);
}

.hobbies {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 2rem 0 2.5rem;
}

.hobbies li {
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-size: .9rem;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--black);
  color: var(--white);
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
}

.contact__note {
  color: #A9AEB5;
  margin: 1.25rem 0 2.5rem;
}

.contact__email {
  display: inline-block;
  font: 400 clamp(1.6rem, 5vw, 4rem)/1.1 var(--serif);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: .3rem;
  overflow-wrap: anywhere;
}

.contact__email:hover {
  color: var(--gold-soft);
}

.contact__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 3.5rem 0;
  max-width: 60rem;
}

.contact__list dt {
  font-size: .85rem;
  color: #A9AEB5;
  margin-bottom: .3rem;
}

.contact__list dd {
  font-size: 1.1rem;
}

.contact__list a {
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .3);
}

.contact__list a:hover {
  border-color: var(--gold);
}

.socials {
  display: flex;
  gap: .75rem;
  margin-bottom: 3rem;
}

.socials a {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  transition: border-color .2s, background-color .2s;
}

.socials a:hover {
  background: var(--gold);
  border-color: var(--gold);
}

.socials a:hover svg {
  fill: var(--black);
}

.socials svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: var(--white);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem var(--pad);
  background: var(--black);
  color: #7D828A;
  font-size: .85rem;
  border-top: 1px solid #222;
}

.footer a {
  color: #A9AEB5;
}

/* ---------- Tablet & mobile ---------- */
@media (max-width: 1100px) {
  .logos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-rows: auto auto auto auto;
    min-height: 0;
  }

  .topnav ul {
    display: none;
  }

  .hero__side {
    display: none;
  }

  .hero__portrait {
    grid-column: 3 / -1;
    grid-row: 2;
    margin-top: -1rem;
  }

  .hero__portrait img {
    max-height: 70svh;
  }

  .hero__name {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: -0.7em;
    font-size: clamp(3.5rem, 19vw, 8rem);
  }

  .hero__intro {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .about .display,
  .about__body {
    grid-column: 1 / -1;
  }

  .creds {
    grid-template-columns: 1fr 1fr;
  }

  .logos {
    grid-template-columns: 1fr 1fr;
  }

  .fitness {
    grid-template-columns: 1fr;
  }

  .fitness__photo img {
    max-height: 70svh;
  }

  .contact__list {
    grid-template-columns: 1fr;
  }
}

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

  .creds {
    grid-template-columns: 1fr;
  }

  .actions .btn {
    padding: .7rem 1.1rem;
  }
}

@media print {

  .topnav,
  .actions,
  .socials,
  .btn,
  .skip {
    display: none;
  }

  .companies,
  .fitness,
  .contact,
  .footer {
    background: none;
    color: #000;
  }
}

/* ---------- Hero: soft moving shapes behind Ken ---------- */
.hero__portrait {
  isolation: isolate;
}

.hero__portrait img {
  position: relative;
  object-fit: contain;
  /* keeps the whole cut-out visible */
  object-position: bottom center;
  filter: none;
  /* full colour; use grayscale(1) for black and white */
  drop-shadow: none;
}

.hero__shape {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.hero__shape--1 {
  /* champagne gold, behind his head and shoulders */
  width: 85%;
  aspect-ratio: 1;
  left: 5%;
  top: 8%;
  background: radial-gradient(circle at 45% 45%, rgba(201, 164, 92, .55), rgba(201, 164, 92, 0) 65%);
}

.hero__shape--2 {
  /* deep navy, lower left */
  width: 70%;
  aspect-ratio: 1;
  left: -20%;
  bottom: 0;
  background: radial-gradient(circle, rgba(14, 26, 43, .35), rgba(14, 26, 43, 0) 65%);
}

.hero__shape--3 {
  /* soft red, right */
  width: 55%;
  aspect-ratio: 1;
  right: -12%;
  top: 38%;
  background: radial-gradient(circle, rgba(179, 18, 27, .22), rgba(179, 18, 27, 0) 65%);
}

.hero__shape--4 {
  /* small warm glow, top right */
  width: 40%;
  aspect-ratio: 1;
  right: 6%;
  top: 0;
  background: radial-gradient(circle, rgba(217, 191, 140, .45), rgba(217, 191, 140, 0) 65%);
}

/* Phones: bigger shapes so they still frame him */
@media (max-width: 900px) {
  .hero__shape--1 {
    width: 115%;
    left: -8%;
    top: 5%;
  }

  .hero__shape--2 {
    width: 95%;
  }

  .hero__shape--3 {
    width: 80%;
  }

  .hero__shape--4 {
    width: 60%;
  }
}

/* Slow, offset loops. Off for visitors who turn motion off on their device. */
@media (prefers-reduced-motion: no-preference) {
  .hero__shape--1 {
    animation: hs-1 24s ease-in-out infinite alternate;
  }

  .hero__shape--2 {
    animation: hs-2 30s ease-in-out infinite alternate;
  }

  .hero__shape--3 {
    animation: hs-3 36s ease-in-out infinite alternate;
  }

  .hero__shape--4 {
    animation: hs-4 20s ease-in-out infinite alternate;
  }

  @keyframes hs-1 {
    0% {
      transform: translate(0, 0) rotate(0deg) scale(1, 1);
    }

    50% {
      transform: translate(6%, -6%) rotate(25deg) scale(1.12, .92);
    }

    100% {
      transform: translate(-6%, 4%) rotate(50deg) scale(.95, 1.08);
    }
  }

  @keyframes hs-2 {
    0% {
      transform: translate(0, 0) scale(1, 1);
    }

    50% {
      transform: translate(18%, -12%) scale(1.15, .88);
    }

    100% {
      transform: translate(30%, -4%) scale(.92, 1.12);
    }
  }

  @keyframes hs-3 {
    0% {
      transform: translate(0, 0) rotate(0deg) scale(1);
    }

    50% {
      transform: translate(-20%, 8%) rotate(-20deg) scale(1.15, .9);
    }

    100% {
      transform: translate(-8%, -16%) rotate(-40deg) scale(.92, 1.08);
    }
  }

  @keyframes hs-4 {
    0% {
      transform: translate(0, 0) scale(1);
    }

    100% {
      transform: translate(-25%, 20%) scale(1.25);
    }
  }
}

/* ---------- Hero: moving lines and shapes behind Ken ---------- */
:root {
  --rouge: 155, 28, 49;
  /* #9B1C31 */
  --forest: 34, 85, 60;
  /* #22553C */
  --deep-navy: 14, 26, 43;
  /* #0E1A2B */
}

.hero__portrait {
  isolation: isolate;
}

/* Photo stays black and white */
.hero__portrait img {
  position: relative;
  object-fit: contain;
  object-position: bottom center;
  filter: grayscale(1) contrast(1.05);
}

.hs {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}

/* Thin arcs (part of a circle) that slowly turn */
.hs--arc-navy {
  width: 90%;
  aspect-ratio: 1;
  left: 5%;
  top: 6%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(var(--deep-navy), .45);
  border-right-color: rgba(var(--deep-navy), .45);
}

.hs--arc-green {
  width: 62%;
  aspect-ratio: 1;
  left: 22%;
  top: 20%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-bottom-color: rgba(var(--forest), .45);
  border-left-color: rgba(var(--forest), .45);
}

/* Long rouge lines on a diagonal */
.hs--line {
  height: 2px;
  width: 130%;
  left: -15%;
  background: rgba(var(--rouge), .40);
  transform: rotate(-32deg);
}

.hs--line-1 {
  top: 30%;
}

.hs--line-2 {
  top: 46%;
  height: 1px;
  background: rgba(var(--rouge), .30);
}

.hs--line-3 {
  top: 62%;
}

/* Forest-green pill */
.hs--pill {
  width: 58%;
  height: 16%;
  right: -14%;
  top: 52%;
  border-radius: 999px;
  background: rgba(var(--forest), .16);
  border: 1px solid rgba(var(--forest), .35);
  transform: rotate(-32deg);
}

/* Panel of fine navy lines */
.hs--grid {
  width: 38%;
  aspect-ratio: 1;
  left: -6%;
  top: 58%;
  background: repeating-linear-gradient(135deg, rgba(var(--deep-navy), .28) 0 1px, transparent 1px 12px);
}

/* Small rouge dot */
.hs--dot {
  width: 5%;
  aspect-ratio: 1;
  right: 14%;
  top: 14%;
  border-radius: 50%;
  background: rgba(var(--rouge), .55);
}

/* Phones: slightly heavier lines so they still show */
@media (max-width: 900px) {
  .hs--arc-navy {
    border-width: 2px;
  }

  .hs--line-2 {
    height: 2px;
  }

  .hs--dot {
    width: 7%;
  }
}

/* Motion: slow, offset loops. Off for visitors who turn motion off on their device. */
@media (prefers-reduced-motion: no-preference) {
  .hs--arc-navy {
    animation: hs-spin 60s linear infinite;
  }

  .hs--arc-green {
    animation: hs-spin-back 45s linear infinite;
  }

  .hs--line-1 {
    animation: hs-glide 18s ease-in-out infinite alternate;
  }

  .hs--line-2 {
    animation: hs-glide 24s ease-in-out infinite alternate-reverse;
  }

  .hs--line-3 {
    animation: hs-glide 21s ease-in-out infinite alternate;
  }

  .hs--pill {
    animation: hs-pill 26s ease-in-out infinite alternate;
  }

  .hs--grid {
    animation: hs-grid 30s ease-in-out infinite alternate;
  }

  .hs--dot {
    animation: hs-dot 16s ease-in-out infinite alternate;
  }

  @keyframes hs-spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes hs-spin-back {
    to {
      transform: rotate(-360deg);
    }
  }

  @keyframes hs-glide {
    from {
      transform: rotate(-32deg) translateX(-12%);
    }

    to {
      transform: rotate(-32deg) translateX(12%);
    }
  }

  @keyframes hs-pill {
    from {
      transform: rotate(-32deg) translate(0, 0);
    }

    to {
      transform: rotate(-24deg) translate(-30%, -40%);
    }
  }

  @keyframes hs-grid {
    from {
      transform: translate(0, 0) rotate(0deg);
    }

    to {
      transform: translate(25%, -30%) rotate(12deg);
    }
  }

  @keyframes hs-dot {
    0% {
      transform: translate(0, 0);
    }

    50% {
      transform: translate(-120%, 180%);
    }

    100% {
      transform: translate(60%, 320%);
    }
  }
}

/* ---------- Hero name: readable where it overlaps the photo ---------- */
.hero__name {
  color: #0A0A0A;
  text-shadow:
    0 0 2px rgba(244, 244, 241, .95),
    0 0 14px rgba(244, 244, 241, .85),
    0 0 32px rgba(244, 244, 241, .6);
}

.hero__name .dot {
  color: #B3121B;
}

/* ---------- About: photo on the left of the text ---------- */
.about .display {
  grid-column: 1 / 6;
  grid-row: 1;
  align-self: start;
}

.about__photo {
  grid-column: 1 / 6;
  grid-row: 2;
  align-self: start;
  margin: 0;
}

.about__body {
  grid-column: 7 / 13;
  grid-row: 1 / span 2;
}

.about .creds {
  grid-row: 3;
}

.about__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  /* portrait frame; delete this line to keep the photo's own shape */
  object-fit: cover;
  object-position: top center;
  filter: grayscale(1) contrast(1.05);
  /* matches the hero; delete for full colour */
}

/* Thin gold line under the photo, matching the rest of the site */
.about__photo::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 1rem;
  background: var(--gold);
}

/* Tablet and phone: heading, photo, text, credentials stacked */
@media (max-width: 900px) {

  .about .display,
  .about__photo,
  .about__body,
  .about .creds {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .about__photo {
    max-width: 28rem;
  }
}

/* ---------- Hero: photo sits directly on the About section ---------- */
.hero {
  padding-bottom: 0;
}

/* Keep breathing room under the text and buttons */
.hero__intro {
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* Photo runs to the very bottom edge of the hero */
.hero__portrait {
  grid-row: 1 / -1;
  align-self: end;
  margin-bottom: 0;
}

.hero__portrait img {
  display: block;
  /* removes the small gap under images */
  object-position: bottom center;
}

/* Phones and tablets: name, text, buttons, then the photo resting on About */
@media (max-width: 900px) {
  .hero__name {
    grid-row: 2;
    margin-top: 1rem;
  }

  .hero__intro {
    grid-row: 3;
    padding-bottom: 0;
  }

  .hero__portrait {
    grid-row: 4;
    grid-column: 2 / -1;
    margin-top: 2rem;
  }
}

/* ---------- Hero: wide photo touching the right edge of the screen ---------- */
.hero__portrait {
  grid-column: 6 / -1;
  /* starts at the middle, runs right */
  margin-right: calc(var(--pad) * -1);
  /* cancels the page padding so it reaches the edge */
  width: auto;
}

.hero__portrait img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
  object-position: center bottom;
  border-radius: 0;
  /* square corners against the edge */
}

/* Phones and tablets: full width, edge to edge on the right */
@media (max-width: 900px) {
  .hero__portrait {
    grid-column: 1 / -1;
    margin-left: 0;
    margin-right: calc(var(--pad) * -1);
  }
}

/* ---------- Hero: bigger photo ---------- */
.hero__portrait {
  grid-column: 4 / -1;
  /* starts further left, so the photo is wider and taller */
}

@media (min-width: 1400px) {
  .hero__portrait {
    grid-column: 3 / -1;
  }

  /* even bigger on large screens */
}

/* Phones: let it bleed past both edges for maximum size */
@media (max-width: 900px) {
  .hero__portrait {
    margin-left: calc(var(--pad) * -1);
    margin-right: calc(var(--pad) * -1);
  }
}

/* ---------- Hero: photo fills the full height, no space above his head ---------- */
.hero__portrait {
  grid-row: 2 / -1;
  /* from just under the menu to the bottom of the hero */
  align-self: stretch;
  display: flex;
  justify-content: flex-end;
  /* stays against the right edge */
  align-items: flex-end;
  /* stays sitting on the About section */
  min-height: 0;
}

.hero__portrait img {
  height: 100%;
  width: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: right bottom;
  flex-shrink: 0;
}

/* Phones: back to a normal full-width image */
@media (max-width: 900px) {
  .hero__portrait {
    grid-row: 4;
    align-self: auto;
  }

  .hero__portrait img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }
}

/* ---------- Hero on phones: big photo first, name over the fade ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-rows: auto auto auto auto;
    padding-bottom: 3rem;
  }

  /* Photo: full width, tall, cropped in on Ken */
  .hero__portrait {
    grid-row: 2;
    grid-column: 1 / -1;
    margin: 0 calc(var(--pad) * -1);
    /* touches both edges of the screen */
    height: 66svh;
    min-height: 420px;
    display: block;
    align-self: auto;
    position: relative;
    overflow: hidden;
  }

  .hero__portrait img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 80% bottom;
    /* first number moves the crop left/right */
  }

  /* Soft fade at the bottom of the photo into the page colour */
  .hero__portrait::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 35%;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(244, 244, 241, 0), #F4F4F1 90%);
  }

  /* Name overlaps the bottom of the photo */
  .hero__name {
    grid-row: 3;
    grid-column: 1 / -1;
    margin-top: -1em;
    position: relative;
    z-index: 2;
    font-size: clamp(3.25rem, 17vw, 6rem);
  }

  /* Text and buttons underneath */
  .hero__intro {
    grid-row: 4;
    grid-column: 1 / -1;
    padding-bottom: 0;
  }

  .hero__titles {
    margin-top: .5rem;
  }
}

/* ---------- Phones: name sits on his chest ---------- */
@media (max-width: 900px) {

  /* Pull the whole name up onto the lower part of the photo */
  .hero__name {
    margin-top: -2.75em;
    margin-bottom: 1.25rem;
  }

  /* Taller, gentler fade so the name reads clearly over his jacket */
  .hero__portrait::after {
    height: 55%;
    background: linear-gradient(to bottom,
        rgba(244, 244, 241, 0) 0%,
        rgba(244, 244, 241, .55) 45%,
        rgba(244, 244, 241, .9) 75%,
        #F4F4F1 100%);
  }

  /* Slightly larger photo so his face stays clear above the name */
  .hero__portrait {
    height: 74svh;
  }
}

/* ---------- Desktop: big "Kennedy", "ASANTE OSEI" set neatly underneath ---------- */
@media (min-width: 901px) {
  .hero__name {
    font-size: clamp(5rem, 12vw, 12rem);
    /* size of "Kennedy" */
    line-height: .9;
    margin-top: 0;
    display: inline-block;
    /* both lines share one width */
    justify-self: start;
    align-self: end;
  }

  .hero__first {
    display: block;
    font-size: 1em;
    letter-spacing: -0.03em;
  }

  .hero__last {
    display: block;
    padding-left: 0;
    /* removes the old indent */
    margin-top: .3em;
    font-size: .3em;
    font-weight: 500;
    letter-spacing: .3em;
    /* spreads it to match "Kennedy" */
    text-transform: uppercase;
    line-height: 1;
  }

  .hero__last .dot {
    letter-spacing: 0;
    margin-left: -.25em;
  }
}

/* ---------- Phones: big "Kennedy", "ASANTE OSEI" set neatly underneath ---------- */
@media (max-width: 900px) {
  .hero__name {
    font-size: 23vw;
    /* controls the whole name block */
    line-height: .9;
    margin-top: -1.55em;
    /* keeps the name on his chest */
    display: inline-block;
    /* lets both lines share one width */
    justify-self: start;
  }

  .hero__first {
    display: block;
    font-size: 1em;
    letter-spacing: -0.03em;
  }

  .hero__last {
    display: block;
    padding-left: 0;
    /* removes the old indent */
    margin-top: .35em;
    font-size: .3em;
    /* about a third the size of "Kennedy" */
    font-weight: 500;
    letter-spacing: .3em;
    /* spreads it to match the width of "Kennedy" */
    text-transform: uppercase;
    line-height: 1;
  }

  /* Keep the red full stop snug against "OSEI" */
  .hero__last .dot {
    letter-spacing: 0;
    margin-left: -.25em;
  }
}

/* ---------- Hero: social icons under the contact buttons ---------- */
.hero-socials {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.25rem;
}

.hero-socials a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  /* big enough to tap comfortably */
  border: 1px solid rgba(0, 0, 0, .35);
  border-radius: 50%;
  transition: background-color .2s, border-color .2s;
}

.hero-socials svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: #000;
  transition: fill .2s;
}

.hero-socials a:hover,
.hero-socials a:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
}

/* ---------- Companies: logos visible on the dark background ---------- */
.logos img {
  display: block;
  width: auto;
  height: 64px;
  /* every logo the same height */
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 1.75rem;

  /* Turns every logo white so they match and show clearly on dark */
  filter: brightness(0) invert(1);
  opacity: .9;
}

/* ---------- Companies: logos in their real colours ---------- */
.logos img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: 96px;
  /* every card the same height */
  object-fit: contain;
  /* whole logo visible, never stretched */
  object-position: center;
  margin-bottom: 1.5rem;

  filter: none;
  /* real colours */
  opacity: 1;

  background: #F7F4EE;
  /* soft ivory card */
  padding: .75rem 1rem;
  border-radius: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(184, 148, 90, .45);
  /* thin gold edge */
}

/* ---------- Companies: logos on their own, no cards ---------- */
.logos img {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  filter: none;

  width: auto;
  max-width: 180px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 1.5rem;
}

/* Black logos shown in white so they're visible on navy */
.logos img.logo--light {
  filter: brightness(0) invert(1);
}

/* ---------- Companies: FINAL logo rules (overrides everything above) ---------- */
.companies .logos img {
  filter: none !important;
  /* real colours for every logo */
  opacity: 1 !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Only logos you mark with class="logo--light" turn white */
.companies .logos img.logo--light {
  filter: brightness(0) invert(1) !important;
}

/* ---------- Companies: FINAL logo rules ---------- */

/* 1. Make sure nothing around the logos is tinting them */
.companies .logos,
.companies .logos li {
  filter: none !important;
}

/* 2. Every logo in its real colours */
.companies .logos img {
  filter: none !important;
  opacity: 1 !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  width: auto !important;
  height: 72px !important;
  max-width: 200px !important;
  object-fit: contain !important;
  object-position: left center !important;
  margin-bottom: 1.5rem;
}

/* 3. Only black logos turn white */
.companies .logos img.logo--light {
  filter: brightness(0) invert(1) !important;
}

/* 4. Logos that need to be 40% bigger */
.companies .logos img.logo--lg {
  height: 100px !important;
  max-width: 280px !important;
}

/* ---------- Companies: halo so dark logos show on navy ---------- */
.companies .logos img.logo--halo {
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, .95)) drop-shadow(0 0 1px rgba(255, 255, 255, .95)) drop-shadow(0 0 8px rgba(255, 255, 255, .35)) !important;
}

/* Same space for every logo, so names line up across each row */
.companies .logos li {
  display: flex;
  flex-direction: column;
}

.companies .logos img {
  align-self: flex-start;
}

/* ---------- Companies: light ivory section so every logo shows naturally ---------- */
.companies {
  background: #F7F4EE !important;
  color: #0A0A0A !important;
}

.companies .display {
  color: #0A0A0A;
}

.companies__intro {
  color: #5B6068 !important;
}

/* Gold grid lines */
.companies .logos,
.companies .logos li {
  border-color: rgba(184, 148, 90, .55) !important;
}

/* Names and roles */
.companies .logos__name {
  color: #0A0A0A !important;
}

.companies .logos__role {
  color: #8A6A35 !important;
}

/* deeper gold, readable on ivory */

/* Logos: real colours, no effects */
.companies .logos img,
.companies .logos img.logo--light,
.companies .logos img.logo--halo {
  filter: none !important;
}

/* ---------- Sports: framed photo inset on the main picture ---------- */
.fitness__photo {
  position: relative;
}

.fitness__photo .fitness__inset {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  width: 34%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  z-index: 2;
  border: 6px solid #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
}

/* Phones: slightly bigger so it's still clear */
@media (max-width: 900px) {
  .fitness__photo .fitness__inset {
    width: 40%;
    right: 1rem;
    bottom: 1rem;
    border-width: 4px;
  }
}

/* ---------- Footer: social icons, light on dark ---------- */
.footer {
  align-items: center;
}

.hero-socials--footer {
  margin-top: 0;
  gap: .5rem;
}

.hero-socials--footer a {
  width: 2.5rem;
  height: 2.5rem;
  border-color: rgba(255, 255, 255, .35);
}

.hero-socials--footer svg {
  fill: #fff;
}

.hero-socials--footer a:hover,
.hero-socials--footer a:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
}

.hero-socials--footer a:hover svg,
.hero-socials--footer a:focus-visible svg {
  fill: #000;
}

/* Phones: stack copyright, icons and "Back to top" neatly */
@media (max-width: 600px) {
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
}