/* ==========================================================================
   colmanwalsh.com: shared styles
   ========================================================================== */

:root {
  /* Colours */
  --cream: #F7F4EE;
  --cream-dark: #EFE9DF;
  --ink: #1A1A1A;
  --ink-soft: #45423D;
  --muted: #6B665E;
  --muted-light: #8A847A;
  --line: #DCD6CB;
  --line-light: #E4DED3;
  --field-border: #CFC8BC;
  --pink: #C4206F;
  --pink-hover: #9A1857;
  --pink-light: #F49AC6;
  --dark: #1C1A17;
  --dark-text: #CFC8BC;
  --placeholder-grey: #D6D2CB;

  /* Fonts */
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1280px;
  --gutter: clamp(20px, 7.5vw, 96px);
  /* Extra space either side of the content on screens wider than --max-width */
  --bleed: max(0px, (100vw - var(--max-width)) / 2);
  --header-height: 72px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

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

/* Photos are shown in black and white across the site */
.hero__photo img,
.about__photo {
  filter: grayscale(1);
}

a {
  color: var(--pink);
}

a:hover {
  color: var(--pink-hover);
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
}

p {
  margin: 0;
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Small uppercase label above headings */
.eyebrow {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--pink);
}

.eyebrow--light {
  color: var(--pink-light);
}

.eyebrow--muted {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */

.button {
  display: inline-block;
  background: var(--pink);
  color: #FFFFFF;
  border: 0;
  border-radius: 4px;
  padding: 16px 28px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--pink-hover);
  color: #FFFFFF;
}

.button--small {
  padding: 10px 18px;
  font-size: 15px;
}

.text-link-underlined {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 14px 8px;
  border-bottom: 2px solid var(--pink);
}

.text-link-underlined:hover {
  color: var(--pink-hover);
  border-color: var(--pink-hover);
}

.arrow-link {
  font-weight: 600;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Header (stays pinned to the top while scrolling)
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 244, 238, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-light);
}

.site-header__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 36px;
}

.logo {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.logo:hover {
  color: var(--ink);
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 36px;
  font-size: 15px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--pink);
}

/* --------------------------------------------------------------------------
   Hero: text on the left, photo running to the right edge of the screen
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(500px + var(--bleed));
  gap: 72px;
  padding-left: calc(var(--gutter) + var(--bleed));
}

.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding-block: 64px;
}

.hero h1 {
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.hero h1 em {
  color: var(--pink);
}

.hero__intro {
  max-width: 560px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
}

.hero__photo {
  margin: 0;
  position: relative;
  min-height: 620px;
  background: var(--placeholder-grey); /* shows if the photo is missing */
}

.hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.hero__photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 13px;
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   Three doors: Consulting, Speaking, Training
   -------------------------------------------------------------------------- */

.doors {
  border-top: 1px solid var(--line);
}

.doors__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 72px;
}

.door {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.door:hover {
  color: var(--ink);
}

.door__title {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--pink);
}

.door__text {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.door__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--pink);
}

.door:hover .door__link {
  color: var(--pink-hover);
}

/* --------------------------------------------------------------------------
   Why I do this (dark band)
   -------------------------------------------------------------------------- */

.why {
  background: var(--dark);
  color: var(--cream);
}

.why__grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 72px;
  padding-top: 112px;
  padding-bottom: 120px;
}

.why .eyebrow {
  padding-top: 14px;
}

.why__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
}

.why__statement {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.why__statement--accent {
  color: var(--pink-light);
  font-style: italic;
}

.why__text {
  font-size: 19px;
  line-height: 1.6;
  color: var(--dark-text);
}

/* --------------------------------------------------------------------------
   Proof: quote and logos
   -------------------------------------------------------------------------- */

.proof .container {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 96px;
  padding-bottom: 88px;
}

.quote {
  margin: 0;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quote p {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3;
  font-style: italic;
}

.quote footer {
  font-size: 15px;
  color: var(--muted);
}

.logos {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.logos__grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.logo-placeholder {
  height: 56px;
  border: 1px dashed var(--field-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted-light);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about {
  border-top: 1px solid var(--line);
}

.about__grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 72px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 88px;
}

.about__photo {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 4px;
  background: var(--placeholder-grey); /* shows if the photo is missing */
}

.about__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 680px;
}

.about h2 {
  font-size: clamp(30px, 3.5vw, 40px);
  line-height: 1.15;
}

.about__text p:not(.eyebrow) {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  background: var(--cream-dark);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  padding-top: 88px;
  padding-bottom: 88px;
}

.contact__intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact h2 {
  font-size: clamp(36px, 4vw, 44px);
  line-height: 1.1;
}

.contact__intro > p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.contact__details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 17px;
}

.contact__details a:not(.arrow-link) {
  color: var(--ink);
  text-decoration: none;
}

.contact__details a:not(.arrow-link):hover {
  color: var(--pink);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 4px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
}

.contact-form input {
  height: 48px;
  padding: 0 14px;
}

.contact-form textarea {
  padding: 12px 14px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--pink);
  outline-offset: 1px;
  border-color: var(--pink);
}

.contact-form .button {
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
}

/* ==========================================================================
   Tablets and smaller laptops
   ========================================================================== */

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 42%;
    gap: 48px;
  }

  .why__grid,
  .about__grid,
  .contact__grid {
    gap: 48px;
  }

  .why__grid {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .about__grid {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

/* ==========================================================================
   Tablets (portrait) and phones: columns stack
   ========================================================================== */

@media (max-width: 860px) {
  :root {
    --header-height: 104px;
  }

  /* Header: name and button on top, menu underneath */
  .site-header__inner {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 16px;
    padding-block: 12px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 24px;
    overflow-x: auto;
  }

  .site-nav a {
    padding-block: 6px;
    white-space: nowrap;
  }

  /* Hero: photo goes under the text */
  .hero {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 0;
  }

  .hero__text {
    padding: 48px var(--gutter) 48px;
    gap: 24px;
  }

  .hero__intro {
    font-size: 18px;
  }

  .hero__photo {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .doors__grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 56px;
  }

  .why__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 72px;
    padding-bottom: 80px;
  }

  .why .eyebrow {
    padding-top: 0;
  }

  .why__text {
    font-size: 18px;
  }

  .proof .container {
    padding-top: 72px;
    padding-bottom: 64px;
    gap: 40px;
  }

  .logos__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .about__photo {
    max-width: 480px;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .about__text p:not(.eyebrow) {
    font-size: 17px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

/* ==========================================================================
   Small phones
   ========================================================================== */

@media (max-width: 480px) {
  .logo {
    font-size: 21px;
  }

  .site-nav {
    gap: 20px;
  }

  .hero__photo {
    aspect-ratio: 4 / 5;
  }

  .hero__actions .button,
  .contact-form .button {
    width: 100%;
    text-align: center;
    align-self: stretch;
  }

  .logos__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
