/* Counterlight Goods — designer portfolio */
:root {
  --paper: #fbf7f0;
  --cream: #f4e9d8;
  --ink: #1b2a4a;
  --ink-soft: #3a4a66;
  --muted: #5c6778;
  --gold: #c6a15b;
  --gold-deep: #9a7a3d;
  --line: #e4d8c4;
  --line-strong: #cbbfa8;
  --dark-media: #121212;
  --white: #fffdf8;
  --focus: #1b2a4a;
  --max: 1120px;
  --header-h: 4.25rem;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--gold-deep);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: 0.5rem 0.85rem;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: var(--header-h);
  flex-wrap: wrap;
  padding: 0.65rem 0;
}

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

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

.brand img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-name {
  font-weight: 650;
  letter-spacing: 0.01em;
  font-size: 1.02rem;
  line-height: 1.2;
}

.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.nav {
  display: flex;
  gap: 1.15rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
}

.header-email,
.footer-email,
.contact-email {
  font-family: var(--sans);
  font-size: 0.86rem;
  word-break: break-all;
}

.header-email {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.header-email:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Main */
main {
  flex: 1 0 auto;
  padding-bottom: 3.5rem;
}

.page-hero {
  padding: 2.6rem 0 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.25rem;
}

.page-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

.lede {
  max-width: 40rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 650;
}

/* Sections */
.section {
  padding: 0.5rem 0 2.1rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.015em;
}

.section-head .count,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.section-intro {
  margin: -0.3rem 0 1.2rem;
  max-width: 40rem;
  color: var(--ink-soft);
}

/* Work grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.35rem 1.15rem;
}

.work-grid.patterns-home {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.pattern-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 1.75rem;
}

@media (min-width: 720px) {
  .pattern-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: transparent;
  min-width: 0;
}

.media {
  background: var(--cream);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media.tee {
  aspect-ratio: 10 / 11;
}

.media.pattern {
  aspect-ratio: 1 / 1;
}

.media.is-dark {
  background: var(--dark-media);
  border-color: #2a2a2a;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body {
  padding: 0.7rem 0.1rem 0;
}

.card-body h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card-body p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.pattern-card .card-body {
  padding-top: 0.85rem;
}

.pattern-card .card-body h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  letter-spacing: -0.015em;
}

.pattern-card .media {
  aspect-ratio: 1 / 1;
}

/* About */
.about-layout {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 800px) {
  .about-layout {
    grid-template-columns: 1.3fr 0.9fr;
    gap: 3.5rem;
    align-items: start;
  }
}

.prose h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2rem 0 0.6rem;
  letter-spacing: -0.015em;
}

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

.prose p {
  margin: 0 0 1rem;
  max-width: 40rem;
  color: var(--ink-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

.contact-panel {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.4rem 1.35rem 1.5rem;
}

.contact-panel h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.015em;
}

.contact-panel .lead {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.contact-email {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 1.35rem;
}

.contact-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

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

.store-list li {
  margin: 0 0 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.store-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.store-list a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.store-list .store-note {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.15rem;
  font-weight: 400;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--cream);
  padding: 1.6rem 0 1.8rem;
  font-size: 0.92rem;
}

.footer-inner {
  display: grid;
  gap: 1rem 2rem;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: start;
  }
}

.footer-brand {
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.site-footer p {
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
}

.site-footer h2 {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 650;
}

.footer-email {
  display: inline-block;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 0.35rem;
}

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

.footer-links li {
  margin: 0 0 0.3rem;
}

.footer-links a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  border-bottom-color: var(--line-strong);
}

.legal {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* 404 */
.error-page {
  padding: 4rem 0 3rem;
  text-align: left;
}

.error-page h1 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.4vw, 2.4rem);
  margin: 0 0 0.75rem;
}

/* Small screens */
@media (max-width: 639px) {
  .wrap {
    width: min(100% - 1.4rem, var(--max));
  }

  .header-inner {
    align-items: flex-start;
  }

  .header-end {
    align-items: flex-start;
    width: 100%;
  }

  .header-email {
    font-size: 0.8rem;
  }

  .work-grid,
  .work-grid.patterns-home {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 0.75rem;
  }

  .card-body h3 {
    font-size: 0.82rem;
  }
}

@media (max-width: 419px) {
  .work-grid,
  .work-grid.patterns-home {
    grid-template-columns: 1fr;
  }
}
