/* Encore Projects: site styles.
   Mobile-first: the base rules are for phones, and the @media block
   near the bottom adjusts the layout for wider screens.
   Colours, fonts and sizes are defined once as variables below. */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "League Spartan";
  src: url("../fonts/league-spartan-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

/* ---------- Design tokens ---------- */
:root {
  /* Colours (taken from the original Wix site) */
  --lime: #eeffb6;       /* header, hero, approach, footer background */
  --cream: #fefcf2;      /* about and contact background */
  --navy: #1f2d3f;       /* body text, buttons, lines */
  --sage: #53625d;       /* logo text, hero headline, testimonials background */
  --error: #a4161a;
  --success: #1e5631;

  /* Fonts */
  --font-body: "League Spartan", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;

  /* Sizes that grow smoothly from phone to desktop */
  --text-body: clamp(1.25rem, 0.95rem + 1.4vw, 1.875rem);   /* 20px -> 30px */
  --text-h1: clamp(2.5rem, 1.6rem + 4.2vw, 4rem);           /* 40px -> 64px */
  --text-h2: clamp(2.75rem, 1.9rem + 4vw, 4.375rem);        /* 44px -> 70px */
  --text-h3: clamp(1.625rem, 1.3rem + 1.4vw, 2.1875rem);    /* 26px -> 35px */
  --text-small: 1.125rem;                                   /* 18px */

  --content-width: 60rem;
  --gutter: 1.25rem;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

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

p {
  margin: 0 0 0.6em;
}

strong {
  font-weight: 600;
}

.medium {
  font-weight: 400;
}

a {
  color: inherit;
  text-underline-offset: 0.15em;
}

h1,
h2,
h3 {
  margin: 0;
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

.section--sage :focus-visible {
  outline-color: var(--lime);
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: var(--cream);
  font-size: var(--text-small);
  font-weight: 400;
  border-radius: 0 0 0.5rem 0.5rem;
}

.skip-link:focus {
  top: 0;
}

.container {
  width: 100%;
  max-width: calc(var(--content-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--lime);
  border-bottom: 1px solid var(--navy);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: 80rem;
  margin-inline: auto;
  padding: 0.75rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sage);
  text-decoration: none;
}

.brand-name {
  width: min-content; /* puts ENCORE and PROJECTS on separate lines */
  font-size: 1.4375rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 0.6rem 0.6rem;
  font-size: var(--text-small);
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
}

.nav-list a:hover {
  text-decoration: underline;
}

/* Contact stands out in the navigation, using the button look */
.nav-list .nav-cta {
  margin-left: 0.35rem;
  padding: 0.35rem 1rem;
  border: 1px solid var(--navy);
  border-radius: 100px;
  background: var(--navy);
  color: var(--cream);
}

.nav-list .nav-cta:hover {
  background: transparent;
  color: var(--navy);
  text-decoration: none;
}

/* ---------- Sections ---------- */
.section {
  padding-block: 3rem;
  scroll-margin-top: 0;
}

.section--lime {
  background: var(--lime);
}

.section--cream {
  background: var(--cream);
}

.section--sage {
  background: var(--sage);
  color: var(--lime);
}

h2,
.prose h1 {
  margin-bottom: 0.45em;
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 0.35em;
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  border: 1px solid var(--navy);
  border-radius: 100px;
  background: var(--navy);
  color: var(--cream);
  font-family: inherit;
  font-size: var(--text-small);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.button:hover {
  background: transparent;
  color: var(--navy);
}

.button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.button--wide {
  width: 100%;
  font-size: 1.25rem;
}

/* A row of links and buttons at the end of a block of text */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  margin: 1.75rem 0 0;
}

.text-link {
  font-weight: 400;
}

/* Long section headings are set a little smaller so they do not dominate */
.h2--long {
  font-size: clamp(2.125rem, 1.5rem + 2.8vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* ---------- Hero ---------- */
.hero-top {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.hero h1 {
  color: var(--sage);
  font-size: var(--text-h1);
  font-weight: 300;
  line-height: 1.1;
}

.hero-sub {
  margin: 1.25rem 0 0;
  color: var(--sage);
  font-size: clamp(1.625rem, 1.3rem + 1.5vw, 2.25rem);
  line-height: 1.25;
}

.hero-art {
  width: min(100%, 29.5rem);
  margin-inline: auto;
}

/* ---------- About ---------- */
.about-top {
  display: grid;
  gap: 1.5rem;
}

.about-portrait {
  width: min(70%, 21.5rem);
  margin-inline: auto;
  mask-image:
    linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
    linear-gradient(to bottom, transparent, #000 9%, #000 86%, transparent);
  mask-composite: intersect;
}

/* ---------- How I Can Help ---------- */
.help-list {
  display: grid;
  gap: 1.75rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.help-list li {
  padding-top: 1.25rem;
  border-top: 1px solid var(--navy);
}

.help-list p,
.steps p {
  margin-bottom: 0;
}

/* ---------- My Approach ---------- */
.steps {
  display: grid;
  gap: 1.75rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 3.5rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

/* ---------- Testimonials (section is currently commented out in index.html) ---------- */
.eyebrow {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.testimonials-intro {
  max-width: 40rem;
  margin-bottom: 3rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  line-height: 1.4;
  letter-spacing: 0;
}

.testimonial-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.testimonial {
  display: grid;
  gap: 0.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--lime);
}

.testimonial-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  line-height: 1.4;
  letter-spacing: 0;
}

.testimonial blockquote {
  margin: 0;
  font-weight: 400;
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
}

.contact .container > p {
  max-width: 44rem;
  margin-inline: auto;
}

.contact-form {
  max-width: 36rem;
  margin: 2.5rem auto 0;
  font-size: var(--text-small);
  letter-spacing: 0;
  text-align: left;
}

.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 400;
}

.optional {
  font-weight: 300;
}

.field-hint {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.25rem;
  border: 0;
  border-bottom: 1px solid var(--navy);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 400;
}

.field textarea {
  resize: vertical;
  min-height: 6rem;
}

.field input:hover,
.field textarea:hover {
  border-bottom-width: 2px;
  padding-bottom: calc(0.5rem - 1px);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline-offset: 2px;
}

/* Honeypot: off-screen so people never see it, but bots still fill it in */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 1rem 0 0;
  font-weight: 400;
  text-align: center;
}

.form-status:empty {
  display: none;
}

.form-status--success {
  color: var(--success);
}

.form-status--error {
  color: var(--error);
}

.form-note {
  margin: 1rem 0 0;
  font-size: 1rem;
  font-weight: 400;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--lime);
  padding-top: 2.5rem;
  font-size: var(--text-small);
  font-weight: 400;
  letter-spacing: 0;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
}

.footer-tagline {
  max-width: 22rem;
  margin: 1rem 0 0;
  font-weight: 300;
}

.footer-contact {
  font-style: normal;
  line-height: 1.5;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.footer-contact a {
  display: inline-block;
  padding-block: 0.4rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--navy);
  font-size: 1rem;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Privacy page ---------- */
.prose h2 {
  margin-top: 1.5em;
  margin-bottom: 0.3em;
  font-family: var(--font-body);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose p {
  max-width: 45rem;
}

/* ---------- Wider screens (tablet and up) ---------- */
@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .section {
    padding-block: 4rem;
  }

  .hero-top {
    grid-template-columns: 1fr minmax(0, 29.5rem);
    align-items: center;
  }

  .about-top {
    grid-template-columns: minmax(0, 21.5rem) 1fr;
    align-items: end;
  }

  .about-portrait {
    width: 100%;
  }

  .actions--end {
    justify-content: flex-end;
  }

  .help-list {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 3rem;
  }

  .testimonial {
    grid-template-columns: 2fr 3fr;
    gap: 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr auto auto;
    gap: 4rem;
    align-items: start;
  }
}
