/*
Theme Name: OA Core
Theme URI: https://kellycreative.com.au/
Author: Kevin Kelly
Description: OA Core is a deliberately ultra-minimal, performance-first WordPress foundation theme. It provides structural markup, layout control, and a small Settings surface only. All behaviour (analytics, SEO, schema, UI enhancements) is intentionally handled via required MU-plugins. This theme assumes the OA MU-plugin stack is present and should not be extended with business logic or feature plugins.
Version: 1.1.0
License: GPL v2 or later
Text Domain: oa
*/

:root {
  --oa-font-body: "Manrope", Arial, sans-serif;

  --oa-color-base: #111827;
  --oa-color-bg: #ffffff;
  --oa-color-accent: #0f62a0;

  /* Sensible defaults (may be overridden by OA Settings via inline CSS vars) */
  --oa-container-width: 1100px;
  --oa-container-padding: 1.25rem;
}

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

body {
  margin: 0;
  font-family: var(--oa-font-body);
  color: var(--oa-color-base);
  background: var(--oa-color-bg);
  font-size: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.392), 1.375rem);
  font-weight: 400;
  letter-spacing: -0.1px;
  line-height: 1.55;
}

/* Accessibility
------------------------------------------ */

/* Skip link: visible on focus only */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .5rem .75rem;
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  z-index: 9999;
}

/* Screen-reader only utility (re-usable) */
.sr-only,
.site-header,
.oa-article__header {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Typography
------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.15rem, 2.15rem + ((1vw - 0.2rem) * 1.333), 3rem);
}

h2 {
  font-size: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 0.392), 2rem);
}

h3 {
  font-size: clamp(1.35rem, 1.35rem + ((1vw - 0.2rem) * 0.25), 1.6rem);
}

/* Content rhythm (front-end)
------------------------------------------ */

/* Remove browser default heading margins only within content */
:where(.entry-content :is(h1,h2,h3,h4,h5,h6)) {
  margin-block: 0;
}

/* Baseline rhythm for all direct children */
:where(.entry-content > * + *) {
  margin-top: 1.1em;
}

/* Extra air before headings (only when not first) */
:where(.entry-content > * + h2.wp-block-heading) { margin-top: 2.1em; }
:where(.entry-content > * + h3.wp-block-heading) { margin-top: 1.6em; }

/* Tighten after headings */
:where(.entry-content > h2.wp-block-heading + *) { margin-top: 0.75em; }
:where(.entry-content > h3.wp-block-heading + *) { margin-top: 0.6em; }

/* Optional: if Gutenberg stacks headings */
:where(.entry-content > h2.wp-block-heading + h3.wp-block-heading) {
  margin-top: 0.7em;
}

:where(.wp-block-quote) {
  border-color: currentColor;
  border-width: 0 0 0 2px;
  border-style: solid;
  margin-right: 0;
  margin-left: 0;
  padding: clamp(1rem, 2vw, 1.25rem) clamp(1rem, 3vw, 1.75rem);
}

:where(.wp-block-quote > *:first-child) { margin-top: 0; }
:where(.wp-block-quote > *:last-child) { margin-bottom: 0; }

/* Links
------------------------------------------ */

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.27em;
  text-decoration-color: color-mix(in srgb, currentColor 60%, transparent);
  transition: color .2s ease, text-decoration-color .2s ease;
}

a:hover,
a:focus-visible {
  color: var(--oa-color-accent);
  text-decoration-color: currentColor;
}

a:visited {
  text-decoration-color: color-mix(in srgb, currentColor 20%, transparent);
}

