/* ==========================================================================
   SEO Agency Tipperary: WordPress layer
   Core blocks, the blog, and structures the CMS adds, in the survey's
   design language. Loads after terrain.css and uses its tokens.
   ========================================================================== */

/* ---------- Admin bar: the fixed header sits below it when logged in ---------- */
.admin-bar .site-head { top: 32px; }
.admin-bar .atlas-menu { top: 32px; height: calc(100dvh - 32px); }
@media (max-width: 782px) {
  .admin-bar .site-head { top: 46px; }
  .admin-bar .atlas-menu { top: 46px; height: calc(100dvh - 46px); }
}
@media (max-width: 600px) { .admin-bar .site-head { top: 0; } #wpadminbar { position: absolute; } }
.brand__logo { width: auto; height: 40px; }

/* ---------- Designed pages: stray core blocks between sections stay on the grid ---------- */
.entry-designed > :not(section):not(.section):not(article):not(script):not(style) {
  position: relative; z-index: 1; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
}
.entry-designed > .draft-note { margin-block: 24px; max-width: min(var(--max), 70ch); }
.section__body > :first-child { margin-top: 0; }
.section--flush { padding-top: 20px; }
.section--prose .section__body { max-width: 66ch; }
.page-hero--compact { min-height: 56svh; }
.sheet { background: var(--ground); }

/* ---------- Prose: everything an editor can put in a post or page ---------- */
.prose > * + * { margin-top: 1.1em; }
.prose > :is(h2, h3, h4) + * { margin-top: .4em; }
.prose h2:not(.t-land) { font-family: var(--f-land); text-transform: uppercase; font-weight: 800; font-size: clamp(34px, 3.6vw, 60px); line-height: .92; letter-spacing: .01em; margin: 1.6em 0 .5em; }
.prose h3:not(.t-land) { font-family: var(--f-land); text-transform: uppercase; font-weight: 700; font-size: 26px; letter-spacing: .04em; margin: 1.6em 0 .4em; }
.prose h4 { font-family: var(--f-data); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 1.6em 0 .4em; }
.prose > :first-child { margin-top: 0; }
.prose a:not(.btn):not(.pill):not(.wp-block-button__link) { color: inherit; text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:not(.btn):not(.pill):hover { color: var(--signal); }
.prose ul:not(.is-style-ticks):not(.ticks), .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose ul:not(.is-style-ticks):not(.ticks) li::marker { color: var(--signal); }
.prose ol li::marker { font-family: var(--f-data); font-size: .8em; color: var(--ink-soft); }
.prose strong { font-weight: 600; }
.prose hr, .prose .wp-block-separator { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose code { font-family: var(--f-data); font-size: .85em; background: color-mix(in oklch, var(--ink) 8%, transparent); padding: .1em .35em; border-radius: 3px; }
.prose pre { font-family: var(--f-data); font-size: 14px; line-height: 1.6; background: var(--peat); color: var(--limestone); padding: 20px; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }

/* statements and ticks: the same marks used across the survey */
.is-style-big, .prose p.big { font-size: clamp(22px, 1.7vw, 28px); line-height: 1.4; font-weight: 300; }
.is-style-lede { font-size: clamp(21px, 1.7vw, 30px); line-height: var(--lead-lede); font-weight: 300; max-width: 40ch; }
.is-style-landform { font-family: var(--f-land); text-transform: uppercase; font-weight: 800; letter-spacing: .01em; line-height: .92; }
ul.is-style-ticks { list-style: none; padding: 0; margin: 20px 0 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
ul.is-style-ticks li { padding: 12px 0 12px 28px; border-top: 1px solid var(--line); position: relative; font-size: 17px; margin: 0; }
ul.is-style-ticks li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 9px; height: 9px; border: 1.5px solid var(--signal); transform: rotate(45deg); }

/* quotes */
.prose blockquote, .wp-block-quote { margin: 2em 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--signal); font-style: italic; font-size: clamp(20px, 1.6vw, 26px); line-height: 1.4; font-weight: 300; }
.prose blockquote cite, .wp-block-quote cite { display: block; margin-top: 12px; font-family: var(--f-data); font-style: normal; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.wp-block-pullquote { border-block: 1px solid var(--line); padding: 1.4em 0; text-align: center; }
.wp-block-pullquote blockquote { border: 0; padding: 0; font-size: clamp(26px, 2.6vw, 40px); }
.wp-block-quote.is-style-field-note { border: 1px solid var(--ink-faint); border-radius: 14px; padding: 26px 30px; }

/* media */
.prose figure { margin: 2em 0; }
.prose img, .prose video, .post-figure img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
.prose figcaption, .wp-element-caption { font-family: var(--f-data); font-size: 12px; letter-spacing: .04em; color: var(--ink-soft); margin-top: 10px; }
.post-figure { margin: 0 0 clamp(40px, 7vh, 80px); }
.post-figure img { width: 100%; max-height: 72vh; object-fit: cover; }
.wp-block-gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.wp-block-gallery figure { margin: 0; }
.wp-block-embed { margin: 2em 0; }
.wp-block-embed__wrapper { position: relative; }
.wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 56.25%; }
.wp-has-aspect-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.wp-block-video video { width: 100%; }
.alignwide { width: min(100vw - 2 * var(--gutter), 1100px); max-width: none; margin-inline: calc(50% - min(50vw - var(--gutter), 550px)); }
.alignfull { width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); border-radius: 0; }
.alignleft { float: left; margin: .3em 1.6em 1em 0; max-width: 50%; }
.alignright { float: right; margin: .3em 0 1em 1.6em; max-width: 50%; }
.aligncenter { margin-inline: auto; }

/* tables */
.wp-block-table { overflow-x: auto; margin: 2em 0; }
.wp-block-table table, .prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--f-data); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); }
.prose td { font-variant-numeric: tabular-nums; }

