/* ==========================================================================
   Base: reset, element defaults, layout helpers, utilities
   ========================================================================== */

/* ---- Reset ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

/* :where() keeps specificity at 0 so component classes always win.
   Lists without a class (editor content) keep their bullets. */
:where(ul, ol)[class] {
  padding: 0;
  list-style: none;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ---- Elements ------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  color: var(--color-heading);
  background: var(--color-bg);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
}

body.is-scroll-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-weight: var(--font-weight-regular);
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* In-page anchors (e.g. pillar page tabs) land below the sticky header */
section[id] {
  scroll-margin-top: calc(var(--navbar-height) + 16px);
}

/* ---- Layout helpers ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + 2 * var(--page-padding));
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

/* ---- Utilities ------------------------------------------------------------ */
/* Coloured word inside a heading (e.g. "αύριο"). */
.text-highlight {
  color: var(--color-highlight);
}

/* Coloured word inside a heading, in the page's pillar accent */
.text-accent {
  color: var(--accent-strong, var(--accent, var(--color-primary)));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: var(--z-skip-link);
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--color-heading);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}
