/* --- Variables --- */

:root {

  /* Font-families */
  --font-body: "Body Web",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol";
  --font-title: "Script Web", "Body Web", "Times New Roman", serif;

  /* Colours */
  --color-white: #fcfbfa;
  --color-shadow: #bcbfb9;
  --color-medium: #862b0c;
  --color-black: #130f0c;
  --color-accent: #FA9600;
  --color-contrast: #261100;

	/* Sizes */
	--max-width-large: 46rem;
	--max-width: 40rem;

	/* White spaces */
	--space-tiny: 0.25rem;
	--space-small: 0.5rem;
	--space-medium: 1rem;
	--space-large: 2rem;
	--space-huge: 3rem;

	/* Misc values */
	--border-radius: 0.5rem;
	--border-round: 3rem;
}

/* Font families generated with Font Squirrel webfont generator
 to make use of subsetting. font-display:swap to prevent FOIT */

@font-face {
  font-family: "Body Web";
  src:
    url("/site/templates/fonts/subset-Spectral-Light.woff2") format("woff2"),
    url("/site/templates/fonts/subset-Spectral-Light.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Body Web";
  src:
    url("/site/templates/fonts/subset-Spectral-LightItalic.woff2") format("woff2"),
    url("/site/templates/fonts/subset-Spectral-LightItalic.woff") format("woff");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Body Web";
  src:
    url("/site/templates/fonts/subset-Spectral-Medium.woff2") format("woff2"),
    url("/site/templates/fonts/subset-Spectral-Medium.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Script Web";
  src:
    url("/site/templates/fonts/subset-Satisfy-Regular.woff2") format("woff2"),
    url("/site/templates/fonts/subset-Satisfy-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


/* --- Reset and normalisation --- */

/* Better focus-visible for keyboard accessibility */
*:focus-visible {
	outline-color: currentColor;
	outline-style: solid;
	outline-offset: .125rem;
	outline-width: .125rem;
}

/* Box-sizing reset for easier layouts */
*,
::before,
::after {
	box-sizing: inherit;
}

html {
	box-sizing: border-box; /* Define base box-sizing */
	-moz-tab-size: 4; /* Default tab size and line-height */
	tab-size: 4;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%; /* Prevent some devices from zooming in automatically, for ex. when rotating them */
}

/* Make sure the body fills up the screen, reset default page margins */
body {
  display: flex;
  flex-direction: column;
	min-height: 100vh;
	margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

/* Basic defaults for titles */
h1,
h2,
h3,
h4 {
	font-weight: normal;
	overflow-wrap: break-word;
	hyphens: auto;
}

/* Ensure that embedded content doesn't overflow its container  */
audio,
iframe,
img,
picture,
svg,
video {
	max-width: 100%;
}

/* Make images easier to deal with */
img,
picture {
	height: auto;
	max-width: 100%;
	vertical-align: top;
}

/* Reset hr styling */
hr {
	height: 0;
	border: 0.075rem solid currentColor;
	color: inherit;
}

/* Remove list style from menus */
menu {
	list-style: none;
	padding-inline-start: 0;
}

/* Keep list markers inside the list block */
ul,
ol {
	list-style: inside;
}

/* Monospace items defaults */
code,
kbd,
samp,
pre {
	font-family: monospace;
	font-size: 1em;
}

/* Normalise small font size */
small {
	font-size: 80%;
}

/* Prevent 'sub' and 'sup' from affecting line height */
sub,
sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

/* better table styling */
table {
	border-collapse: collapse; /* Remove space between cells in tables */
	text-indent: 0; /* Remove unwanted spacing */
	border-color: inherit;
}

/* Add default styling to interactive elements */
button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
	line-height: 1.5rem;
	margin: 0;
}

button,
select {
	text-transform: none;
}

/* Allows styling in some iOS / Safari */
button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

/* Make textareas easier to use */
textarea {
	resize: vertical;
}

textarea:not([rows]) {
	min-height: 6rem;
}

/* Remove red halo on some Firefox */
:-moz-ui-invalid {
	box-shadow: none;
}

legend {
	padding: 0;
}

progress {
	vertical-align: baseline;
}

/* Correct the cursor style of increment and decrement buttons in Safari */
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
	height: auto;
}

[type="search"] {
	-webkit-appearance: textfield;
}

/* Removes some default padding and buttons */
::-webkit-search-decoration,
::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

/* Add the correct display in Chrome and Safari */
summary {
	display: list-item;
}

/* Reset some margins */
figure {
	margin-inline: 0;
}

/* Make forms easier to work with */
form {
  display: block;
}

/* Prevent children from stretching fieldsets */
fieldset {
	min-width: 0;
	margin: 0;
}

/* Form defaults */
input,
label,
select,
textarea {
  display: block;
}

input[type="checkbox"],
input[type="radio"],
input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
  cursor: pointer;
}

input:last-child,
select:last-child,
textarea:last-child {
  margin-block-end: 0;
}

audio,
video,
input:not([type="radio"]):not([type="checkbox"]):not([type="color"]),
select,
meter,
progress,
textarea {
  width: 100%;
  max-width: 100%;
}

/* Anchors should have extra scroll margin */
:target {
  scroll-margin-block: var(--space-small);
}

/* --- Base styles --- */

/* Global */

body {
	position: relative;
  font-family: var(--font-body);
  color: var(--color-white);
	background: var(--color-black) url('/site/templates/images/grain.png') repeat;
}

.menu {
	display: flex;
	flex-direction: row;
	gap: var(--space-medium);
	padding-inline-start: 0;
	list-style: none;
}

video {
  background-color: var(--color-black);
}

hr {
  position: relative;
  max-width: var(--max-width);
  height: 1.5rem;
  margin: var(--space-medium) auto;
  border: 1px solid;
}

p > img {
  border-radius: var(--border-radius);
}

/* Tables */

table {
  display: inline-block;
  max-width: 100%;
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid var(--color-black);
  border-radius: var(--border-radius);
  border-spacing: 0;
}

caption {
  text-align: left;
  background: var(--color-white);
}

caption,
td,
th,
tr {
  padding: var(--space-small) var(--space-medium);
}

thead {
  margin: 0;
  padding: 0;
}

/* Links, inputs, forms */

fieldset,
input,
select,
textarea {
  border: 1px solid var(--color-accent);
  border-radius: var(--border-radius);
}

input,
select,
textarea {
  background: var(--color-black);
  color: var(--color-white);
}

input:not([type="color"]),
select,
textarea {
  padding: var(--space-small) var(--space-medium);
}

label {
  margin-block-end: var(--space-tiny);
}

input[type="submit"],
button,
.button,
a {
  cursor: pointer;
	color: currentColor;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

input[type="submit"],
button,
.button {
  position: relative;
  padding: calc(var(--space-small) - 0.05rem) var(--space-medium) calc(var(--space-small) - 0.15rem);
  font-family: var(--font-body);
  text-decoration: none;
	background: transparent;
  border: 0.1rem solid;
  border-radius: var(--border-round);
}

.button {
  display: inline-block;
}

button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible,
.button:hover,
.button:focus-visible {
  color: var(--color-black);
  background: var(--color-accent);
  border-color: var(--color-accent);
  outline-color: var(--color-accent);
}

fieldset {
  display: grid;
  grid-template-columns: min-content 1fr;
  padding: 0.5rem 1.5rem;
}

fieldset input + label {
  margin: 0.5rem 0;
}

fieldset input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  margin: 0.5rem 0.5rem 0.5rem 0;
  border: 1px solid var(--color-white);
  border-radius: 2px;
  appearance: none;
  background-color: transparent;
  transition: outline 0.1s;
}

fieldset input[type="checkbox"]:checked {
  background-size: cover;
  padding: 2px;
}

fieldset input[type="checkbox"]:checked {
  background-color: var(--color-white);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 32 32" xml:space="preserve"><path style="fill: %23130f0c" d="M11.941,28.877l-11.941-11.942l5.695-5.696l6.246,6.246l14.364-14.364L32,8.818"/></svg>');
}


.hidden {
  display: none;
}

.visually-hidden {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: 0;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* --- Typography --- */

/* Set fluid base font size */
html {
	--mult: clamp(0px, calc((100vw - 360px) / (1280 - 360)), 1px);
	font-size: clamp(1rem, calc(1rem + 8 * var(--mult)), 22px);
}

/* Baseline grid, disable when not checking vertical rhythm */
/*
body::before {content: " ";position: absolute;top:0;bottom:0;left:0;right:0;background:linear-gradient(to bottom, rgba( 32,160,255,.35 ) 1px, transparent 1px);background-size:100% 0.5rem;z-index:1;pointer-events: none;}
*/

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
menu,
figcaption,
address,
pre {
	--baselines: 1.5;
	--beneath: 1;
	--baseline-shift: calc(calc(calc(var(--baselines) * 1rem) - 1cap) / 2);
	--baseline-push: calc(calc(var(--beneath) * 1rem) - var(--baseline-shift));
  
	line-height: calc(var(--baselines) * 1rem);
	padding-block-start: var(--baseline-shift);
	padding-block-end: var(--baseline-push);
  margin-block: 0;
}

h1 {
	--baselines: 3.5;
	--beneath: 2;
  font-size: 3.5rem;
  font-family: var(--font-title);
  font-variant-ligatures: discretionary-ligatures; 
  text-wrap: balance;
  margin-block-start: 2rem;
  hyphenate-limit-chars: auto 3 4;
	color: var(--color-accent);
  font-weight: normal;
}

@media all and (max-width: 40rem) {
  h1 {
	--baselines: 3;
  font-size: 3rem;
  }
}

@media all and (max-width: 36rem) {
  h1 {
	--baselines: 2.5;
  font-size: 2.5rem;
  }
}

@media all and (max-width: 24rem) {
  h1 {
    --baselines: 2;
  	font-size: 2rem;
  }
}

.photography h1 {
  --baselines: 2;
  font-size: 2rem;
  color: var(--color-photos);
}

h2 {
	--baselines: 2;
  margin-block-start: 1rem;
	font-size: 2rem;
  font-style: italic;
}

@media all and (max-width: 24rem) {
  h2 {
    --baselines: 2;
  	font-size: 1.75rem;
  }
}

h3 {
	--baselines: 2;
	font-size: 1.5rem;
}

h4 {
	--baselines: 2;
	font-size: 1.25rem;
}

a {
  color: currentColor;
	text-underline-offset: 0.1em;
}

a:hover,
a:focus-visible {
  color: currentColor;
}

a > code {
  text-decoration: underline;
  transition: color 0.1s, background-color 0.1s;
}

pre {
  white-space: pre-wrap;
}

pre > code {
  display: block;
  padding: 0.25rem 0.5rem;
}

b {
  font-weight: inherit;
}

mark,
code,
kbd,
samp {
  padding: 0.2rem 0.2rem 0;
  border-radius: var(--border-radius);
  color: inherit;
}

code {
  padding: 0.1rem 0.2rem;
}

mark {
  background-color: var(--color-accent);
  color: var(--color-black);
  background-color: var(--color-accent);
  color: var(--color-black);
}

kbd,
code,
samp {
  background-color: var(--color-black);
  color: var(--color-white);
}

dl {
	display: grid;
  align-items: start;
	grid-template-columns: max-content 1fr;
  column-gap: 0.25rem;
  row-gap: 0.5rem;
}

dt,
dd {
  font-size: 1rem;
  margin: 0;
}

dt {
  padding: 0.1rem 0.4rem 0;
  line-height: 1.1rem;
  text-align: center;
  border: 0.1rem solid;
  border-radius: var(--border-radius);
  color: var(--color-dark);
  border-color: var(--color-shadow);
}

dt + dd {
  margin-inline-start: 0.25rem;
}

dt::after {
  content: ":";
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-small);
  padding-inline: 0;
  margin: 0;
}

li {
  list-style-position: inside;
}

li::marker {
	line-height: 0;
  color: var(--color-accent);
}

li > ul,
li > ol {
  padding-block-start: var(--space-small);
  padding-block-end: 0;
}

.flow > * + * {
  margin-block-start: var(--space-small);
}

:lang(en-GB) > * {
  quotes: '‘' '’' '“' '”'; /* ‘British “style”’ */
} 

:lang(fr) > * {
  quotes: '«\00202F' '\00202F»' '“' '”'; /* « French “style” » */
}

q::before {
  content: open-quote
}

q::after  {
  content: close-quote
}

figure {
  padding: 0.4rem 0;
  margin: 0;
  border-block-start: 0.1rem solid var(--color-shadow);
  border-block-end: 0.1rem solid var(--color-shadow);
}

nav li::before {
  content: none;
}

td {
  font-variant-numeric: tabular-nums lining-nums slashed-zero;    
}

.uppercase {
	text-transform: uppercase;
	font-variant: small-caps;
}

cite {
  font-style: normal;
}

.icon {
  height: 1.2em;
  margin-right: var(--space-small);
}

/* --- Layout --- */

main > * {
	padding-inline: var(--space-medium);
	max-width: var(--max-width);
	margin-inline: auto;
}

@media all and (min-width: 34rem) {
	main > * {
		padding-inline: var(--space-large);
	}
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--space-small);
	padding: var(--space-tiny) var(--space-small);
	background: var(--color-accent);
	color: var(--color-black);
  transition: top 0.5s ease-out;
  z-index: 2;
	transform: translateY(-100%);
	border-bottom-left-radius: var(--border-radius);
	border-bottom-right-radius: var(--border-radius);
	transition: transform 0.2s;
}
 
.skip-link:focus-visible {
	transform: translateY(0);
	color: var(--color-black);
	outline: none;
}

.body {
  flex-grow: 1;
}

.base-header {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.base-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-medium);
  padding: var(--space-small) var(--space-medium) 8rem;
  background: linear-gradient(var(--color-black), var(--color-black) 10%, transparent);
}

