/* ==========================================================================
   Clay Richardson — Portfolio
   Minimal, clean styling matching the live clayrichardson.com WordPress site
   ========================================================================== */

:root {
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-bg: #f4efe4;
  --color-border: #e5ddc9;
  --color-accent: #1a1a1a;
  --max-width: 1100px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-nav: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --color-nav: #9c7a3c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-text);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}

.site-header .site-logo img {
  width: 380px;
  height: auto;
}

.site-footer .site-logo img {
  height: 36px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav > ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  font-family: var(--font-nav);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-nav);
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.has-dropdown {
  position: relative;
}

.dropdown-toggle {
  font-family: var(--font-nav);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-nav);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.dropdown-toggle:hover,
.dropdown-toggle:focus-visible,
.has-dropdown.active .dropdown-toggle {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.dropdown-toggle .chevron {
  width: 10px;
  height: 10px;
  transition: transform 0.15s ease;
}

.has-dropdown.dropdown-open .dropdown-toggle .chevron,
.has-dropdown:hover .dropdown-toggle .chevron {
  transform: rotate(180deg);
}

.dropdown {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  min-width: 200px;
  display: none;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.has-dropdown:hover .dropdown,
.has-dropdown.dropdown-open .dropdown {
  display: flex;
}

.dropdown li a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-nav);
  font-weight: 400;
  color: var(--color-nav);
}

.dropdown li a:hover,
.dropdown li a:focus-visible,
.dropdown li a.active {
  color: #000000;
}

.dropdown li a:hover {
  background: #ece4d4;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 15px;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.25;
  font-weight: 500;
  max-width: 900px;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Section: work grid — three tiles side by side, matching the live site */
.work {
  padding: 72px 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.work-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.work-tile .btn-link,
.work-tile .btn-primary {
  margin-top: auto;
}

.work-eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #9c7a3c;
  margin-bottom: 4px;
  display: block;
}

.work-tile h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 20px;
}

.work-tile p {
  color: var(--color-text-muted);
  margin: 20px 0 20px;
  max-width: 40ch;
}

.work-media {
  background: #ece4d4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  margin: 0 auto;
  overflow: hidden;
}

.work-media img {
  width: 100%;
  height: auto;
}

.btn-link {
  display: inline-block;
  font-weight: 600;
  border-bottom: 2px solid var(--color-text);
  padding-bottom: 2px;
}

.btn-link:hover {
  opacity: 0.7;
}

.btn-primary {
  display: inline-block;
  background: #1c2b3a;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: 6px;
  border: 1px solid #1c2b3a;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #0f1c27;
}

.btn-primary:active {
  transform: translateY(1px);
}

/* Placeholder banner (dev-only, remove once real content/images are swapped in) */
.placeholder-note {
  background: #fff8e1;
  border: 1px solid #f0d97a;
  color: #6b5b00;
  font-size: 13px;
  padding: 10px 16px;
  text-align: center;
}

/* Page hero (sub-pages) */
.page-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--color-border);
}

.page-hero .eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 12px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  margin: 0 0 16px;
  font-weight: 600;
}

.page-hero p {
  max-width: 65ch;
  color: var(--color-text-muted);
  font-size: 18px;
}

.page-content {
  padding: 56px 0;
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 40px 0 16px;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  color: var(--color-text-muted);
  max-width: 100%;
}

.page-content ul {
  color: var(--color-text-muted);
  max-width: 100%;
}

.page-content blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--color-text);
  background: #ece4d4;
  max-width: 100%;
}

.page-content blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0 0 10px;
}

.page-content blockquote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.page-media {
  background: #ece4d4;
  border: 1px solid var(--color-border);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px 0;
  overflow: hidden;
}

.page-media img {
  width: 100%;
  height: auto;
}

.page-media.size-492 {
  max-width: 492px;
}

.page-media.size-455 {
  max-width: 455px;
}

.page-media.size-513 {
  max-width: 513px;
}

/* Image gallery for case study pages */
.page-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.page-gallery figure {
  margin: 0;
  border: 1px solid var(--color-border);
  background: #ece4d4;
  overflow: hidden;
}

.page-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.page-gallery figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--color-text-muted);
  background: #ece4d4;
  border-top: 1px solid var(--color-border);
}

.page-gallery .span-2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .page-gallery .span-2 {
    grid-column: span 1;
  }
}

/* Contact form */
.contact-form {
  max-width: 560px;
  margin-top: 24px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  margin-bottom: 20px;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form button {
  background: var(--color-text);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.contact-form button:hover {
  opacity: 0.85;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
  margin-top: 40px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-footer nav a {
  font-size: 14px;
  color: var(--color-text-muted);
}

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

.site-footer .copyright {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}

@media (max-width: 760px) {
  .site-header .site-logo img {
    width: 220px;
  }
  .site-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .site-header.nav-open .site-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .site-header.nav-open .site-nav > ul {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
  .dropdown {
    position: static;
    border: none;
    box-shadow: none;
    padding-left: 12px;
  }
  .has-dropdown:hover .dropdown {
    display: none;
  }
  .has-dropdown.dropdown-open .dropdown {
    display: flex;
  }
  .hero {
    padding: 56px 0 40px;
  }
}

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