/*
Theme Name: Kindred
Theme URI: https://example.com/kindred
Author: Your Name
Description: A warm personal blog theme for travel, home and everyday life. A centred masthead, arch-framed featured stories, an about-me card, alternating story rows, topic circles and a picture strip above the footer. Light and dark modes, self-hosted fonts and one-click demo content with original artwork.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kindred
Tags: blog, food-and-drink, photography, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --bg: #fbfcfa;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --glass: #dcebe5;
  --text: #1f3b36;
  --text-2: #3f5a54;
  --muted: #687d77;
  --line: #dde7e3;
  --accent: #2d6a5f;
  --accent-ink: #ffffff;
  --highlight: #e9a23b;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w-display: 540;
  --track-display: -0.015em;
  --lh-display: 1.14;
  --radius: 16px;
  --radius-ui: 999px;
  --sticky-top: 28px;
  --entry-align: center;
  --entry-items: center;
  --footer-bg: #1f3b36;
  --footer-text: #eef4f1;
  --footer-muted: #a9c2bb;
  --footer-line: rgba(255,255,255,.14);
  --accent-hover: #1f3b36;
  --accent-hover-ink: #ffffff;
}
:root[data-theme="dark"] {
  --bg: #0f1917;
  --surface: #15221f;
  --surface-2: #1a2a26;
  --glass: #1d302b;
  --text: #e7f0ec;
  --text-2: #c2d3cd;
  --muted: #8ea59e;
  --line: #29403a;
  --accent: #8fd1bf;
  --accent-ink: #0e1b18;
  --footer-bg: #0a1210;
  --accent-hover: #e7f0ec;
  --accent-hover-ink: #0e1b18;
}

h1, h2, h3, h4, .brand__name, .kd-intro__heading { font-variation-settings: "SOFT" 100, "WONK" 0; }
body { font-size: 17.5px; }

/* ---------- Centred masthead ---------- */
.site-header { position: relative; border-bottom: 0; }
.site-header__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "social brand actions" "nav nav nav"; align-items: center; min-height: 0; padding-top: 26px; column-gap: 1rem; }
.site-header__social { grid-area: social; display: block; }
.site-header__social .social a { width: 34px; height: 34px; border: 0; }
.site-brand { grid-area: brand; justify-self: center; }
.site-header__actions { grid-area: actions; justify-self: end; margin-left: 0; }
.primary-nav { grid-area: nav; margin-top: 22px; border-block: 1px solid var(--line); }
.primary-menu { justify-content: center; gap: .6rem; padding-block: .35rem; }
.primary-menu > li > a { font-size: .9rem; font-weight: 600; letter-spacing: .01em; }
.primary-menu .current-menu-item > a, .primary-menu > li > a:hover { color: var(--text); box-shadow: inset 0 -2px 0 var(--highlight); border-radius: 0; }
.brand { flex-direction: column; gap: .35rem; }
.brand__mark { width: 30px; height: 30px; color: var(--text); }
.brand__name { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -.02em; }
@media (max-width: 1023px) {
  .site-header__inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions"; padding-block: 14px; }
  .site-header__social { display: none; }
  .site-brand { justify-self: start; min-width: 0; }
  .brand { flex-direction: row; }
  .brand__name { font-size: 1.7rem; }
}

.cat { color: var(--accent); font-size: .8rem; font-weight: 700; }
.section-title { font-weight: 520; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.kd-center { text-align: center; }
.kd-link { font-weight: 700; text-decoration: underline; text-decoration-color: var(--highlight); text-decoration-thickness: 3px; text-underline-offset: .32em; }
.kd-link:hover { color: var(--accent); }

/* ---------- Intro ---------- */
.kd-intro { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; padding-block: clamp(52px, 8vw, 104px) clamp(36px, 5vw, 60px); }
.kd-intro__heading { font-size: clamp(2.1rem, 5vw, 3.9rem); font-weight: 400; line-height: 1.08; letter-spacing: -.025em; max-width: 17ch; }
.kd-intro__text { font-size: 1.16rem; line-height: 1.6; color: var(--text-2); max-width: 50ch; }
.kd-intro__links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.6rem; margin-top: .4rem; }