.base-nav-items {
  display: none;
}

#menu-toggle:checked ~ .base-nav-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-contrast);
  z-index: 1;
}

#menu-toggle:checked + .menu-label {
  position: fixed;
  top: 0.5rem;
  right: 1rem;
  z-index: 2;
}

.base-nav-items a {
  font-style: italic;
}

.base-nav-items a,
.base-nav-home {
  position: relative;
  text-decoration: none;
}

.base-nav-home,
.menu-label {
  text-shadow: 0 2px 1px var(--color-black);
}

.base-nav-items a::after,
.base-nav-home::after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  bottom: 1px;
  height: 1px;
  width: 0;
  background: var(--color-accent);
  transform: translateX(-50%);
  transition: width 0.2s;
}

.base-nav-home:hover::after,
.base-nav-home:focus-visible::after,
.base-nav-items a:hover::after,
.base-nav-items a:focus-visible::after {
  width: 100%;
}

.base-nav-items .current:nth-child(n + 2) a::after {
  width: 100%;
}

.base-nav-home {
  font-family: var(--font-title);
  font-size: 1.25em;
}

.menu-label {
  line-height: 1.6rem;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.menu-label .icon {
  padding-bottom: 0.1rem;
}

.menu-label > span {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
}

#menu-toggle + .menu-label .menu-close {
  display: none;
}

