/*
Theme Name: HomeTechPicks
Theme URI: https://hometechpicks.com
Author: HomeTechPicks
Description: Public reading UI for HomeTechPicks. Finds and articles, not a shop.
Version: 1.2.3
Text Domain: hometechpicks
*/

:root {
  --paper: #f3eee4;
  --ink: #1a1814;
  --forest: #2f5d38;
  --forest-hover: #214628;
  --clay: #c45c26;
  --card: #fffaf1;
  --paper-dark: #efe6d4;
  --meta: #5c5346;
  --rule: #d9cbb3;
  --space: 8px;
  --measure: 40rem;
  --page: 64rem;
  --sans: "Outfit", "Source Sans 3", "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--rule) 70%, transparent) 1px, transparent 0) 0 0 / 16px 16px,
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
}

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

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

a:hover {
  color: var(--forest-hover);
}

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

.skip {
  position: absolute;
  left: var(--space);
  top: -40px;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
}

.skip:focus {
  top: var(--space);
}

.wrap {
  width: min(100% - 32px, var(--page));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 32px, var(--measure));
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--paper) 90%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  padding-block: 14px 12px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.wordmark img {
  width: 32px;
  height: 32px;
}

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

.x-link {
  color: var(--meta);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.x-link:hover {
  color: var(--forest);
}

.site-nav {
  display: flex;
  gap: 4px 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-top: 14px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

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

/* Hero */

.hero {
  padding: 40px 0 8px;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 24rem;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--meta);
}

.hero-rule {
  display: block;
  width: 48px;
  height: 0;
  margin: 24px 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.hero-archive-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero--archive {
  padding: 32px 0 0;
}

.hero--archive h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
}

.hero-icon {
  width: 64px;
  height: 64px;
  flex: none;
}

.child-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 16px;
}

.child-cats a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.child-cats a:hover,
.child-cats a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--clay);
}

/* Feed */

.feed {
  display: grid;
  gap: 16px;
  padding: 36px 0 80px;
}

.empty {
  display: grid;
  justify-items: start;
  gap: 16px;
  color: var(--meta);
}

.empty img {
  width: min(100%, 280px);
  height: auto;
}

.empty p {
  margin: 0;
  font-size: 1.125rem;
}

/* Cards */

.card {
  display: grid;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px;
  transition: border-color 160ms ease;
}

@media (hover: hover) {
  .card:hover {
    border-color: var(--ink);
  }
}

.card-media {
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-dark);
  text-decoration: none;
}

.card-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
}

.card-body {
  display: grid;
  gap: 8px;
  align-content: start;
}

.card-meta {
  margin: 0;
  color: var(--meta);
  font-size: 0.8125rem;
  font-weight: 600;
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.card-title a {
  color: var(--ink);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--ink);
}

.card-excerpt {
  font-size: 1rem;
  line-height: 1.5;
}

.card-excerpt p {
  margin: 0;
}

.card-read {
  justify-self: start;
  margin-top: 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--clay);
}

.card-read:hover {
  color: var(--forest);
}

.card--feature {
  padding: 20px;
}

.card--feature .card-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

.card--feature .card-excerpt {
  font-size: 1.125rem;
}

@media (min-width: 800px) {
  .card:not(.card--feature) {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }

  .card:not(.card--feature):not(:has(.card-media)) {
    grid-template-columns: 1fr;
  }

  .card:not(.card--feature) .card-media img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: center;
  }
}

/* Article / page */

.article {
  padding: 48px 0 80px;
}

.article-meta {
  margin: 0 0 12px;
  color: var(--meta);
  font-size: 0.875rem;
}

.article h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.article-media {
  margin: 28px 0 8px;
  overflow: hidden;
  background: var(--paper-dark);
}

.article-media img {
  width: 100%;
}

.article-body {
  margin-top: 28px;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.2rem;
  line-height: 1.55;
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 1.1em;
}

.article-body h2,
.article-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
}

.article-body h2 {
  font-size: 1.6rem;
}

.article-body h3 {
  font-size: 1.3rem;
}

.article-body a {
  color: var(--forest);
}

.article-body img {
  margin: 1.2em 0;
}

.article-body blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--clay);
  color: var(--meta);
}

/* Footer */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

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

.footer-tag {
  margin: 12px 0 0;
  color: var(--meta);
  font-size: 0.875rem;
}

/* 404 */

.not-found {
  padding: 56px 0 88px;
}

.not-found h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  margin: 16px 0 20px;
}

.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
