/* ----------------------------------------------------------------------------
   jamesstokes.com — editorial single-pager.
   Type: Bitter (Google Fonts). Palette: warm cream + warm ink.
---------------------------------------------------------------------------- */

:root {
  --bg:           #f9f8f4;
  --bg-deep:      #f4f0e6;
  --card-bg:      #edebe3;
  --ink:          #141414;
  --ink-soft:     #344054;
  --body:         #475467;
  --muted:        #667085;
  --rule:         #f2f4f7;
  --rule-strong:  #eaecf0;
  --border-soft:  #d0d5dd;
  --accent:       #c87151;
  --accent-hi:    #b65431;
  --accent-tint:  #f4ebff;
  --accent-lilac: #d6bbfb;
  --accent-on:    #ffffff;

  --font-serif: "Bitter", Georgia, "Times New Roman", serif;

  --max:       80rem;
  --max-narrow: 48rem;

  --space-1:   0.5rem;
  --space-2:   1rem;
  --space-3:   1.5rem;
  --space-4:   2rem;
  --space-5:   3rem;
  --space-6:   4.5rem;
  --space-7:   6rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 120ms ease;
}
a:hover { text-decoration-color: var(--ink); }

/* --- layout helpers ------------------------------------------------------ */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}
.wrap--narrow { max-width: var(--max-narrow); }
@media (max-width: 760px) { .wrap { padding: 0 1rem; } }

/* --- typography ---------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.3;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
}

p { margin: 0 0 1.1rem; }

.kicker {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.lede,
.lead {
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--body);
}

.hero .lede,
.pull-quote {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--body);
}
.pull-quote {
  margin: 0.5rem 0 1.5rem;
}

/* --- header / nav -------------------------------------------------------- */

.site-header {
  min-height: 5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  padding-left: 4rem;
}
@media (max-width: 760px) {
  .nav { padding-left: 0; }
}
.nav__link {
  padding: 0.75rem 1rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--body);
  text-decoration: none;
  transition: color 300ms ease;
}
.nav__link:hover,
.nav__link[aria-current="page"] { color: var(--ink-soft); }

/* Platforms dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--body);
  transition: color 300ms ease;
}
.nav-dropdown__toggle:hover { color: var(--ink-soft); }
.nav-dropdown__toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 200ms ease;
}
.nav-dropdown[open] > .nav-dropdown__toggle svg { transform: rotate(180deg); }

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 26rem;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--rule-strong);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px -8px rgba(20, 20, 20, 0.12), 0 2px 6px -2px rgba(20, 20, 20, 0.06);
  display: none;
  z-index: 10;
}
.nav-dropdown[open] .nav-dropdown__menu { display: block; }

.nav-dropdown__item {
  display: flex;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 0.5rem;
  transition: background-color 200ms ease;
}
.nav-dropdown__item:hover { background: var(--card-bg); }
.nav-dropdown__item-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.2rem;
  color: var(--accent);
}
.nav-dropdown__item-heading {
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
}
.nav-dropdown__item-desc {
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.5;
  margin-top: 0.15rem;
}

@media (max-width: 620px) {
  .nav-dropdown__menu { min-width: calc(100vw - 2rem); left: -1rem; }
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.125rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 hsla(220, 43%, 11%, 0.05);
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-on);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
}

.btn--secondary {
  background: #ffffff;
  color: var(--ink-soft);
  border-color: var(--border-soft);
}
.btn--secondary:hover {
  background: var(--card-bg);
  color: #1d2939;
}

.btn--large {
  padding: 1rem 1.75rem;
  font-size: 1.125rem;
  font-weight: 400;
  gap: 0.75rem;
}
@media (max-width: 760px) {
  .btn--large {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    gap: 0.5rem;
  }
}

.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2rem;
}
.button-row--center { justify-content: flex-start; margin-top: 0; }
.hero .button-row { justify-content: center; }

@media (max-width: 460px) {
  .button-row { width: 100%; }
  .btn { flex: 1 1 auto; text-align: center; }
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  padding: 6rem 0;
  text-align: center;
}
.hero .wrap { max-width: 64rem; }
.hero h1 { margin: 0 0 1rem; }
.hero .pull-quote,
.hero .lede {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}
.hero .lede { margin-bottom: 0; }
@media (max-width: 760px) {
  .hero { padding: 4rem 0; }
}

/* --- about --------------------------------------------------------------- */