#menu-toggle:checked + .menu-label .menu-open {
  display: none;
}

#menu-toggle:checked + .menu-label .menu-close {
  display: grid;
}

@media all and (min-width: 52rem) {
  #menu-toggle,
  #menu-toggle + .menu-label {
    display: none;
  }

  .base-nav-items {
    display: flex;
  }
}

.languages {
  display: flex;
  justify-content: end;
  padding-inline: var(--space-medium);
}

.languages-list {
  flex-direction: row;
  list-style: none;
  padding: 0;
  gap: 0;
}

.languages-list a {
  display: block;
  padding: 0.2rem 0.5rem;
  font-size: 0.875rem;
  text-decoration: none;
  background-color: var(--color-black);
}

.languages-list li:first-child > a {
  border-top-left-radius: var(--border-radius);
}

.languages-list li:last-child > a {
  border-top-right-radius: var(--border-radius);
}

.languages-list a:hover,
.languages-list a:focus-visible {
  background-color: var(--color-accent);
  color: var(--color-black);
}

.languages-list .current {
  font-weight: bold;
  color: var(--color-accent);
}

.clients {
  position: relative;
  display: grid;
  justify-content: center;
  max-width: none;
  margin-top: var(--space-medium);
  padding: var(--space-medium);
  background: var(--color-contrast);
  overflow: hidden;
}

