/*
Theme Name: Driftwood
Theme URI: https://example.com/driftwood
Author: Your Name
Author URI: https://example.com
Description: A travel and slow-living journal theme. A floating navigation bar sits over a full-bleed hero photograph, split sections pair a narrow heading column with a wide card grid, a grey author block introduces the writer, and a bright colour band closes the page above a three-column footer of location, social links and newsletter. Playfair Display and Roboto, 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: driftwood
Tags: blog, news, magazine, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template
*/

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f8f8;
  --text: #111111;
  --text-2: #525252;
  --muted: #999999;
  --line: #e7e7e7;
  --accent: #3685fc;
  --accent-ink: #ffffff;
  --accent-hover: #111111;
  --accent-hover-ink: #ffffff;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w-display: 700;
  --lh-display: 1.22;
  --track-display: 0;

  --radius: 2px;
  --radius-ui: 2px;
  --wrap: 1240px;
  --footer-bg: #ffffff;
  --footer-text: #111111;
  --footer-muted: #808080;
  --footer-line: #e7e7e7;
  --overlay: linear-gradient(180deg, rgba(10,12,16,0) 34%, rgba(10,12,16,.72) 100%);

  --dw-lift: 0 4px 14px rgba(10,14,28,.13), 0 20px 30px -22px rgba(10,14,28,.24);
}
:root[data-theme="dark"] {
  --bg: #101214;
  --surface: #171a1d;
  --surface-2: #1b1f22;
  --text: #f1f3f5;
  --text-2: #bcc2c7;
  --muted: #8b9298;
  --line: #262b2f;
  --accent: #5e9dff;
  --accent-ink: #0b0d0f;
  --accent-hover: #f1f3f5;
  --accent-hover-ink: #0b0d0f;
  --footer-bg: #101214;
  --footer-text: #f1f3f5;
  --footer-muted: #8b9298;
  --footer-line: #262b2f;
  --dw-lift: 0 4px 14px rgba(0,0,0,.5), 0 20px 30px -22px rgba(0,0,0,.7);
}

body { font-size: 15px; line-height: 1.7; }
h1, h2, h3, h4, .card__title, .mini__title, .entry-title, .section-title { font-family: var(--font-display); }
.brand__name { font-family: var(--font-display); font-weight: 500; font-size: 1.55rem; letter-spacing: 0; }
.meta, .primary-menu a, .mobile-menu a, .section-link, .widget-title, .btn, .cat { font-family: var(--font-ui); }