.about {
  padding: 7rem 0;
  border-top: 1px solid var(--rule);
}
.about .wrap {
  max-width: 80rem;
}
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr);
  gap: 4rem;
  align-items: center;
}
.about__photo {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 33rem;
  overflow: hidden;
}
.about__photo img {
  position: absolute;
  left: 3rem;
  top: auto;
  right: auto;
  bottom: auto;
  width: 166%;
  max-width: none;
  min-width: 0;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  object-position: 0% 50%;
  border: 0.25rem solid var(--accent-tint);
  border-radius: 1rem;
  display: block;
}
@media (max-width: 991px) {
  .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
  .about__photo img { left: 2rem; }
}
@media (max-width: 760px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about__photo {
    min-height: auto;
    overflow: visible;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
  }
  .about__photo img {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: 28rem;
  }
}

/* --- work with james ---------------------------------------------------- */

.work {
  padding: 7rem 0;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.work .wrap { max-width: 80rem; }
.work__intro {
  max-width: 48rem;
  margin-bottom: 4rem;
}
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}
@media (max-width: 991px) {
  .work__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .work__grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.card {
  background: var(--card-bg);
  border: none;
  border-radius: 1.2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}
.card h3 { margin-bottom: 0.5rem; color: var(--ink); }
.card__lead {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}
.card p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--body);
}
.card__price {
  margin: 0;
  padding-top: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

/* --- contact form ------------------------------------------------------- */

.legal {
  padding: 6rem 0;
}
.legal .wrap--narrow { max-width: 44rem; }
.legal h1 {
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.legal h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1rem;
}
.legal .meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 3rem;
}
.legal section {
  margin-bottom: 3rem;
}
.legal section:last-child { margin-bottom: 0; }
.legal p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--body);
  margin: 0 0 1rem;
}
.legal ul {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--body);
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.legal li { margin-bottom: 0.5rem; }
.legal a {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.legal a:hover { text-decoration-color: var(--accent-hi); }
.legal strong { color: var(--ink); font-weight: 600; }

.notfound {
  padding: 7rem 0;
  text-align: center;
}
.notfound .wrap { max-width: 48rem; }
.notfound h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 600;
  margin-bottom: 1rem;
}
.notfound .lede {
  max-width: 36rem;
  margin: 0 auto 2rem;
}
.notfound .button-row { justify-content: center; }

.contact {
  padding: 7rem 0;
  text-align: center;
}
.contact .wrap { max-width: 48rem; }
.contact h1 {
  font-size: clamp(2rem, 4.4vw, 2.6rem);
  font-weight: 600;
}
.contact .lede {
  max-width: 36rem;
  margin: 0 auto;
}

.contact-form {
  margin: 3rem auto 0;
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.5;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  color: var(--ink);
  border-radius: 0.5rem;
  outline: none;
  box-shadow: 0 1px 2px 0 hsla(220, 43%, 11%, 0.05);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent-lilac);
  box-shadow: 0 1px 2px 0 hsla(220, 43%, 11%, 0.05), 0 0 0 4px var(--accent-tint);
}
.field textarea { min-height: 11rem; resize: vertical; }
.field--actions { margin-top: 0.5rem; }
.contact-form .btn { width: 100%; }

/* Honeypot — must be off-screen but not display:none (bots skip those). */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
}
.form-status:empty { display: none; }
.form-status--success {
  background: var(--card-bg);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.form-status--error {
  background: #fdf3ee;
  color: #7a3520;
  border: 1px solid #f3d4c4;
}

/* --- footer ------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--bg);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