/* ---------- Arch-framed featured stories ---------- */
.kd-featured__grid { display: grid; gap: clamp(28px, 3.5vw, 48px); }
@media (min-width: 760px) { .kd-featured__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kd-arch { display: flex; flex-direction: column; align-items: center; gap: 1.15rem; text-align: center; }
.kd-arch .media { width: 100%; border-radius: 50% 50% 18px 18px / 37.5% 37.5% 18px 18px; }
.kd-arch__body { display: flex; flex-direction: column; align-items: center; gap: .55rem; max-width: 32ch; }
.kd-arch__title { font-size: 1.5rem; line-height: 1.18; }
.kd-arch__title a:hover { color: var(--accent); }
.kd-arch .meta { justify-content: center; }

/* ---------- Story rows ---------- */
.kd-list { display: flex; flex-direction: column; gap: clamp(40px, 4.5vw, 60px); }
.kd-list .card-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); align-items: center; }
.kd-list .card-row .media { aspect-ratio: 4 / 3; }
.kd-list .card-row:nth-child(even) > .media { order: 2; }
.kd-list .card__title { font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.16; }
.kd-list .card__excerpt { font-size: 1rem; -webkit-line-clamp: 4; }
@media (max-width: 640px) {
  .kd-list .card-row { grid-template-columns: minmax(0, 1fr); }
  .kd-list .card-row:nth-child(even) > .media { order: 0; }
}

/* ---------- Sidebar ---------- */
.kd-about { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 1.8rem 1.5rem; border-radius: 26px; background: var(--glass); text-align: center; }
.kd-about__photo img { width: 124px; height: 124px; border-radius: 50%; object-fit: cover; border: 5px solid var(--bg); }
.kd-about__name { margin: 0; font-size: 1.45rem; }
.kd-about__text { color: var(--text-2); font-size: .98rem; }
.signup--sidebar, .signup--footer { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.signup--sidebar .signup__button { background: var(--accent); color: var(--accent-ink); }
.signup--sidebar input[type="email"] { border-color: var(--line); background: var(--bg); color: var(--text); }
.kd-topics ul { list-style: none; margin: 0; padding: 0; }
.kd-topics li a { display: flex; justify-content: space-between; gap: 1rem; }
.kd-topics__count { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Topic circles ---------- */
.kd-circles-band { background: var(--surface-2); }
.kd-circles { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(22px, 4vw, 52px); margin-top: 2rem; }
.kd-circle { display: flex; flex-direction: column; align-items: center; gap: .55rem; width: 150px; text-align: center; }
.kd-circle__img { display: block; width: 150px; height: 150px; border-radius: 50%; overflow: hidden; border: 6px solid var(--bg); box-shadow: 0 0 0 1px var(--line); }
.kd-circle__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.kd-circle:hover .kd-circle__img img { transform: scale(1.07); }
.kd-circle__name { font-family: var(--font-display); font-size: 1.2rem; font-variation-settings: "SOFT" 100; }
.kd-circle__count { font-size: .85rem; color: var(--muted); }

/* ---------- Picture strip ---------- */
.kd-strip { padding-top: clamp(44px, 6vw, 76px); }
.kd-strip__title { text-align: center; font-size: 1.45rem; margin-bottom: 1.3rem; }
.kd-strip__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 800px) { .kd-strip__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kd-strip__grid a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; }
.kd-strip__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.kd-strip__grid span { position: absolute; inset: auto 0 0; padding: 2rem .9rem .8rem; color: #fff; font-size: .88rem; font-weight: 600; line-height: 1.3; background: linear-gradient(transparent, rgba(10,24,21,.78)); opacity: 0; transition: opacity .2s; }
.kd-strip__grid a:hover img { transform: scale(1.06); }
.kd-strip__grid a:hover span, .kd-strip__grid a:focus-visible span { opacity: 1; }

/* ---------- Single ---------- */
.entry-title { font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.8rem); }
.entry-media img { border-radius: 24px; }
.entry-media { max-width: 1120px; }
.single .entry-content > p:first-of-type::first-letter { float: left; font-family: var(--font-display); font-size: 4.4em; line-height: .82; padding: .06em .12em 0 0; color: var(--accent); font-variation-settings: "SOFT" 100; }
.entry-content blockquote { border-left-color: var(--highlight); font-weight: 400; font-style: italic; }
.author-box { background: var(--glass); border-radius: 22px; }
.site-footer .brand { flex-direction: row; }
.site-footer .brand__name { font-size: 1.9rem; }