/* Plain blue uppercase category labels, as the journal uses throughout. */
.cat {
  background: none; color: var(--accent); padding: 0; border-radius: 0;
  font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
}
.cat:hover { color: var(--text); text-decoration: none; }
.meta { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meta__author, .meta__read, .meta__comments, .meta__views { text-transform: none; letter-spacing: 0; }
.meta__avatar { width: 20px; height: 20px; }

/* ---------- Floating navigation bar over the hero ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header__inner { min-height: 72px; gap: 1.8rem; }
.primary-menu { gap: .1rem; }
.primary-menu > li > a { font-size: .96rem; font-weight: 400; color: var(--text); padding: .5rem .85rem; }
.primary-menu > li > a:hover { background: none; color: var(--accent); }
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a { background: none; color: var(--accent); }
.site-header__actions .icon-btn { color: var(--text); }
.site-header__actions .icon-btn:hover { background: none; color: var(--accent); }

.home:not(.paged) .site-header {
  position: absolute; top: 26px; left: 0; right: 0; z-index: 60;
  background: transparent; border-bottom: 0;
}
.home:not(.paged) .site-header__inner {
  background: var(--surface); padding-inline: 30px; min-height: 78px;
  box-shadow: 0 2px 10px rgba(8,12,24,.1), 0 18px 34px -26px rgba(8,12,24,.3);
}
.home:not(.paged) .search-panel { background: var(--surface); margin-inline: auto; max-width: var(--wrap); }
@media (max-width: 860px) {
  .home:not(.paged) .site-header { position: relative; top: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  .home:not(.paged) .site-header__inner { background: transparent; box-shadow: none; padding-inline: 20px; min-height: 64px; }
  .home:not(.paged) .dw-hero__inner { padding-top: clamp(34px, 7vw, 62px); }
}

/* ---------- Full-bleed hero ---------- */
.dw-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(470px, 56vw, 800px);
  display: flex; background: var(--text);
}
.dw-hero__bg { position: absolute; inset: 0; z-index: 0; }
.dw-hero__img { width: 100%; height: 100%; object-fit: cover; }
.dw-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,14,.44) 0%, rgba(8,10,14,.34) 44%, rgba(8,10,14,.62) 100%); }
.dw-hero__inner {
  position: relative; z-index: 2; display: flex; flex-direction: column;
  padding-top: clamp(130px, 15vw, 190px); padding-bottom: clamp(26px, 4vw, 58px);
}
.dw-hero__lead { text-align: center; margin: auto 0; max-width: 980px; margin-inline: auto; }
.dw-hero__kicker {
  display: inline-block; font-family: var(--font-display); font-size: 1.05rem;
  color: rgba(255,255,255,.92); margin-bottom: .7rem;
}
.dw-hero__kicker:hover { color: #fff; text-decoration: underline; text-underline-offset: .22em; }
.dw-hero__title {
  font-family: var(--font-display); font-weight: 500; text-transform: uppercase;
  font-size: clamp(1.6rem, 3.9vw, 3.3rem); line-height: 1.18; letter-spacing: .005em;
  color: #fff; text-shadow: 0 2px 22px rgba(0,0,0,.34);
}
.dw-hero__title a { color: #fff; }
.dw-hero__title a:hover { text-decoration: underline; text-underline-offset: .14em; }

.dw-hero__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 42px); margin-top: auto; }
.dw-hcard { display: grid; grid-template-columns: 98px minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.dw-hcard__thumb { display: block; overflow: hidden; background: rgba(255,255,255,.14); aspect-ratio: 16 / 9; }
.dw-hcard__img { width: 100%; height: 100%; object-fit: cover; }
.dw-hcard__title { font-family: var(--font-ui); font-weight: 400; font-size: .95rem; line-height: 1.4; color: #fff; }
.dw-hcard__title a { color: #fff; }
.dw-hcard__title a:hover { text-decoration: underline; text-underline-offset: .18em; }
.dw-hcard__more { display: inline-block; margin-top: .7rem; font-family: var(--font-ui); font-size: .88rem; color: rgba(255,255,255,.95); }
.dw-hcard__more::before { content: ""; display: block; width: 22px; height: 1px; background: rgba(255,255,255,.65); margin-bottom: .55rem; }
.dw-hcard__more:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 900px) { .dw-hero__cards { grid-template-columns: 1fr 1fr; gap: 16px; } .dw-hcard:nth-child(n+3) { display: none; } }
@media (max-width: 600px) { .dw-hero__cards { grid-template-columns: 1fr; } .dw-hcard:nth-child(n+2) { display: none; } }

/* ---------- Shared card grid ---------- */
.dw-cards { grid-template-columns: repeat(var(--dw-cols, 3), minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.dw-cards .card, .dw-grid .card { gap: 1.1rem; }
.dw-cards .media, .dw-grid .media { aspect-ratio: 7 / 5; border-radius: 0; box-shadow: var(--dw-lift); }
.dw-cards .card__body, .dw-grid .card__body { gap: .5rem; }
.dw-cards .card__title, .dw-grid .card__title { font-size: 1.22rem; font-weight: 700; line-height: 1.32; }
.dw-cards .card__title a:hover, .dw-grid .card__title a:hover { color: var(--accent); }
.dw-cards .meta, .dw-grid .meta { order: 2; }
.dw-cards .card__excerpt, .dw-grid .card__excerpt { order: 3; font-size: .9rem; color: var(--text-2); -webkit-line-clamp: 2; }
@media (max-width: 760px) { .dw-cards { grid-template-columns: 1fr; } }

/* ---------- Split section: heading left, cards right ---------- */
.dw-split { padding-block: clamp(42px, 5.6vw, 86px); }
.dw-split__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); gap: clamp(26px, 4.6vw, 70px); align-items: start; }
.dw-split__title { font-size: clamp(1.7rem, 2.9vw, 2.55rem); font-weight: 500; }
.dw-split__desc { margin-top: 1.1rem; font-size: .92rem; line-height: 1.85; color: var(--text-2); max-width: 36ch; }
.dw-more {
  display: inline-block; margin-top: 1.7rem; font-family: var(--font-ui); font-size: .9rem;
  color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: .2rem;
}
.dw-more:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 900px) { .dw-split__inner { grid-template-columns: 1fr; } }

/* ---------- Grey author block ---------- */
.dw-author { background: var(--surface-2); padding-block: clamp(52px, 7vw, 104px); overflow: hidden; }
.dw-author__wrap { position: relative; }
.dw-linework { position: absolute; right: -2%; top: -6%; width: min(430px, 46%); height: auto; color: var(--text); opacity: .07; pointer-events: none; }
[data-theme="dark"] .dw-linework { opacity: .1; }
.dw-author__inner { position: relative; z-index: 1; max-width: 690px; margin-left: auto; }
.dw-author__kicker { font-family: var(--font-display); font-size: 1.02rem; color: var(--text-2); margin-bottom: .35rem; }
.dw-author__name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 3vw, 2.45rem); margin-bottom: 1.5rem; }
.dw-author__text { font-size: .92rem; line-height: 1.95; color: var(--text-2); }
.dw-author__text + .dw-author__text { margin-top: 1.35rem; }
.dw-author__sign { margin-top: 1.9rem; font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(1.3rem, 2.1vw, 1.7rem); color: var(--muted); }
@media (max-width: 900px) { .dw-author__inner { max-width: none; margin-left: 0; } }