/* core buttons share the survey button */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0; }
.wp-block-button__link {
  display: inline-flex; align-items: center; gap: 14px; padding: 18px 26px; border-radius: 999px;
  background: var(--signal); color: var(--peat); font-family: var(--f-data); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  text-decoration: none; position: relative; overflow: hidden; isolation: isolate; transition: transform .5s var(--ease-out);
}
.wp-block-button__link::before { content: ""; position: absolute; z-index: -1; left: var(--x, 50%); top: var(--y, 120%); width: 260%; aspect-ratio: 1; border-radius: 50%; background: var(--limestone); transform: translate(-50%, -50%) scale(0); transition: transform .7s var(--ease-out); }
.wp-block-button__link:hover::before, .wp-block-button__link:focus-visible::before { transform: translate(-50%, -50%) scale(1); }
.wp-block-button__link:hover { transform: translateY(-2px); }
.is-style-ghost .wp-block-button__link, .is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-faint); }
.is-style-ghost .wp-block-button__link::before, .is-style-outline .wp-block-button__link::before { background: var(--ink); }
.is-style-ghost .wp-block-button__link:hover, .is-style-outline .wp-block-button__link:hover { color: var(--ground); }

/* details (FAQ inside the FAQ block uses .faq; elsewhere it still looks right) */
.prose .wp-block-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
.prose .wp-block-details summary { cursor: pointer; padding: 14px 0; font-family: var(--f-land); text-transform: uppercase; font-weight: 700; font-size: 22px; }
.faq .wp-block-details p { margin: 0 0 26px; max-width: 62ch; color: var(--ink-soft); }