.clients-item {
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 100%;
  max-width: var(--max-width);
  padding: var(--space-small) var(--space-medium);
  font-size: 0.875rem;
  border: 1px solid var(--color-medium);
  opacity: 0;
  transform: translateX(-150vw);
}

.clients-transition {
  transition: transform 0.5s ease-out, opacity 0.5s;
}

.clients-right {
  transform: translateX(150vw);
}

.clients-current {
  position: relative;
  top: 0;
  opacity: 1;
  transform: translateX(-50%);
}

.clients-nav {
  margin-block-start: var(--space-small);
  text-align: center;
}

.clients-nav > button {
  font-size: 0.875rem;
  background: var(--color-medium);
  border-color: var(--color-medium);
  margin-inline: var(--space-tiny);
}

.clients-nav > button:hover,
.clients-nav > button:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

#contact-form {
  position: relative;
  margin-top: var(--space-medium);
}

#contact-form-fields {
  transition: opacity 0.6s, height 0.6s;
}

form input + label,
form textarea + label,
form textarea + fieldset,
.submit {
  margin-top: var(--space-medium);
}

.submit {
  text-align: center;
}

#contact-success {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
}

.hiding {
  opacity: 0;
  overflow: hidden;
  height: 4rem;
}

.picture {
	max-width: var(--max-width-large);
  margin-block: var(--space-medium);
}

.experiences ul {
  list-style: none;
  gap: 0;
}

.experiences li {
  padding: 0.75rem 1rem;
  color: var(--color-accent);
  border: 1px solid var(--color-medium);
  border-bottom: none;
}

.experiences li:last-child {
  border-bottom: 1px solid var(--color-medium);
}

/* --- Blog --- */

.blog-date {
  font-size: 0.875rem;
}

.blog-date > time {
  padding: var(--space-tiny) var(--space-small);
  border: 1px solid var(--color-medium);
}

/* --- Footer --- */

.base-footer {
  padding: var(--space-large) var(--space-medium);
  text-align: center;
  background: var(--color-black);
}

.footer-socials > a {
  position: relative;
  text-decoration: none;
}

.footer-socials > a::after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  bottom: 1px;
  height: 1px;
  width: 0;
  background: var(--color-accent);
  transform: translateX(-50%);
  transition: width 0.2s;
}

.footer-socials > a:hover::after,
.footer-socials > a:focus-visible::after {
  width: 100%;
}

.footer-links {
  display: flex;
  max-width: none;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-block: var(--space-large);
  font-size: 0.875rem;
}

.home .footer-links {
  background: var(--color-contrast);
}

.edit-link {
  text-align: center;
}