a:focus-visible {
  outline: 2px solid var(--oa-color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Elements
------------------------------------------ */

strong {
  font-weight: 500;
}

code {
  padding: 2px 6px 2px 4px;
  background-color: #f3f5f6;
  border: 1px solid #f3f5f6;
  border-radius: 4px;
  font-size: 0.95em;
}

.wp-block-separator {
  border: 1px solid #e1e1e1;
}

/* Layout
------------------------------------------ */

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

.oa-container {
  width: min(100%, var(--oa-container-width, 1100px));
  margin-inline: auto;
  padding-inline: var(--oa-container-padding, 1.25rem);
}

.alignfull,
.wp-block-cover .wp-block-cover__image-background {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Header
------------------------------------------ */


/* Navigation
------------------------------------------ */


/* Blog specific
------------------------------------------ */

.oa-layout--single {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.oa-main,
.oa-sidebar {
  min-width: 0; /* prevents overflow with long code/URLs */
}

@media (min-width: 900px) {
  body.has-post-sidebar .oa-layout--single {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  body.has-post-sidebar .oa-sidebar {
    position: sticky;
    top: 1.25rem;
    height: fit-content;
  }
}

/* Sidebar widget rhythm */
.oa-sidebar .widget + .widget {
  margin-top: 1.5rem;
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 .5rem;
}

/* Post nav */
.oa-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(0 0 0 / 0.12);
}

.oa-post-nav__prev,
.oa-post-nav__next {
  flex: 1;
}

.oa-post-nav__next {
  text-align: right;
}

/* Post title wrapping behaviour */
.wp-block-post-title {
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 480px) {
  .wp-block-post-title {
    font-size: clamp(1.75rem, 1.2rem + 4.2vw, 2.4rem);
    line-height: 1.08;
    max-width: 20ch;
  }
}

/* FAQ Accordion
--------------------------------------------- */
body:has(section#faq) .site-footer-inner {
  padding-top: 0;
  border-top: 0;
}

#faq {
  margin: 5vw auto;
}

.service #faq  {
  background-color: var(--oa-zone--alt);
}

#faq .wp-block-heading {
  margin-bottom: 5vw;
  color: #666;
  font-size: clamp(2.55rem, 2.55rem + ((1vw - 1rem) * 1.333), 3rem);
  font-weight: 300;
  line-height: 1;
}

.faq-drawer {
  padding: 0 20px 30px 20px;
  border-bottom: 1px solid #ccc;
  overflow: hidden;
}

.faq-drawer.last {

}

.faq-drawer__content-wrapper {
  max-height: 0px;
  overflow: hidden;
  transition: 0.25s ease-in-out;
}

.faq-drawer__title {
  cursor: pointer;
  display: block;
  position: relative;
  padding: 30px 2.5rem 0 0;
  font-size: 20px;
  transition: color 0.25s ease-out;
}

.faq-drawer__title::after {
  content: "";
  position: absolute;
  top: 50px;
  right: 0;
  width: 15px;
  height: 15px;
  border-style: solid;
  border-width: 2px 2px 0 0;
  transform: translateY(-50%) rotate(135deg);
  transition: transform 0.35s ease-in-out;
}

.faq-drawer__title:hover {
  color: #4E4B52;
}

.faq-drawer__content {
  padding-top: 30px;
}

.faq-drawer__trigger:checked
  + .faq-drawer__title
  + .faq-drawer__content-wrapper {
  max-height: 100%;
}

.faq-drawer__trigger:checked + .faq-drawer__title::after {
  transform: translateY(-50%) rotate(-45deg);
  transition: 0.25s ease-in-out;
}

input[type="checkbox"] {
  display: none;
}

/* Site specific
------------------------------------------ */
.wp-block-cover {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

@media (max-width: 480px) {
  .wp-block-cover__image-background {
    height: 70vh !important;
  }
}

.wp-block-cover, .wp-block-cover-image {
  padding: 0;
}

.wp-block-cover__inner-container {
  margin: 0;
  padding: 5%;
}

.wp-block-cover
.wp-block-heading a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.wp-block-cover .wp-block-heading a:hover,
.wp-block-cover p {
  opacity: 0.9;
}

.wp-block-cover p {
  margin-top: 0;
}

/* Navigation
------------------------------------------ */
.custom-nav {
  border-bottom: 1px solid #eee;
}

.custom-nav.wp-block-columns {
  margin: 0;
  gap: 0;
}

.custom-nav .wp-block-column {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.custom-nav .wp-block-list {
  margin: 0;
  padding: 0;
  width: 100%;
}

@media (max-width: 480px) {
  .custom-nav .wp-block-list {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    text-align: center;
  }
  .custom-nav .wp-block-list .about {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .custom-nav li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 1.5em 5vw;
    font-size: 17px;
  }
  .custom-nav li:first-child {
    background: #d8e0ee;
  }
}

@media (min-width: 481px) {
  .custom-nav .wp-block-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 25px 0;
  }

  .custom-nav li {
    display: inline-block;
    padding: 0 1.25em;
  }
}

.custom-nav a {
  text-decoration: none;
}
.custom-nav a:hover {
  opacity: 0.5;
}

/* Page Title
------------------------------------------ */
.wp-block-heading.page-title {
  margin-top: 5vw;
  margin-bottom: 0;
  color: #666;
  font-size: 65px;
  font-weight: 300;
  line-height: 1.4;
}

.wp-block-heading.page-title span {
  display: block;
  font-size: 26px;
}

/* For Emergencies
------------------------------------------ */
.for-emergencies {
  margin-top: 5vw;
  padding: 20px 0;
  background: #e6f2a6;
  border: 1px solid #6e6e6e;
  font-size: 16px;
  font-weight: 500;
}

/* Layout
------------------------------------------ */
.section {
  padding: 5vw 0;
}

@media (max-width: 480px) {
  .section.first-of-type {
    margin-top: -25px;
    padding-top: 0;
  }
}

/* Headings
------------------------------------------ */
.wp-block-heading {
  margin-bottom: 0;
  color: #666;
  font-weight: 300;
  line-height: 1;
}

h2.wp-block-heading {
  font-size: clamp(2.55rem, 2.55rem + ((1vw - 1rem) * 1.333), 3rem);
}

h3.wp-block-heading {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: clamp(2.55rem, 2.55rem + ((1vw - 1rem) * 1.333), 3rem);
}

h4.wp-block-heading {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: clamp(2rem, 2rem + ((1vw - 1rem) * 1.333), 3rem);
}

@media (max-width: 480px) {
  .intro-heading {
    display: none;
  }
}

/* Checklist
------------------------------------------ */
.wp-block-list.check-list {
  margin-left: -15px;
}

@media (min-width: 768px) {
  .wp-block-list.check-list {
    margin-left: -30px;
  }
}

.check-list li {
  padding: 5px;
  list-style: none;
  list-style-image: none;
  list-style-image: url('https://www.aussiedig.com.au/wp-content/uploads/2018/06/mark.png');
}


/* Footer
------------------------------------------ */
.site-footer {
  padding: 30px 0;
  border-top: 1px solid #999;
  font-size: 15px;
}
