/*
Theme Name: Geriatric Traveller
Description: Maura Ward's travel diary. Early-2000s homely travel blog, built modern: fast, accessible, readable.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: geriatric
*/

:root {
  --paper: #fffdf7;
  --page: #f4ecdc;
  --ink: #2a2420;
  --muted: #6b5f52;
  --line: #e2d4b5;
  --line-strong: #c9b48a;
  --red: #c8372d;
  --red-dark: #9e2a22;
  --link: #135f86;
  --link-hover: #c8372d;
  --sky-top: #7fbbe4;
  --sky-bottom: #d9eefa;
  --box-head-top: #f6e7c4;
  --box-head-bottom: #ead4a1;
  --tape: rgba(255, 238, 170, .78);
  --serif: Georgia, "Times New Roman", serif;
  --ui: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --wrap: 1180px;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(60, 40, 10, .08), 0 6px 18px rgba(60, 40, 10, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--page);
  /* Faint linen dots, like old tiled blog backgrounds, without the image request */
  background-image: radial-gradient(rgba(160, 130, 80, .10) 1px, transparent 1px);
  background-size: 6px 6px;
  font: 19px/1.7 var(--serif);
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 14px; border: 2px solid var(--ink); font: 16px var(--ui); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Header: a sky with clouds ---------- */
.site-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
}
.site-header::before, .site-header::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #fff;
  opacity: .85;
  box-shadow: 40px -14px 0 6px #fff, 86px 0 0 -2px #fff;
}
.site-header::before { width: 90px; height: 34px; top: 34px; left: 7%; }
.site-header::after { width: 70px; height: 26px; top: 92px; right: 12%; opacity: .7; }
.cloud-3 { position: absolute; width: 60px; height: 22px; top: 22px; left: 58%; border-radius: 999px; background: #fff; opacity: .6; box-shadow: 30px -10px 0 4px #fff, 64px 0 0 -2px #fff; }
.header-inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-top: 26px; padding-bottom: 18px; }
.site-logo img { display: block; width: min(420px, 78vw); height: auto; filter: drop-shadow(0 2px 0 rgba(255, 255, 255, .6)); }
.site-tagline { margin: 0; max-width: 430px; font: 600 29px/1.15 var(--hand); color: #1d3f5a; transform: rotate(-2deg); text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.site-tagline small { display: block; margin-top: 6px; font: 15px/1.4 var(--ui); color: #2c516e; transform: rotate(2deg); text-shadow: none; }

/* Airmail stripe */
.airmail { height: 8px; background: repeating-linear-gradient(135deg, var(--red) 0 14px, #fff 14px 22px, #1f5f9e 22px 36px, #fff 36px 44px); }

/* ---------- Tab navigation ---------- */
.site-nav { background: linear-gradient(180deg, #efe2c4, var(--page)); border-bottom: 1px solid var(--line-strong); }
.site-nav ul { list-style: none; margin: 0; padding: 12px 0 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.site-nav li { flex: none; }
.site-nav a {
  display: block;
  padding: 9px 18px 8px;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(180deg, #fffaf0, #f3e6c8);
  color: #4a3a28;
  font: bold 15px/1.2 var(--ui);
  text-decoration: none;
  letter-spacing: .02em;
}
.site-nav a:hover { background: #fff; color: var(--red); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a, .site-nav .is-home > a { position: relative; top: 1px; background: var(--paper); color: var(--red-dark); }

/* ---------- Layout ---------- */
.site-main { padding: 28px 0 56px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; }
.paper { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Welcome postcard ---------- */
.postcard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px;
  padding: 30px 32px;
  margin-bottom: 30px;
  background: linear-gradient(180deg, #fffef9, #fdf6e6);
}
.postcard::after { content: ""; position: absolute; top: 28px; bottom: 28px; left: calc(57.4% - 14px); border-left: 1px dashed var(--line-strong); }
.postcard__greeting { margin: 0 0 6px; font: 600 38px/1.1 var(--hand); color: var(--red); }
.postcard p { margin: 0 0 14px; }
.postcard__sign { font: 600 30px/1 var(--hand); color: #1d3f5a; }
.postcard__right { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stamp { position: absolute; z-index: 2; top: -14px; right: -10px; width: 74px; padding: 6px; background: #fff; border: 2px dashed #d9c49a; transform: rotate(4deg); text-align: center; font: bold 11px/1.25 var(--ui); color: var(--red); text-transform: uppercase; letter-spacing: .05em; }
.stamp b { display: block; font-size: 26px; line-height: 1; }
.postmark { position: absolute; z-index: 2; bottom: 4px; left: 0; width: 92px; height: 92px; border: 2px solid rgba(31, 95, 158, .55); border-radius: 50%; display: grid; place-items: center; text-align: center; font: bold 10px/1.3 var(--ui); color: rgba(31, 95, 158, .75); text-transform: uppercase; letter-spacing: .08em; transform: rotate(-14deg); }

/* ---------- Polaroids ---------- */
.polaroid { display: inline-block; position: relative; margin: 0; padding: 10px 10px 12px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 10px 20px rgba(60, 40, 10, .12); transform: rotate(-1.6deg); }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #eee3cc; }
.polaroid figcaption { margin-top: 8px; text-align: center; font: 600 22px/1.15 var(--hand); color: #3a2f25; }
.polaroid::before { content: ""; position: absolute; top: -12px; left: 50%; width: 96px; height: 26px; margin-left: -48px; background: var(--tape); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.polaroid--tilt-r { transform: rotate(1.8deg); }
.polaroid--portrait img { aspect-ratio: 3 / 4; }
a.polaroid { color: inherit; text-decoration: none; transition: transform .15s ease; }
a.polaroid:hover { transform: rotate(0) scale(1.02); color: inherit; }

/* ---------- Section headings ---------- */
.section-title { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font: bold 15px/1.2 var(--ui); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.section-title::after { content: ""; flex: 1; border-top: 3px double var(--line-strong); }

.scrapbook { align-items: start; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 22px; margin-bottom: 38px; padding: 6px 4px 0; }

/* ---------- Post list (the diary) ---------- */
.date-header { margin: 0 0 10px; font: bold 13px/1.2 var(--ui); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.entry-card { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; padding: 26px 28px; margin-bottom: 26px; }
.entry-card:nth-of-type(even) .polaroid { transform: rotate(1.6deg); }
.entry-card .polaroid { width: 100%; align-self: start; }
.entry-card p, .entry-content, .box__body { overflow-wrap: break-word; }
.entry-card__title { margin: 0 0 8px; font: bold 28px/1.2 var(--serif); }
.entry-card__title a { color: var(--red-dark); text-decoration: none; }
.entry-card__title a:hover { text-decoration: underline; }
.entry-card p { margin: 0 0 14px; }
.more-link { display: inline-block; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff6e2; font: bold 15px/1.3 var(--ui); text-decoration: none; color: var(--red-dark); }
.more-link:hover { background: var(--red); border-color: var(--red); color: #fff; }
.entry-meta { margin-top: 14px; padding-top: 10px; border-top: 1px dotted var(--line-strong); font: 14px/1.5 var(--ui); color: var(--muted); }
.entry-meta a { color: inherit; }

.no-photo { display: grid; place-items: center; aspect-ratio: 4 / 3; background: repeating-linear-gradient(135deg, #f7ecd4 0 10px, #f2e3c3 10px 20px); font: 600 26px var(--hand); color: #8a7351; text-align: center; padding: 10px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 10px; font: bold 16px var(--ui); }
.pagination a { display: inline-block; padding: 10px 18px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow); }
.pagination .page-count { align-self: center; color: var(--muted); font-weight: normal; }

.archive-header { padding: 22px 28px; margin-bottom: 26px; }
.archive-header h1 { margin: 0; font: bold 30px/1.2 var(--serif); color: var(--red-dark); }
.archive-header p { margin: 6px 0 0; color: var(--muted); font: 16px/1.5 var(--ui); }

/* ---------- Single post / page ---------- */
.entry { padding: 34px 44px 38px; }
.entry-title { margin: 0 0 10px; font: bold clamp(32px, 4vw, 44px)/1.15 var(--serif); color: var(--red-dark); }
.entry-byline { margin: 0 0 24px; font: 15px/1.5 var(--ui); color: var(--muted); }
.entry-hero { display: block; width: min(560px, 100%); margin: 6px auto 30px; }
.entry-content { font-size: 20px; line-height: 1.75; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.6em 0 .5em; font-family: var(--serif); color: var(--red-dark); line-height: 1.25; }
.entry-content h2 { font-size: 30px; }
.entry-content h3 { font-size: 25px; }
.entry-content img { display: block; margin: 1.4em auto; padding: 8px; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 8px 18px rgba(60, 40, 10, .10); }
.entry-content img.aligncenter, .entry-content img.alignnone, .entry-content .aligncenter img { width: 100%; max-width: 640px; }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 45%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 45%; }
.entry-content .wp-caption { max-width: 100%; margin: 1.4em auto; text-align: center; }
.entry-content .wp-caption-text, .entry-content figcaption { font: 600 22px/1.2 var(--hand); color: var(--muted); }
.entry-content blockquote { margin: 1.4em 0; padding: 12px 22px; border-left: 4px solid var(--red); background: #fff6e2; font-style: italic; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content table { width: 100%; border-collapse: collapse; font: 16px/1.5 var(--ui); }
.entry-content td, .entry-content th { border: 1px solid var(--line); padding: 8px 10px; }
.entry-content iframe { max-width: 100%; }
.entry-content::after { content: ""; display: block; clear: both; }

.entry-tags { margin-top: 26px; font: 15px/1.6 var(--ui); color: var(--muted); }
.entry-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; text-decoration: none; }

.author-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 34px; padding: 22px 24px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: #fff9ec; }
.author-card .polaroid { padding: 6px 6px 8px; }
.author-card h2 { margin: 0 0 4px; font: 600 30px/1.1 var(--hand); color: var(--red); }
.author-card p { margin: 0 0 8px; font-size: 17px; line-height: 1.6; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; font: 16px/1.4 var(--ui); }
.post-nav a { display: block; height: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-decoration: none; box-shadow: var(--shadow); }
.post-nav span { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.post-nav .next { text-align: right; }

.related { margin-top: 38px; }
.related-grid { align-items: start; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 8px; }

/* ---------- Sidebar boxes ---------- */
.sidebar { display: grid; gap: 24px; }
.box { overflow: hidden; }
.box__head { margin: 0; padding: 9px 14px; background: linear-gradient(180deg, var(--box-head-top), var(--box-head-bottom)); border-bottom: 1px solid var(--line-strong); font: bold 14px/1.3 var(--ui); text-transform: uppercase; letter-spacing: .1em; color: #5a4325; }
.box__body { padding: 16px; font-size: 17px; line-height: 1.6; }
.box__body p { margin: 0 0 10px; }
.box--hello .polaroid { display: block; width: 78%; margin: 6px auto 16px; }
.box ul { list-style: none; margin: 0; padding: 0; }
.labels li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dotted var(--line); font: 16px/1.4 var(--ui); }
.labels li:last-child { border: 0; }
.labels .count { color: var(--muted); }
.blog-archive details { border-bottom: 1px dotted var(--line); }
.blog-archive details:last-child { border: 0; }
.blog-archive summary { cursor: pointer; padding: 6px 0; font: bold 16px/1.4 var(--ui); color: #4a3a28; }
.blog-archive summary span { font-weight: normal; color: var(--muted); }
.blog-archive details ul { padding: 0 0 8px 14px; }
.blog-archive details li { padding: 3px 0; font: 15px/1.4 var(--ui); }
.favourites li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px dotted var(--line); font: 16px/1.35 var(--ui); }
.favourites li:last-child { border: 0; }
.favourites img { width: 64px; height: 64px; object-fit: cover; border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; font: 17px var(--ui); color: var(--ink); }
.search-form button { padding: 9px 14px; border: 1px solid var(--red-dark); border-radius: var(--radius); background: var(--red); color: #fff; font: bold 16px var(--ui); cursor: pointer; }
.search-form button:hover { background: var(--red-dark); }
.box--cause { background: #fff4f1; }
.box--cause .box__head { background: linear-gradient(180deg, #fbe0d9, #f3c6ba); color: #7c2219; }
.box--now .box__body { font: 600 24px/1.25 var(--hand); color: #1d3f5a; }
.social-links li { padding: 4px 0; font: bold 16px/1.4 var(--ui); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 10px; background: #3b2f25; color: #efe4d0; font: 16px/1.6 var(--ui); }
.site-footer a { color: #fff1c9; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding-top: 34px; padding-bottom: 26px; }
.site-footer h2 { margin: 0 0 10px; font: 600 30px/1.1 var(--hand); color: #ffd98a; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 2px 0; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* 88x31 web buttons, the way blogs did it */
.badge88 { display: inline-flex; align-items: center; width: 88px; height: 31px; overflow: hidden; border: 1px solid #000; background: #fff; font: bold 9px/1.05 Verdana, sans-serif; color: #000; text-decoration: none; text-transform: uppercase; letter-spacing: 0; }
.site-footer .badge88 { color: #000; }
.site-footer a.badge88:hover { outline: 2px solid #ffd98a; }
.badge88 b { display: grid; place-items: center; align-self: stretch; width: 30px; color: #fff; font-size: 14px; }
.badge88 span { padding: 0 4px; }
.badge88--ie b { background: #169b62; }
.badge88--wp b { background: #21759b; }
.badge88--cpt b { background: #c8372d; }
.badge88--yrs b { background: #f0a500; color: #000; }
.footer-bottom { padding: 14px 0 18px; border-top: 1px solid rgba(255, 255, 255, .12); text-align: center; font-size: 14px; color: #cdbfa6; }

/* ---------- 404 ---------- */
.lost { padding: 40px 44px; text-align: center; }
.lost h1 { margin: 0 0 8px; font: 600 48px/1.1 var(--hand); color: var(--red); }
.lost .search-form { max-width: 460px; margin: 20px auto 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .scrapbook { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 18px; }
  .wrap { padding: 0 16px; }
  .header-inner { padding-top: 18px; padding-bottom: 14px; }
  .site-tagline { font-size: 24px; }
  .postcard { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; }
  .postcard::after { display: none; }
  .postcard__right { order: -1; }
  .postcard__right .polaroid { width: 70%; }
  .entry-card { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; gap: 18px; }
  .entry-card .polaroid { width: 88%; justify-self: center; }
  .entry-card__title { font-size: 25px; }
  .entry { padding: 26px 20px 30px; }
  .entry-content { font-size: 19px; }
  .entry-content .alignleft, .entry-content .alignright { float: none; margin: 1em auto; max-width: 100%; }
  .author-card { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .author-card .polaroid { width: 120px; margin: 0 auto; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav .next { text-align: left; }
  .related-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .site-nav ul { flex-wrap: wrap; overflow: visible; padding-bottom: 12px; }
  .site-nav a { padding: 8px 14px; border-bottom: 1px solid var(--line-strong); border-radius: 9px; font-size: 15px; }
  .site-nav .current-menu-item > a, .site-nav .current_page_item > a, .site-nav .is-home > a { top: 0; background: var(--red); border-color: var(--red); color: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Contact form ---------- */
.wpcf7 { max-width: 560px; }
.wpcf7 label { display: block; font: bold 16px/1.4 var(--ui); color: #4a3a28; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 textarea { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; font: 18px/1.4 var(--ui); color: var(--ink); }
.wpcf7 textarea { height: 180px; }
.wpcf7 input[type=submit] { padding: 11px 22px; border: 1px solid var(--red-dark); border-radius: var(--radius); background: var(--red); color: #fff; font: bold 17px var(--ui); cursor: pointer; }
.wpcf7 input[type=submit]:hover { background: var(--red-dark); }
.wpcf7-response-output { font: 16px/1.5 var(--ui); }
