/* VARIABLES */
/* VARIABLES */
/* VARIABLES */
/* VARIABLES */
/* VARIABLES */
/* VARIABLES */
/* VARIABLES */
/* VARIABLES */

:root {
  --font: "Roboto", sans-serif;
  --font-arabic: "Almarai", sans-serif;
  --font-japanese: "M PLUS Rounded 1c", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --gutter: clamp(1rem, 2vw, 2rem);
  --section-space: clamp(2rem, 4vw, 8rem);
  --square-btn: 3rem;
  --line-weight: 1px;
  --content-max: 80rem;
  --reading-max: 65ch;
  --core-transition: 300ms ease;

  /* THEMES */

  color-scheme: light;
  --background: #ffffff;
  --surface: #efefef;
  --text: #000000;
  --text-muted: #636363;
  --border: #d5d5d5;
  --accent: #000000;
  --on-accent: #ffffff;
}

/* Light theme fallback when JavaScript is unavailable. */

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #000000;
  --surface: #292929;
  --text: #fafafa;
  --text-muted: #b6b6b6;
  --border: #494949;
  --accent: #ffffff;
  --on-accent: #101a30;
}

/* ANIMATIONS */
/* ANIMATIONS */
/* ANIMATIONS */
/* ANIMATIONS */
/* ANIMATIONS */
/* ANIMATIONS */
/* ANIMATIONS */
/* ANIMATIONS */
/* ANIMATIONS */

body,
.navbar,
.project-card,
.project-thumbnail,
.button,
.nav-button,
.hero-nav {
  transition:
    background-color var(--core-transition),
    color var(--core-transition),
    border-color var(--core-transition);
}

.nav-logo {
  transition: fill var(--core-transition);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .button {
    transition: transform 150ms ease;
  }
  .button:active {
    transform: translateY(1px);
  }
}

@keyframes hue-cycle {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-thumbnail:hover {
    animation: none;
  }
}

/* RESETS */
/* RESETS */
/* RESETS */
/* RESETS */
/* RESETS */
/* RESETS */
/* RESETS */
/* RESETS */
/* RESETS */
/* RESETS */

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  /* line-height: 1.6; */
  background: var(--background);
  color: var(--text);
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.15;
  font-weight: 700;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.5rem, 1.5rem + 4vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 4rem);
}

h3 {
  font-size: 1.5rem;
}

h4,
h5,
h6 {
  font-size: 1.125rem;
}

