/* ============================================================
   Lauren Hayes Consulting Services — main.css
   Colours from design system:
     Navy:    #252638
     Blue:    #E6F2FF
     Yellow:  #FFF0D1
     Lavender:#C3C2F4
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --navy:       #252638;
  --blue:       #E6F2FF;
  --yellow:     #FFF0D1;
  --lavender:   #C3C2F4;
  --white:      #ffffff;
  --text:       #252638;
  --text-light: #4a4b5e;

  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', Arial, Helvetica, sans-serif;

  --max-width: 1080px;
  --radius:    1rem;
  --radius-sm: 0.5rem;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

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

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

a:hover,
a:focus {
  text-decoration-thickness: 2px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin-top: 0;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.375rem); }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.25rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.4rem;
}

/* --- Layout wrapper --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1rem;
}

/* Site name / logo */
.site-name {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-body);
  line-height: 1.2;
}

.site-name .name-top {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.site-name .name-bottom {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-name:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Primary nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 400;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s, background 0.15s;
}

.primary-nav a:hover {
  opacity: 1;
  background: rgba(255,255,255,0.12);
}

.primary-nav a:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
  opacity: 1;
}

.primary-nav a[aria-current="page"] {
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Mobile menu toggle — hidden unless mobile/zoomed */
.menu-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  cursor: pointer;
  gap: 0.4rem;
  align-items: center;
}

.menu-toggle:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
}

/* ============================================================
   HERO / WELCOME SECTION
   ============================================================ */

.hero {
  padding: 4rem 0 4.5rem;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-image {
  display: flex;
  justify-content: center;
  order: 2;
}

.hero-text {
  order: 1;
}

.hero-text h1 {
  margin-bottom: 1.25rem;
}

.hero-text p {
  font-size: 1.0625rem;
  color: var(--text-light);
  max-width: 46ch;
}

.hero-image img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4/5;
}

/* ============================================================
   CONTENT SECTIONS (generic)
   ============================================================ */

.section {
  padding: 3.5rem 0;
}

.section--blue   { background: var(--blue); }
.section--yellow { background: var(--yellow); }
.section--lavender { background: var(--lavender); }

/* ============================================================
   SKILL CARDS (About page)
   ============================================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.skills-grid .skill-card {
  margin: 0;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
}

.skill-card--blue    { background: var(--blue); }
.skill-card--yellow  { background: var(--yellow); }
.skill-card--lavender { background: var(--lavender); }

.skill-card svg {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  opacity: 0.7;
}

/* ============================================================
   SERVICE CARDS (Services page)
   ============================================================ */

.service-card {
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
}

.service-card--blue    { background: var(--blue); }
.service-card--lavender { background: var(--lavender); }
.service-card--yellow  { background: var(--yellow); }

.service-card h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

/* ============================================================
   BENEFITS PAGE (text blocks)
   ============================================================ */

.benefits-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 2rem;
}

.benefits-intro img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.content-block {
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
}

.content-block--blue    { background: var(--blue); }
.content-block--yellow  { background: var(--yellow); }
.content-block--lavender { background: var(--lavender); }

/* ============================================================
   MY WORK PAGE
   ============================================================ */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.logo-grid img {
  height: 56px;
  width: auto;
  object-fit: contain;
  max-width: 160px;
}

.video-embed,
figure.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e8e8f0;
  margin: 1rem 0 2rem;
}

.video-embed iframe,
figure.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ============================================================
   CONTACT FORM (footer of every page)
   ============================================================ */

.contact-section {
  background: var(--blue);
  padding: 3.5rem 0 4rem;
  margin-top: 1rem;
}

.contact-section h2 {
  margin-bottom: 0.5rem;
}

.contact-section > .container > p {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

fieldset {
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}

legend {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--navy);
  margin: 0 0 1rem;
  padding: 0;
}

.form-container {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 28rem;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid rgba(37,38,56,0.35);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.15s, outline 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  border-color: var(--navy);
}

input.error,
select.error,
textarea.error {
  border-color: #c0392b;
}

.field-error {
  color: #c0392b;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

textarea {
  resize: vertical;
  min-height: 8rem;
}

/* Honeypot — visually hidden but not display:none so AT ignores it */
.vegemite {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

/* Submit button */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.65rem 1.75rem;
  border-radius: 2rem;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

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

.btn:focus {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.btn:active {
  background: var(--navy);
  color: var(--white);
  opacity: 0.85;
}

/* ============================================================
   MOBILE — max 768px
   ============================================================ */

@media (max-width: 768px) {

  /* Nav collapses */
  .menu-toggle {
    display: flex;
  }

  .primary-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 0.75rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 0.6rem 0;
    width: 100%;
  }

  /* Hero stacks */
  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    max-width: 280px;
    aspect-ratio: 1/1;
    margin: 0 auto;
  }

  /* Skills grid single column */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* Contact grid stacks */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  input, select, textarea {
    max-width: 100%;
  }

  /* Benefits intro stacks */
  .benefits-intro {
    grid-template-columns: 1fr;
  }
}

/* Ensure hidden attribute always hides elements regardless of display rules */
[hidden] {
  display: none !important;
}

/* ============================================================
   FORM VALIDATION — ERROR STATES
   ============================================================ */

.error-summary {
  background: #fff3f3;
  border: 2px solid #991B1B;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #991B1B;
}

.error-summary h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #991B1B;
  margin-bottom: 0.5rem;
}