/* ---------- Centred heading above a card row ---------- */
/* ---------- Route timeline: numbered stops on a vertical line ---------- */
.dw-route { padding-block: clamp(42px, 5.6vw, 86px); }
.dw-route__head { max-width: 620px; margin-bottom: clamp(26px, 3.4vw, 46px); }
.dw-route__title { font-size: clamp(1.7rem, 2.9vw, 2.35rem); font-weight: 700; }
.dw-route__desc { margin-top: .9rem; font-size: .92rem; line-height: 1.85; color: var(--text-2); }
.dw-route__list { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.dw-stop {
  position: relative; display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: clamp(16px, 2.2vw, 28px);
  padding-bottom: clamp(22px, 3vw, 36px);
}
.dw-stop::before {
  content: ""; position: absolute; left: 20px; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.dw-stop:last-child::before { bottom: auto; height: 21px; }
.dw-stop__num {
  position: relative; z-index: 1; width: 42px; height: 42px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg);
  font-family: var(--font-ui); font-weight: 700; font-size: .8rem;
  font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--accent);
}
.dw-stop.is-now .dw-stop__num {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.dw-stop__body { padding-top: 7px; min-width: 0; }
.dw-stop__place {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.08rem, 1.8vw, 1.4rem); line-height: 1.3;
}
.dw-stop__place a { color: var(--text); }
.dw-stop__place a:hover { color: var(--accent); }
.dw-stop__note {
  margin: .45rem 0 0; font-family: var(--font-body); font-size: .9rem;
  line-height: 1.8; color: var(--text-2);
}
@media (max-width: 560px) {
  .dw-stop { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
  .dw-stop::before { left: 16px; }
  .dw-stop__num { width: 34px; height: 34px; font-size: .72rem; }
  .dw-stop:last-child::before { height: 17px; }
  .dw-stop__body { padding-top: 3px; }
}

.dw-centre { padding-block: clamp(42px, 5.6vw, 86px); }
.dw-centre__head { text-align: center; max-width: 660px; margin: 0 auto clamp(30px, 4vw, 58px); }
.dw-centre__title { font-size: clamp(1.7rem, 2.9vw, 2.35rem); font-weight: 700; }
.dw-centre__desc { margin-top: .9rem; font-size: .92rem; line-height: 1.85; color: var(--text-2); }

/* ---------- Photograph band + bright colour band ---------- */
.dw-bandwrap { margin-top: clamp(16px, 2.4vw, 34px); }
.dw-photoband { position: relative; isolation: isolate; overflow: hidden; background: var(--text); display: flex; align-items: flex-end; min-height: clamp(240px, 31vw, 450px); }
.dw-photoband__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.dw-photoband__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,10,14,.1) 0%, rgba(8,10,14,.18) 50%, rgba(8,10,14,.5) 100%); }
.dw-photoband__inner { position: relative; z-index: 2; padding-bottom: clamp(18px, 2.6vw, 36px); }
.dw-photoband__title { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: clamp(1.6rem, 2.9vw, 2.35rem); text-shadow: 0 2px 18px rgba(0,0,0,.35); }

