/*

  Orca Website Stylesheet
  ======================

  Modified version of GNOME websites CSS

*/

/* Fonts */
@font-face {
  font-family: "Cantarell";
  font-style: normal;
  font-weight: 800;
  src: url(fonts/cantarell-extra-bold-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: "Cantarell";
  font-style: normal;
  font-weight: 600;
  src: url(fonts/cantarell-bold-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
}
@font-face {
  font-family: "Cantarell";
  font-style: normal;
  font-weight: 400;
  src: url(fonts/cantarell-regular-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
}

@font-face {
  font-family: "Cantarell";
  font-style: normal;
  font-weight: 300;
  src: url(fonts/cantarell-light.woff2) format("woff2");
  font-display: block;
}

@font-face {
  font-family: "Inter var";
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
  font-named-instance: "Regular";
  src: url("fonts/Inter.var.woff2") format("woff2");
}

:root {
  --rounded-corner: 12px;
  --gnomeblue: #1c71d8;
  --blue1: rgb(153, 193, 241);
  --blue2: rgb(98, 160, 234);
  --blue3: rgb(53, 132, 228);
  --blue4: rgb(28, 113, 216);
  --blue5: rgb(26, 95, 180);
  --green1: rgb(143, 240, 164);
  --green2: rgb(87, 227, 137);
  --green3: rgb(51, 209, 122);
  --green4: rgb(46, 194, 126);
  --green5: rgb(38, 162, 105);
  --yellow1: rgb(249, 240, 107);
  --yellow2: rgb(248, 228, 92);
  --yellow3: rgb(246, 211, 45);
  --yellow4: rgb(245, 194, 17);
  --yellow5: rgb(229, 165, 10);
  --orange1: rgb(255, 190, 111);
  --orange2: rgb(255, 163, 72);
  --orange3: rgb(255, 120, 0);
  --orange4: rgb(230, 97, 0);
  --orange5: rgb(198, 70, 0);
  --red1: rgb(246, 97, 81);
  --red2: rgb(237, 51, 59);
  --red3: rgb(224, 27, 36);
  --red4: rgb(192, 28, 40);
  --red5: rgb(165, 29, 45);
  --purple1: rgb(220, 138, 221);
  --purple2: rgb(192, 97, 203);
  --purple3: rgb(145, 65, 172);
  --purple4: rgb(129, 61, 156);
  --purple5: rgb(97, 53, 131);
  --brown1: rgb(205, 171, 143);
  --brown2: rgb(181, 131, 90);
  --brown3: rgb(152, 106, 68);
  --brown4: rgb(134, 94, 60);
  --brown5: rgb(99, 69, 44);
  --light1: rgb(255, 255, 255);
  --light2: rgb(246, 245, 244);
  --light3: rgb(222, 221, 218);
  --light4: rgb(192, 191, 188);
  --light5: rgb(154, 153, 150);
  --dark1: rgb(119, 118, 123);
  --dark2: rgb(94, 92, 100);
  --dark3: rgb(61, 56, 70);
  --dark4: rgb(36, 31, 49);
  --dark5: rgb(0, 0, 0);
  --adwaita-accent-color: var(--blue4);
  --adwaita-warning-color: #9c6e03;
  --adwaita-error-color: #c01c28;
  --text: #f6f5f4;
  --tocbg: var(--light2);
  --tocfg: var(--dark3);
  --borders: var(--light3);
  --fgcolor: var(--dark5);
  --bgcolor: var(--light1);
  --osdfgcolor: var(--dark5);
  --osdbgcolor: rgba(0, 0, 0, 0.1);
  --link: var(--adwaita-accent-color);
  --link-deco: color-mix(in oklab, var(--link) 50%, var(--bgcolor));
  --header-font-family: Cantarell, -apple-system, BlinkMacSystemFont, "Helvetica", sans-serif;
}

::selection {
  background-color: rgba(153, 193, 241, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root {
    --adwaita-accent-color: #78aeed;
    --adwaita-warning-color: #f8e45c;
    --adwaita-error-color: #ff7b63;
    --tocbg: rgba(0, 0, 0, 0.3);
    --tocfg: var(--light5);
    --borders: var(--dark3);
    --fgcolor: var(--light1);
    --bgcolor: var(--dark4);
    --osdfgcolor: var(--light1);
    --osdbgcolor: rgba(0, 0, 0, 0.3);
  }
  ::selection {
    background-color: rgba(26, 95, 180, 0.4);
  }
}

* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
} /* smooth scroll anchor links */

html,
body {
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-family: "Inter var", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--fgcolor);
  background-color: var(--bgcolor);
  overflow-x: hidden; /* screenshots when zoomed in */
}
@media (min-width: 700px) {
  html,
  body {
    font-size: 18px;
  }
}

main,
footer {
  max-width: 50rem;
  margin: auto;
  padding: 0;
}

/* grid layout to allow for images being edge to edge */
main {
  max-width: inherit;
  padding: 0;
  display: grid;
  grid-template-columns:
    [full-start] minmax(2rem, 1fr)
    [main-start] minmax(0, 50rem) [main-end]
    minmax(2rem, 1fr) [full-end];
}

main > * {
  grid-column: main;
}

main p.full {
  display: block;
  grid-column: full;
  margin: 0;
}

main p.full img {
  display: block;
  width: 100%;
  margin: 0;
}

pre {
  grid-column: main / full;
  background-color: var(--dark3);
  color: var(--light1);
  padding: 0.7rem 1rem;
  overflow: scroll;
  border-radius: var(--rounded-corner);
}

  pre code {
    background-color: transparent;
    padding: 0;
  }

code {
  background-color: var(--tocbg);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: smaller;
}

p strong {
  font-weight: 600;
  opacity: 0.9;
}

h1 {
  font-family: var(--header-font-family);
  font-weight: 300;
  font-size: 24pt;
}

h2 {
  font-family: var(--header-font-family);
  font-weight: 800;
  font-size: 17pt;
  margin-top: 3rem;
}

h3 {
  font-family: var(--header-font-family);
  font-weight: 800;
  font-size: 15pt;
}
h4 {
  font-family: var(--header-font-family);
  font-weight: 700;
  font-size: 14pt;
}
h5 {
  font-family: var(--header-font-family);
  font-weight: 700;
  font-size: 12pt;
}
h2,
h3,
h4,
h5 {
  opacity: 0.7;
}

h1:first-of-type {
  margin-top: 5rem;
}
h1.no-margin{
  margin-top: 1.4rem;
}

a {
  color: var(--link);
  text-decoration-color: var(--link-deco);
  transition: all 300ms ease-in-out;
}
@media (prefers-contrast: more) {
  a {
    text-decoration-color: unset;
  }
}
@media (prefers-reduced-motion) {
  a {
    transition: none;
  }
}
a:hover {
  text-decoration-color: unset; /* restore text decoration color to match text color */
}

ol,
ul {
  margin: 1rem 0 0;
}
ul li {
  list-style-image: url(bullet.svg);
  margin-inline-end: 1ch;
  margin-bottom: 1rem;
}
ol li {
  margin-inline-end: 1ch;
  margin-bottom: 1rem;
}

kbd {
  font-family: monospace;
  font-size: 70%;
  padding: 0.2rem 0.4rem;
  background-color: var(--osdbgcolor);
  color: var(--osdfgcolor);
  border-radius: var(--rounded-corner);
}
.icon-dropshadow {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.related-pages {
  margin-top: 5rem;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  font-size: 10pt;
  font-weight: 800;
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  justify-content: space-between;
}

.related-pages a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--dark1);
  gap: 12px;
}
.related-pages a .title {
  color: var(--dark1);
}
.related-pages a svg {
  width: 32px;
  height: 32px;
}

.prev-page {
  border-radius: 8px;
  padding: 8px 24px 8px 8px;
}
.prev-page svg {
  transform: rotate(180deg);
}
.next-page {
  border-radius: 8px;
  padding: 8px 8px 8px 24px;
}
.related-pages a.prev-page,
.related-pages a.next-page {
  float: none;
  max-width: inherit;
}
.related-pages a.prev-page:hover,
.related-pages a.next-page:hover {
  background-color: var(--tocbg);
}
@media (min-width: 700px) {
  .related-pages {
    font-size: 14pt;
    margin-left: 0;
    margin-right: 0;
  }
  .prev-page {
    padding: 16px 48px 16px 16px;
    border-radius: 24px;
  }
  .next-page {
    padding: 16px 16px 16px 48px;
    border-radius: 24px;
  }
}

.related-pages a.prev-page:only-child,
.related-pages a.next-page:only-child,
.page-info {
  /* align-self: flex-end; i wish */
  width: 100%; /* big buttons instead */
}

table {
  font-size: 90%;
  box-shadow: none;
  border-collapse: collapse;
  border-spacing: 0;
  border-radius: 0;
  text-align: left;
  border-width: 0;
  box-sizing: border-box;
  width: 100%;
  margin: 1rem 0 3rem;
}
/* reset crazy */
table th,
table tr,
table td {
  background-color: transparent;
}

table td,
table th {
  border-width: 0;
  padding: 0.25rem;
}
table tr {
  border-width: 0;
  border-bottom: 1px solid var(--borders);
  display: grid;
  /* grid-template-columns: 1fr 1fr 1fr 1fr; */
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
}

table thead tr {
  font-weight: 800;
  border-width: 0;
  box-sizing: inherit;
  border-bottom: 2px solid var(--borders);
}

video {
  width: 100%;
  height: auto;
}
  video.rounded {
    border-radius: calc(var(--rounded-corner)*2);
  }

img {
  max-width: 100%;
}
  img.center {
    display: block;
    margin: 0 auto;
  }


footer {
  padding-top: 3rem;
  padding-bottom: 6rem;
}

  footer p {
    font-size: smaller;
    text-align: center;
    line-height: 3;
  }

/* Tiles */
ul.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
  grid-template-rows: masonry;
}
  ul.tiles li {
    padding: 1rem;
    border-radius: var(--rounded-corner);
    transition: all 200ms ease-in-out;
    list-style-image: none;
  }
  ul.tiles li:hover {
    background-color: var(--tocbg);
    box-shadow: 0 0 0 8px var(--tocbg);
  }
  ul.tiles h3 {
    margin: 0;
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: var(--link-deco);
  }

  ul.tiles a {
    font-weight: 400;
    font-variation-settings: "wght" 400;
    display: block;
    height: 100%;
    text-decoration: none;
    color: var(--fg-color);
    transition: none;
  }

@media (prefers-reduced-motion) {
  ul.tiles li {
    transition: none;
  }

  ul.tiles li:hover {
    transform: none;
  }
}

.anchor a {
  display: inline-block;
  position: relative;
  z-index: 1;
  text-decoration: none;
  padding: 0 0.5em;
  color: var(--tocfg);
  font-weight: 100;
}

.anchor a:hover {
  text-decoration: underline;
}