.error-summary ul {
  margin: 0;
  padding-left: 1.25rem;
}

.error-summary a {
  color: #991B1B;
  font-size: 0.9375rem;
}

.error-summary a:hover,
.error-summary a:focus {
  color: #7f1212;
}

.inline-error {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #991B1B;
  font-size: 0.875rem;
  margin-top: 0.35rem;
}

.inline-error svg {
  flex-shrink: 0;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #991B1B;
  border-width: 2px;
}

input[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
  outline-color: #991B1B;
}

.external-link-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.25rem;
  position: relative;
  top: -1px;
}

/* ============================================================
   CLIENTS AND PROJECTS PAGE
   ============================================================ */

.work-page {
  padding: 4rem 0;
}

.work-page h1 {
  margin-bottom: 2.5rem;
}

.work-section {
  margin-bottom: 3.5rem;
}

.work-section h2 {
  margin-bottom: 0.75rem;
}

.work-section > p {
  color: var(--text-light);
  max-width: 70ch;
  margin-bottom: 1.5rem;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.client-grid li a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.15s;
}

.client-grid li a:hover {
  background: var(--lavender);
}

.client-grid li a:focus {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

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

/* ============================================================
   RESOURCES PAGE
   ============================================================ */

.resources-page {
  padding: 4rem 0;
}

.page-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}

.page-intro__text {
  order: 2;
}

.page-intro__text h1 {
  margin-bottom: 1.25rem;
}

.page-intro__text p {
  color: var(--text-light);
}

.page-intro__image {
  order: 1;
}

.page-intro__image img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4/5;
}

@media (max-width: 768px) {
  .page-intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .page-intro__image {
    order: -1;
  }

  .page-intro__image img {
    max-width: 280px;
    aspect-ratio: 1/1;
    margin: 0 auto;
  }
}

.resources-page h1 {
  margin-bottom: 2.5rem;
}

.resource-item {
  padding: 2rem 0;
}

.resource-item h2 {
  margin-bottom: 0.25rem;
}

.resource-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.resource-item p {
  color: var(--text-light);
  max-width: 70ch;
}

/* ============================================================
   SERVICES PAGE
   ============================================================ */

.services-page {
  padding: 4rem 0;
}

.services-page h1 {
  margin-bottom: 2rem;
}

.service-card {
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
}

.service-card--blue     { background: var(--blue); }
.service-card--yellow   { background: var(--yellow); }
.service-card--lavender { background: var(--lavender); }

.service-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.service-card__header h2 {
  margin: 0;
}

.service-card__header svg {
  flex-shrink: 0;
  opacity: 0.6;
  margin-top: 0.25rem;
}

.service-card p {
  color: var(--text-light);
}

.service-card ul {
  color: var(--text-light);
  margin-bottom: 1rem;
  list-style: none;
  padding-left: 0;
}

.service-card ul li {
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.service-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--navy);
}

.workshop {
  margin-top: 1.25rem;
}

.workshop h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.workshop p {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .service-card {
    padding: 1.5rem;
  }
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-intro {
  padding: 4rem 0 2rem;
}

.about-intro .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-intro__text h1 {
  margin-bottom: 1.25rem;
}

.about-intro__text {
  order: 2;
}

.about-intro__image {
  order: 1;
}

.about-intro__text p {
  color: var(--text-light);
}

.about-intro__image img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4/5;
}

.skills-section {
  padding: 2rem 0 4rem;
}

.skills-section h2 {
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .about-intro .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-intro__image {
    order: -1;
  }

  .about-intro__image img {
    max-width: 280px;
    aspect-ratio: 1/1;
    margin: 0 auto;
  }
}

/* ============================================================
   CREDITS
   ============================================================ */

.credits-section {
  background: var(--navy);
  padding: 1.25rem 0;
}

.credits-section p {
  color: rgba(255,255,255,0.7);
  font-size: 0.8125rem;
  margin: 0;
}

.credits-section a {
  color: rgba(255,255,255,0.85);
  text-decoration-color: rgba(255,255,255,0.4);
}

.credits-section a:hover,
.credits-section a:focus {
  color: var(--white);
  text-decoration-color: var(--white);
}

.credits-section a:focus {
  outline: 2px solid var(--lavender);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  text-decoration: none;
  z-index: 200;
  transition: top 0.1s;
}

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

/* Visually hidden but present in accessibility tree */
.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}