.dw-band { background: var(--accent); color: #fff; padding-block: clamp(30px, 3.8vw, 52px); }
.dw-band__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); gap: clamp(24px, 4.6vw, 70px); align-items: start; }
.dw-band__desc { font-size: .9rem; line-height: 1.85; color: rgba(255,255,255,.92); }
.dw-band__more { display: inline-block; margin-top: 1.2rem; font-family: var(--font-ui); font-size: .86rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: .15rem; }
.dw-band__more:hover { border-color: #fff; }
.dw-band__cols { display: grid; grid-template-columns: repeat(var(--dw-cols, 3), minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 30px); }
.dw-bandpost { display: flex; flex-direction: column; gap: .4rem; }
.dw-bandpost__cat { font-family: var(--font-ui); font-size: .64rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.dw-bandpost__cat:hover { color: #fff; }
.dw-bandpost__title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.34; color: #fff; }
.dw-bandpost__title a { color: #fff; }
.dw-bandpost__title a:hover { text-decoration: underline; text-underline-offset: .16em; }
.dw-bandpost__date { font-family: var(--font-ui); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.dw-bandpost__excerpt { font-size: .84rem; line-height: 1.6; color: rgba(255,255,255,.86); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .dw-band__inner { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .dw-band__cols { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- Three-column footer block ---------- */
.dw-footer { background: var(--bg); padding-block: clamp(46px, 6vw, 86px) clamp(32px, 4vw, 56px); }
.dw-footer__cols { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: clamp(28px, 4vw, 60px); }
.dw-footer__heading { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin-bottom: 1.4rem; }
.dw-footer__note { margin-top: .6rem; font-size: .82rem; line-height: 1.7; color: var(--muted); }

.dw-map { position: relative; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 16 / 10; overflow: hidden; color: var(--muted); }
.dw-map__art { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.dw-map__pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--accent); }
.dw-map__place { margin-top: .9rem; text-align: center; font-family: var(--font-ui); font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

.dw-socials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 30px) .5rem; }
.dw-socials__item a { display: grid; justify-items: center; gap: .6rem; color: var(--text); }
.dw-socials__item a:hover { color: var(--accent); }
.dw-socials__label { font-family: var(--font-ui); font-size: .74rem; color: var(--muted); }
.dw-socials__item a:hover .dw-socials__label { color: var(--accent); }

.signup--dwfoot { gap: .9rem; }
.signup--dwfoot .signup__title { display: none; }
.signup--dwfoot .signup__desc { font-size: .85rem; line-height: 1.75; color: var(--text-2); }
.signup--dwfoot .signup__form { flex-direction: column; gap: .6rem; }
.signup--dwfoot .signup__form input[type="email"] { width: 100%; padding: .72rem .9rem; border: 1px solid var(--line); background: var(--surface); }
.signup--dwfoot .signup__button { width: 100%; justify-content: center; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-ui); padding: .72rem 1rem; font-size: .84rem; }
.signup--dwfoot .signup__button:hover { background: var(--accent-hover); color: var(--accent-hover-ink); }
@media (max-width: 860px) { .dw-footer__cols { grid-template-columns: 1fr; } }

/* ---------- Thin credit bar ---------- */
.site-footer { margin-top: 0; padding-block: 0; border-top: 1px solid var(--line); }
.site-footer__top { display: none; }
.site-footer__bottom { margin-top: 0; padding-block: 1.1rem; border-top: 0; }
.site-footer__copy { color: var(--muted); font-size: .78rem; }
.site-footer .to-top { color: var(--accent); font-size: .78rem; }

/* ---------- Article + archive polish ---------- */
.entry-title { font-weight: 700; }
.entry-content { font-size: 1.04rem; line-height: 1.85; }
.entry-content blockquote { border-left: 2px solid var(--accent); font-family: var(--font-display); font-style: italic; }
.page-title { font-weight: 700; }
.widget-title { font-family: var(--font-display); font-weight: 700; border-bottom-width: 1px; border-color: var(--line); }
.btn { border-radius: var(--radius-ui); }
.card__title a:hover, .mini__title a:hover { color: var(--accent); }
