/* 
Theme Name: Ostéo Auray
Author: ùnräad
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: osteo
*/

:root {
  --cs--text--heading: var(--wp--preset--color--primary);
  --cs--text--content: var(--wp--preset--color--neutral-dark);
  --cs--bg: var(--wp--preset--color--neutral-base);
  --cs--sep: var(--wp--preset--color--neutral-medium);
  --cs--bt-bg: var(--wp--preset--color--primary);
  --cs--bt-text: var(--wp--preset--color--neutral-base);

  --fz--section-heading: var(
    --wp--preset--font-size--display-large
  );
  --fz--section-intro: var(--wp--preset--font-size--large);
}
@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}
@media (min-width: 80rem) {
  :root {
    --wp--custom--global--section-padding: var(
      --wp--preset--spacing--90
    );
  }
}
@media (min-width: 96rem) {
  :root {
    font-size: 125%;
    /* --wp--preset--font-size--display: 3.2rem;
    --wp--preset--font-size--display-large: 6.8rem; */
    --wp--custom--global--layout-gap: var(
      --wp--preset--spacing--70
    );
  }
}
/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}
img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
svg {
  max-width: 100%;
  display: block;
  height: auto;
}
button {
  -webkit-appearance: none;
  appearance: none;
}
address {
  font-style: normal;
}

/* Color */
:where(.has-scheme-primary, body.home .site-header) {
  --cs--text--heading: var(--wp--preset--color--neutral-xlight);
  --cs--text--content: var(--wp--preset--color--neutral-xlight);
  --cs--bg: var(--wp--custom--color--primary-gradient);
  --cs--sep: var(--wp--preset--color--neutral-xlight);
  --cs--bt-bg: var(--wp--preset--color--neutral-xlight);
  --cs--bt-text: var(--wp--preset--color--primary);
}
:where(.has-scheme-secondary, .site-footer) {
  --cs--text--heading: var(--wp--preset--color--primary);
  --cs--text--content: var(--wp--preset--color--neutral-xdark);
  --cs--bg: var(--wp--preset--color--secondary-light);
  --cs--sep: var(--wp--preset--color--secondary);
  --cs--bt-bg: var(--wp--preset--color--primary);
  --cs--bt-text: var(--wp--preset--color--neutral-base);
}

/* Typography */
p,
dl,
ul,
:root :where(.is-layout-constrained) > p,
:root :where(.is-layout-constrained) > ul,
:root :where(.is-layout-constrained) > dl {
  margin: 0 0 var(--wp--preset--spacing--20);
}
dt {
  font-weight: 700;
}
.legal-notice {
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.6;
  display: block;
}
span.allcaps {
  font-variant-caps: all-small-caps;
}

.opening-hours > div {
  display: flex;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--40);
}

.button > a,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wp--preset--spacing--20);
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600;
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.2;
  border-radius: 0.125rem;
  border: 0.125rem solid var(--cs--bt-bg);
  color: var(--cs--bt-text);
  background: var(--cs--bt-bg);
  text-decoration: none;
  width: fit-content;
  padding: var(--wp--preset--spacing--20)
    var(--wp--preset--spacing--40);
}
.button > a svg,
a.button svg {
  fill: currentColor;
  width: var(--wp--preset--spacing--30);
}
.button > a:hover,
a.button:hover {
  color: var(--cs--bt-bg);
  background: transparent;
}