ul,
ol {
  padding-inline-start: 1.5em;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

[id] {
  scroll-margin-block-start: var(--space-md);
}

button {
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */
/* UNIVERSAL APPLICATIONS */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-bottom: var(--gutter);
  /* padding-bottom: var(--section-space); */
}
.reading-width {
  max-width: var(--reading-max);
}
.stack > * + * {
  margin-block-start: var(--stack-space, var(--space-sm));
}
.text-muted {
  color: var(--text-muted);
}
.surface {
  background: var(--surface);
}

/* HEADER NAVIGATION */
/* HEADER NAVIGATION */
/* HEADER NAVIGATION */
/* HEADER NAVIGATION */
/* HEADER NAVIGATION */
/* HEADER NAVIGATION */
/* HEADER NAVIGATION */
/* HEADER NAVIGATION */
/* HEADER NAVIGATION */
/* HEADER NAVIGATION */

.navbar {
  display: flex;
  align-items: flex-start;
  align-content: center;
  /* gap: var(--space-sm); */
  padding-block: var(--gutter);
  background: var(--background);
}

.navbar > a {
  margin-inline-end: auto;
}

.nav-logo {
  display: block;
  width: 16rem;
  height: auto;
  fill: var(--text);
}

.nav-logo-reduced {
  width: 4rem;
}
.nav-logo:hover {
  fill: var(--accent);
}

.navbar .theme-toggle {
  flex-shrink: 0;
}

.nav-button {
  display: block;
  width: var(--square-btn);
  aspect-ratio: 1;
  padding: 0;
  margin: 0 0 0 1rem;
  cursor: pointer;
  transition:
    background-color var(--core-transition),
    color var(--core-transition),
    transform 150ms ease;
}

.theme-toggle {
  border-radius: 50%;
  background: none;
  color: var(--text);
}

.theme-toggle:active {
  transform: scale(0.85);
}

.theme-icon {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.theme-icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon--sun {
  display: block;
}

.menu-toggle {
  background: var(--text);
}

.menu-toggle {
  fill: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .nav-button {
    transition: none;
  }

  .theme-toggle:active {
    transform: none;
  }
}

/* On smaller screens, put navigation on its own row. */
@media (max-width: 40rem) {
  .navbar nav {
    order: 1;
    width: 100%;
  }
  .nav-logo {
    width: 8rem;
  }
}

/* MAIN PAGE PROJECT GRID */
/* MAIN PAGE PROJECT GRID */
/* MAIN PAGE PROJECT GRID */
/* MAIN PAGE PROJECT GRID */
/* MAIN PAGE PROJECT GRID */
/* MAIN PAGE PROJECT GRID */
/* MAIN PAGE PROJECT GRID */
/* MAIN PAGE PROJECT GRID */
/* MAIN PAGE PROJECT GRID */

.project-grid {
  display: grid;
  gap: var(--space-xs);
}
.project-grid > * {
  min-width: 0;
}
@media (min-width: 48rem) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.project-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: var(--text);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-color: var(--text);
}

.project-thumbnail:hover {
  cursor: pointer;
  animation: hue-cycle 2s linear infinite;
}

.thumbnail-izakaya {
  /* background-color: #cb7600; */
  background-image: url("/images/Test/Izakaya.jpg");
}

.thumbnail-rgtools {
  /* background-color: #cb7600; */
  background-image: url("/images/Test/RG.png");
}

.thumbnail-growit {
  /* background-color: #cb7600; */
  background-image: url("/images/Test/GrowIt.jpg");
}

.thumbnail-shori {
  /* background-color: #cb7600; */
  background-image: url("/images/Test/Shori.jpg");
}

.thumbnail-rematiptop {
  /* background-color: #cb7600; */
  background-image: url("/images/Test/RTT.jpg");
}

.thumbnail-bruff {
  /* background-color: #cb7600; */
  background-image: url("/images/Test/Bruff.jpg");
}

.thumbnail-yemenheaven {
  /* background-color: #cb7600; */
  background-image: url("/images/Test/YemenHeaven.jpg");
}

.thumbnail-pictap {
  /* background-color: #cb7600; */
  background-image: url("/images/Test/PT.png");
}

/* .project-card {
  padding-bottom: var(--gutter);
} */

/* One button style; em padding follows the button's text size. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75em 1.25em;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Add motion only for visitors who haven't requested reduced motion. */

.project-hero {
  display: flex;
  align-content: center;
  justify-content: space-between;
  width: 100%;
  aspect-ratio: 16 / 6;
  /* background-color: var(--background); */
  border: var(--line-weight) solid var(--text);
}

.project-hero-logo {
  width: 15%;
  height: auto;
  fill: var(--text);
}

.hero-nav {
  width: var(--square-btn);
  height: 100%;
}

.hero-nav:hover {
  background-color: var(--surface);
  border-color: var(--text);
}

.hero-nav-left {
  border-right: var(--line-weight) solid var(--text);
}

.hero-nav-right {
  border-left: var(--line-weight) solid var(--text);
}

@media (max-width: 40rem) {
  .project-hero {
    aspect-ratio: 4 / 5;
  }

  .project-hero-logo {
    width: 30%;
  }
}

.client-section {
  line-height: 2;
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  direction: ltr;
  margin-bottom: 4rem;
}

.language-switch button {
  /* padding: var(--space-xs) var(--space-sm); */
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--square-btn);
  height: var(--square-btn);
  border: var(--line-weight) solid var(--text);
  background-color: var(--background);
  color: var(--text);
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--core-transition),
    color var(--core-transition),
    border-color var(--core-transition);
}

button:lang(ar) {
  font-family: var(--font-arabic);
}

.language-switch button:hover {
  background-color: var(--surface);
  border-color: var(--accent);
}

.language-switch button[aria-pressed="true"] {
  background-color: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.language-switch [data-language="en"] {
  justify-self: start;
}

.language-switch [data-language="ja"] {
  justify-self: center;
}

.language-switch [data-language="ar"] {
  justify-self: end;
}

.language-switch:not(.is-ready) button {
  transition: none;
}

#client-copy {
  --copy-width: 100%;
}

#client-copy .reading-width {
  width: var(--copy-width);
  max-width: none;
  margin-inline: 0;
}

/* English: left */
#client-copy:lang(en) {
  text-align: left;
}

#client-copy:lang(en) .reading-width {
  margin-right: auto;
}

/* Japanese: centre */
#client-copy:lang(ja) {
  text-align: center;
}

#client-copy:lang(ja) .reading-width {
  margin-inline: auto;
}

/* Arabic: right */
#client-copy:lang(ar) {
  text-align: right;
}

#client-copy:lang(ar) .reading-width {
  margin-left: auto;
}

#client-copy h2 {
  font-size: 2rem;
  margin-bottom: var(--gutter);
}

#client-copy p {
  margin-bottom: 4rem;
  color: var(--text-muted);
}

#client-copy {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--core-transition),
    transform var(--core-transition);
}

#client-copy.is-changing {
  opacity: 0;
  transform: translateY(0.5rem);
}

@media (prefers-reduced-motion: reduce) {
  #client-copy {
    transition: none;
    transform: none;
  }

  #client-copy.is-changing {
    transform: none;
  }
}
/* Wide screens: paragraphs occupy one third */
@media (min-width: 80rem) {
  #client-copy {
    --copy-width: calc(100% / 1.5);
  }
}

.client-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* gap: var(--space-xs); */
}

.gallery-image {
  display: block;
  width: 100%;
  min-width: 0;
  object-fit: cover;
  object-position: center;
  /* border-radius: 1rem; */
}

.gallery-image--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  background-color: var(--text);
}

.gallery-image--portrait {
  aspect-ratio: 4 / 5;
  background-color: var(--text);
}

/* @media (max-width: 40rem) {
  .client-gallery {
    grid-template-columns: 1fr;
  }
} */