/* ---------- Atlas before the map draws, and without the theme's script ---------- */
.atlas__fallback { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.atlas__fallback a { font-family: var(--f-land); font-weight: 700; font-size: 26px; text-transform: uppercase; text-decoration: none; }
html:not(.no-js) .atlas__fallback { visibility: hidden; }

/* ---------- Towns and services hubs ---------- */
.towns h3 { font-size: clamp(38px, 3.6vw, 60px); --px: 50; }
.town-more { margin-top: auto !important; padding-top: 8px; }
.town-more a { display: inline-flex; gap: 8px; align-items: center; font-family: var(--f-data); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; min-height: var(--touch); }
.town-more a:hover { color: var(--signal); }
.town-more svg { width: 16px; height: 16px; }
.chapter .prose .btn { margin-top: 8px; }
.other-services { margin-top: clamp(40px, 8vh, 90px); padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------- Testimonials (shown only once published and confirmed) ---------- */
.field-notes { display: grid; gap: 18px; margin-top: 28px; }
.field-note { margin: 0; border: 1px solid var(--ink-faint); border-radius: 14px; padding: 24px 26px; }
.field-note blockquote { margin: 0; font-size: 20px; line-height: 1.45; font-style: italic; font-weight: 300; }
.field-note figcaption { margin-top: 14px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.field-note figcaption .t-land { font-size: 20px; }

/* ---------- Hero media (optional image or video beneath the contours) ---------- */
.hero { position: relative; isolation: isolate; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: .28; mix-blend-mode: luminosity; pointer-events: none; }

/* ---------- Blog listing and cards ---------- */
.listing-tools { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: clamp(36px, 6vh, 64px); }
.listing-tools .pill-row { margin: 0; }
.pill[aria-current="page"] { background: var(--signal); border-color: var(--signal); color: var(--peat); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 2.6vw, 36px); }
.card { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 18px; position: relative; }
.card__media { display: block; margin-bottom: 18px; overflow: hidden; border-radius: 10px; aspect-ratio: 16 / 10; background: color-mix(in oklch, var(--ink) 6%, transparent); }
.card__img { width: 100%; height: 100%; object-fit: cover; transition: scale 1s var(--ease-out); }
.card:hover .card__img { scale: 1.04; }
.card h3 { font-size: clamp(26px, 2.2vw, 34px); line-height: .98; margin: 10px 0 12px; --px: 30; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* the whole card is the target */
.card h3 a:hover, .card h3 a:focus-visible { color: var(--signal); }
.card p { margin: 0; font-size: 17px; color: var(--ink-soft); }
.empty-state { padding: 40px 0; max-width: 52ch; }
.empty-state p { color: var(--ink-soft); }

.pagination { margin-top: clamp(40px, 7vh, 80px); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: var(--touch); min-height: var(--touch); padding: 0 14px; border: 1px solid var(--ink-faint); border-radius: 99px; font-family: var(--f-data); font-size: 13px; text-decoration: none; }
.pagination .page-numbers.current { background: var(--signal); border-color: var(--signal); color: var(--peat); }
.pagination a.page-numbers:hover { border-color: var(--signal); color: var(--signal); }

/* search */
.search-form { display: flex; align-items: center; border: 1px solid var(--ink-faint); border-radius: 99px; padding-left: 18px; min-height: var(--touch); background: color-mix(in oklch, var(--ground) 72%, transparent); }
.search-form input { border: 0; background: none; color: inherit; font: italic 300 18px var(--f-flow); padding: 10px 0; min-width: 0; width: 220px; outline: none; }
.search-form:focus-within { border-color: var(--signal); }
.search-form__btn { width: var(--touch); height: var(--touch); border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; border-radius: 99px; }
.search-form__btn svg { width: 20px; height: 20px; }
.lost-search { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- Single post ---------- */
.post-title { font-size: clamp(48px, 7.6vw, 140px); max-width: 16ch; }
.post-meta { color: var(--ink-soft); margin-top: 24px; }
.post-meta a { text-decoration: none; border-bottom: 1px solid var(--ink-faint); }
.post-single .prose { margin-inline: auto; }
.post-foot { max-width: 66ch; margin: clamp(48px, 8vh, 90px) auto 0; display: grid; gap: 34px; }
.author-box { display: flex; gap: 18px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 26px; }
.author-box__img { border-radius: 50%; flex: none; }
.author-box .t-land { font-size: 26px; margin: 4px 0 6px; }
.author-box a { text-decoration: none; }
.author-box p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-navigation a { display: grid; gap: 6px; text-decoration: none; padding: 18px 0; border-top: 1px solid var(--line); min-height: var(--touch); }
.post-navigation .nav-next { text-align: right; }
.post-navigation .t-land { font-size: 22px; line-height: 1; }
.post-navigation a:hover .t-land { color: var(--signal); }
.page-links { margin-top: 2em; display: flex; gap: 10px; }

/* comments */
.comments { max-width: 66ch; margin: 60px auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-body { border-top: 1px solid var(--line); padding: 18px 0; }
.comment-form label { display: block; font-family: var(--f-data); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea { width: 100%; background: transparent; color: inherit; border: 1px solid var(--ink-faint); border-radius: 12px; padding: 12px 14px; font: inherit; }

/* ---------- Contact details list (plugin markup) ---------- */
.sat-contact a { text-decoration: none; border-bottom: 1px solid var(--ink-faint); }
.sat-contact a:hover { color: var(--signal); border-color: var(--signal); }
.foot-grid .tbc, .sat-contact .tbc { font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  ul.is-style-ticks { grid-template-columns: 1fr; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .alignleft, .alignright { float: none; margin: 1.6em 0; max-width: 100%; }
  .search-form input { width: 100%; }
  .listing-tools .search-form { width: 100%; }
}