/* Header */
.site-header {
  padding: var(--wp--preset--spacing--40)
    var(--wp--custom--global--site-padding);
  color: var(--cs--text--content);
  margin-bottom: var(--wp--preset--spacing--60);
}
body.home .site-header {
  margin-bottom: calc(
    -4.25rem - 2 * var(--wp--preset--spacing--40)
  );
  position: relative;
}
.site-header-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--wp--preset--spacing--20)
    var(--wp--preset--spacing--60);
  height: 4.25rem;

  max-width: var(--wp--style--global--wide-size);
  margin: 0 auto;
}
body.home .menu .home {
  display: none;
}
.site-header .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header .menu a {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}
.site-header .menu a:hover {
  text-decoration: underline;
  text-underline-offset: 0.125em;
}
.main-navigation .anchor {
  display: none;
}
.site-header-content {
  justify-content: flex-end;
}
.site-header .menu {
  display: flex;
  gap: var(--wp--preset--spacing--60);
}
@media (min-width: 64rem) {
  .main-navigation .anchor {
    display: block;
  }
}
/* Footer */
.site-footer {
  padding: var(--wp--custom--global--section-padding)
    var(--wp--custom--global--site-padding) 0;
  background: var(--cs--bg);
}
.site-footer h2 {
  font-size: var(--wp--preset--font-size--medium-large);
  text-align: center;
}
.site-footer address,
.site-footer p:not(.legal-notice) {
  text-align: center;
}
.site-footer-contact {
  display: grid;
  gap: var(--wp--custom--global--layout-gap);
  max-width: 58rem;
  margin: 0 auto;
}
.site-footer-contact > * {
  max-width: 20rem;
  margin-left: auto;
  margin-right: auto;
}
.footer-social ul {
  display: flex;
  padding: 0;
  list-style: none;
  justify-content: center;
  margin: var(--wp--preset--spacing--60) auto;
}
.site-footer a {
  color: inherit;
}
.footer-social svg {
  width: 2em;
  fill: currentColor;
}
.footer-deco {
  margin: var(--wp--preset--spacing--60)
    calc(-1 * var(--wp--custom--global--site-padding)) 0;
  width: calc(
    100% + 2 * var(--wp--custom--global--site-padding)
  );
}
.colophon .menu {
  list-style: none;
  padding: 0;
  display: flex;
  gap: var(--wp--preset--spacing--20)
    var(--wp--preset--spacing--40);
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 48rem) {
  .site-footer-contact {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .colophon {
    display: flex;
    justify-content: center;
    gap: var(--wp--preset--spacing--80);
  }
}

/* Teasers */

.teasers-list,
.columns-container {
  --grid-column-count: 3;
  --grid-item--min-width: 17rem;
  --grid-layout-gap: var(--wp--custom--global--layout-gap);
  --gap-count: calc(var(--grid-column-count) - 1);
  --total-gap-width: calc(
    var(--gap-count) * var(--grid-layout-gap)
  );
  --grid-item--ideal-width: calc(
    (100% - var(--total-gap-width)) / var(--grid-column-count)
  );
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(
      max(
        var(--grid-item--min-width),
        var(--grid-item--ideal-width)
      ),
      1fr
    )
  );
  grid-gap: var(--grid-layout-gap);
}

.teaser[data-fully-clickable="true"] {
  cursor: pointer;
}
.teaser h3 a {
  text-decoration: none;
  color: inherit;
}
.teaser figure {
  overflow: hidden;
  margin-bottom: var(--wp--preset--spacing--40);
}
.teaser img {
  aspect-ratio: 1.5;
  transition: transform 0.4s;
}
.teaser[data-fully-clickable="true"]:hover h3 a,
.teaser[data-fully-clickable="true"]:focus-within h3 a {
  text-decoration: underline;
  text-underline-offset: 0.125em;
  text-decoration-thickness: 0.0625em;
}
.teaser[data-fully-clickable="true"]:hover img,
.teaser[data-fully-clickable="true"]:focus-within img {
  transform: scale(1.04);
}
.teaser .read-more {
  text-decoration: none;
  font-weight: 600;
  color: inherit;
}
.teaser .read-more span {
  text-decoration: underline;
  text-underline-offset: 0.125em;
  text-decoration-thickness: 1px;
}
.teaser .read-more::before {
  content: "→";
  display: inline-block;
  margin-right: 0.25rem;
  text-decoration: none;
  transition: transform 0.25s;
}
.teaser[data-fully-clickable="true"]:hover .read-more::before,
.teaser[data-fully-clickable="true"]:focus-within
  .read-more::before {
  transform: translateX(0.25rem);
}

.archive-header {
  margin-bottom: var(--wp--preset--spacing--60);
}
